Skip to content

4chan shell implementation currently very raw and in development

License

Notifications You must be signed in to change notification settings

th4n4t0sss/shell4chan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SHELL4CHAN

shell4chan is POSIX complient shell script that lets you grab and display threads from the very intelligent website 4chan.
This shit is still in the early fucking stages of development.

Video Preview

REQUIREMENTS

  • dash or any POSIX complient shell,usually dash if you are not brainlet
  • curl - you should have already if you are not fucking bastard
  • jq - you need to have jq with sh-support branch compiled here is shell command to compile my own fork of jq with sh-support
git clone https://github.com/zeta3301/jq /opt/jq/
cd /opt/jq/
autoreconf -fi
./configure
make -j8
sudo make install
  • timg by default script will use this image viewer timg
    but you can use libsixel to make better and faster image viewer. libsixel sixel for using img2sixel as image viewer you should uncomment this line
#sh_text("curl --create-dirs -sO --output-dir ~/.cache/shell4chan/ https://i.4cdn.org/\($board)/\(.tim)\(.ext) && img2sixel -w \(.tn_w) -h \(.tn_h) ~/.cache/shell4chan/\(.tim)\(.ext)")#

and comment or remove this line

sh_text("curl --create-dirs -sO --output-dir ~/.cache/shell4chan/ https://i.4cdn.org/\($board)/\(.tim)\(.ext) && timg -g\(.tn_w / 4)x\(.tn_h / 4) ~/.cache/shell4chan/\(.tim)\(.ext)")

shell command for compiling libsixel with libcurl

git clone https://github.com/saitoha/libsixel /opt/libsixel/
cd /opt/libsixel/
./configure --with-jpeg --with-png --with-libcurl 
make
sudo ln -s /opt/libsixel/converters/img2sixel /usr/local/bin/img2sixel
  • herbe(optional,you need it when you use -b argument) the best fucking notification manager herbe otherwise it will use stupid notify-send

Installation and Usage

curl shell4chan to your $PATH and give execute permissions.

$ doas curl -sL "https://raw.githubusercontent.com/zeta3301/shell4chan/main/shell4chan" -o /usr/local/bin/shell4chan
$ doas chmod +x /usr/local/bin/shell4chan
$ shell4chan BOARD THREAD_NUMBER

after viewing thread with less you have prompt to run commands on it

:thread THREAD_NUMBER

this will change thread variable and will give you new thread

:board BOARD

this command is still in work,you will be able to browse boards and chooose thread

:background

your thread will run in background and will give you notifications if there is new reply.
if you don't have $TERMINAL exported,script will use xterm as default terminal.

:refresh

this will refresh the thread you are already watching with new posts

:save DOWNLOAD_PATH

if you didn't specify the download path it will save it in ~/.local/share/shell4chan/BOARD/THREAD.thread path

:quit

I will add more commands like :post or :reply, but that's are the harder ones.

License

Perhaps /g/ autists can't run script if there is no license even though i said that you can do what the fuck you want with this stupid shit.So I added AGPL License.

Feel free to modify it as needed motherfucker.

About

4chan shell implementation currently very raw and in development

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages