Last active
May 16, 2020 12:50
-
-
Save NightMachinery/6ded66fa61ebc566e1bac5ef3d9d0c3e to your computer and use it in GitHub Desktop.
Notifies you when a book has become available on Libgen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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