Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Notifies you when a book has become available on Libgen.
#!/usr/bin/env zsh
#Install libgen.py, GNU Timeout, and terminal-notifier (macOS only. Just delete the line for other OSes.). Use cron to check for a book regularly. (e.g., `0 9 * * * ~/book-notifier.zsh "little schemer"`)
gtimeout 6s libgen -s "$1" &> /dev/null
if [ $? -eq 124 ]; then
terminal-notifier -message "$1" -title "Book Has Become Available!"
echo "$1 is now available!"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.