Cleanup README

This commit is contained in:
FollieHiyuki 2021-02-24 05:05:20 +03:00
parent 34559dd888
commit 452b6aa9e8
No known key found for this signature in database
GPG Key ID: 813CF484F4993419
4 changed files with 10 additions and 78 deletions

View File

@ -39,10 +39,10 @@
- **Shell:** [fish](https://github.com/fish-shell/fish-shell)
- **Shell prompt:** [starship](https://starship.rs/)
- **Anime/Manga/Wallpaper:** [gallery-dl](https://github.com/mikf/gallery-dl) / [mangadl-bash](https://github.com/Akianonymus/mangadl-bash), [anime-downloader](https://github.com/anime-dl/anime-downloader) + [trackma](https://github.com/z411/trackma) + [adl](https://github.com/RaitaroH/adl) / [anigrab](https://github.com/ngomile/anigrab)
- **CLI/TUI tools for the Internet:** [translate-shell](https://github.com/soimort/translate-shell), [ddgr](https://github.com/jarun/ddgr), [howdoi](https://github.com/gleitz/howdoi), [tuxi](https://github.com/Bugswriter/tuxi), [amfora](https://github.com/makeworld-the-better-one/amfora), [cointop](https://github.com/miguelmota/cointop), [newsboat](https://github.com/newsboat/newsboat), [youtube-dl](https://github.com/ytdl-org/youtube-dl) + [ytmdl](https://github.com/deepjyoti30/ytmdl), [github-cli](https://github.com/cli/cli), [pup](https://github.com/ericchiang/pup), [tmpsms](https://github.com/sdushantha/tmpsms), [tmpmail](https://github.com/sdushantha/tmpmail), [weechat](https://github.com/weechat/weechat), [curl](https://curl.haxx.se) / [wget](https://www.gnu.org/software/wget/wget.html) / [aria2](https://github.com/aria2/aria2), [tremc](https://github.com/tremc/tremc) + [transmission](https://github.com/transmission/transmission) / [rtorrent](https://github.com/rakshasa/rtorrent), [goaccess](https://github.com/allinurl/goaccess)
- **CLI/TUI tools for other things:** [farge](https://github.com/sdushantha/farge), [tt](https://github.com/runrin/tt), [forgit](https://github.com/wfxr/forgit), [borg](https://github.com/borgbackup/borg), [wendy](https://git.z3bra.org/wendy/log.html), [tokei](https://github.com/XAMPPRocky/tokei), [onefetch](https://github.com/o2sh/onefetch), [calcurse](https://github.com/lfos/calcurse), [qalculate](https://github.com/Qalculate/libqalculate), [fzf](https://github.com/junegunn/fzf), [fd](https://github.com/sharkdp/fd), [ripgrep](https://github.com/BurntSushi/ripgrep), [atool](http://www.nongnu.org/atool/), [rsync](https://rsync.samba.org/), [bottom](https://github.com/clementtsang/bottom), [hyperfine](https://github.com/sharkdp/hyperfine), [delta](https://github.com/dandavison/delta), [bat](https://github.com/sharkdp/bat), [glow](https://github.com/charmbracelet/glow) / [mdcat](https://github.com/lunaryorn/mdcat) / [mdr](https://github.com/MichaelMure/mdr), [exa](https://github.com/ogham/exa), [pandoc](https://github.com/jgm/pandoc), [csview](https://github.com/wfxr/csview), [libsixel](https://github.com/saitoha/libsixel), [buku](https://github.com/jarun/buku), [jq](https://github.com/stedolan/jq), sysstat, psmisc, wireless_tools, tree
- **CLI/TUI tools for the Internet:** [translate-shell](https://github.com/soimort/translate-shell), [ddgr](https://github.com/jarun/ddgr), [howdoi](https://github.com/gleitz/howdoi), [amfora](https://github.com/makeworld-the-better-one/amfora), [cointop](https://github.com/miguelmota/cointop), [newsboat](https://github.com/newsboat/newsboat), [youtube-dl](https://github.com/ytdl-org/youtube-dl) + [ytmdl](https://github.com/deepjyoti30/ytmdl), [github-cli](https://github.com/cli/cli), [pup](https://github.com/ericchiang/pup), [weechat](https://github.com/weechat/weechat), [curl](https://curl.haxx.se) / [wget](https://www.gnu.org/software/wget/wget.html) / [aria2](https://github.com/aria2/aria2), [tremc](https://github.com/tremc/tremc) + [transmission](https://github.com/transmission/transmission) / [rtorrent](https://github.com/rakshasa/rtorrent), [goaccess](https://github.com/allinurl/goaccess)
- **CLI/TUI tools for other things:** [tt](https://github.com/runrin/tt), [forgit](https://github.com/wfxr/forgit), [borg](https://github.com/borgbackup/borg), [wendy](https://git.z3bra.org/wendy/log.html), [tokei](https://github.com/XAMPPRocky/tokei), [onefetch](https://github.com/o2sh/onefetch), [calcurse](https://github.com/lfos/calcurse), [qalculate](https://github.com/Qalculate/libqalculate), [fzf](https://github.com/junegunn/fzf), [fd](https://github.com/sharkdp/fd), [ripgrep](https://github.com/BurntSushi/ripgrep), [atool](http://www.nongnu.org/atool/), [rsync](https://rsync.samba.org/), [bottom](https://github.com/clementtsang/bottom), [hyperfine](https://github.com/sharkdp/hyperfine), [delta](https://github.com/dandavison/delta), [bat](https://github.com/sharkdp/bat), [glow](https://github.com/charmbracelet/glow) / [mdcat](https://github.com/lunaryorn/mdcat) / [mdr](https://github.com/MichaelMure/mdr), [exa](https://github.com/ogham/exa), [pandoc](https://github.com/jgm/pandoc), [csview](https://github.com/wfxr/csview), [libsixel](https://github.com/saitoha/libsixel), [buku](https://github.com/jarun/buku), [jq](https://github.com/stedolan/jq), sysstat, psmisc, wireless_tools, tree
> `Emacs` deserves its own set of dependencies listed, but I'm lazy. Check Doom config for details
> `Emacs` deserves its own set of dependencies listed, but I'm lazy -> Check my Doom config for details
> zsh requires adding `export ZDOTDIR=$HOME/.config/zsh` to **/etc/zsh/zshenv**
@ -57,7 +57,7 @@
- [ ] ion / oksh / nushell / osh / xonsh / elvish / oh
- [ ] NixOS / Guix / Gentoo / FreeBSD
- [ ] New Neovim's config in Lua
- [ ] My own ~/.emacs.d
- [ ] Independent ~/.emacs.d
- [ ] Org Babel to manage dotfiles
### :star2: Credits & License
@ -73,7 +73,6 @@
- I use some scripts from other people:
- [some fzf scripts](https://github.com/DanielFGray/fzf-scripts)
- [colorscripts](https://gitlab.com/dwt1/shell-color-scripts)
- `ytmenu` from [here](https://github.com/sayan01/scripts)
- Artists for **kawaii** wallpapers: [@rimuu](https://rimuu.com/), [@hiten](https://www.pixiv.net/users/490219/artworks), [@Tiv](https://www.pixiv.net/en/users/35081), [@mery](https://www.pixiv.net/en/users/2750098), [@Mashima_saki](https://www.pixiv.net/en/users/18403608), [@Yuuki_Tatsuya](https://www.pixiv.net/en/users/27691), [@Bison倉鼠](https://www.pixiv.net/en/users/333556/artworks), [@Dana](https://twitter.com/hapong07), [@gomzi](https://twitter.com/gcmzi), [@Rella](https://twitter.com/Rellakinoko), [@dnwls3010](https://twitter.com/dnwls3010), [@Shigure_Ui](https://www.pixiv.net/en/users/431873), [@QuAn_](https://www.pixiv.net/en/users/6657532/artworks), [@杉87](https://twitter.com/k_su_keke1121), [@fuzichoco](https://twitter.com/fuzichoco), [@Astero](https://twitter.com/asteroid_ill), [@shin556](https://www.pixiv.net/en/users/642762)
- Others are under MIT license

View File

@ -17,7 +17,7 @@
"filename": "{id}.{extension}",
"directory": [
"Pixiv",
"{user[name]-user[id]}"
"{user[name]}-{user[id]}"
],
"avatar": false,
"ugoira": true,

View File

@ -1,70 +0,0 @@
#!/bin/bash
# dependencies: mpv youtube-dl fzf rofi/dmenu
# search videos and playlists on youtube and play them in mpv, without an API
# usage:
# yt asks for input in stdin, prompts using fzf
# yt search query takes input from the passed arg, prompts using fzf
# yt -r takes input and prompts using rofi ($guicmd)
agent="Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0"
defcmd="fzf"
guicmd="wofi -d -i"
promptcmd="$defcmd"
if [ -z "$*" ]; then
echo -n "Search: "
read -r query
else
case "$1" in
-r) query=$(echo | $guicmd -p "Search: ")
promptcmd="$guicmd -p Video:";;
*) query="$*";;
esac
fi
if [ -z "$query" ]; then exit; fi
# sanitise the query
query=$(sed \
-e 's|+|%2B|g'\
-e 's|#|%23|g'\
-e 's|&|%26|g'\
-e 's| |+|g'\
<<< "$query")
# fetch the results with the $query and
# delete all escaped characters
response="$(curl -s "https://www.youtube.com/results?search_query=$query" -A "$agent" |\
sed 's|\\.||g')"
# if unable to fetch the youtube results page, inform and exit
if ! grep -q "script" <<< "$response"; then echo "unable to fetch yt"; exit 1; fi
# regex expression to match video and playlist entries from yt result page
vgrep='"videoRenderer":{"videoId":"\K.{11}".+?"text":".+?[^\\](?=")'
pgrep='"playlistRenderer":{"playlistId":"\K.{34}?","title":{"simpleText":".+?[^\"](?=")'
# grep the id and title
# return them in format id (type) title
getresults() {
grep -oP "$1" <<< "$response" |\
awk -F\" -v p="$2" '{ print $1 "\t" p " " $NF}'
}
# get the list of videos/playlists and their ids in videoids and playlistids
videoids=$(getresults "$vgrep")
playlistids=$(getresults "$pgrep" "(playlist)")
# if there are playlists or videos, append them to list
[ -n "$playlistids" ] && ids="$playlistids\n"
[ -n "$videoids" ] && ids="$ids$videoids"
# url prefix for videos and playlists
videolink="https://youtu.be/"
playlink="https://youtube.com/playlist?list="
# prompt the results to user infinitely until they exit (escape)
while true; do
clear
echo "Choose Video/Playlist to play: "
choice=$(echo -e "$ids" | cut -d' ' -f2 | $promptcmd) # dont show id
if [ -z "$choice" ]; then exit; fi # if esc-ed then exit
id=$(echo -e "$ids" | grep -Fwm1 "$choice" | cut -d' ' -f1) # get id of choice
echo -e "$choice\t($id)"
case $id in
# 11 digit id = video
???????????) mpv "$videolink$id";;
# 34 digit id = playlist
??????????????????????????????????) mpv "$playlink$id";;
*) exit ;;
esac
done

View File

@ -12,5 +12,8 @@ chmod 755 $HOME/.local/bin/farge
curl -fL "https://raw.githubusercontent.com/Bugswriter/tuxi/main/tuxi" -o $HOME/.local/bin/tuxi
chmod 755 $HOME/.local/bin/tuxi
curl -fL "https://github.com/RaitaroH/adl/raw/master/adl" -o $HOME/.local/bin/adl
chmod 755 $HOME/.local/bin/adl
curl -fL "https://github.com/RaitaroH/adl/raw/master/adl" -o $HOME/.local/bin/fzf/adl
chmod 755 $HOME/.local/bin/fzf/adl
curl -fL "https://github.com/pystardust/ytfzf/raw/master/ytfzf" -o $HOME/.local/bin/fzf/ytfzf
chmod 755 $HOME/.local/bin/fzf/ytfzf