Last active
December 20, 2018 12:10
-
-
Save Igglybuff/d9105efe7c1046d9e052d71be64f7f89 to your computer and use it in GitHub Desktop.
A very scrappy (and probably brittle) script for generating a "Match Releases" expression for autodl-irssi from dvdsreleasedates.com. Requires Lynx.
This file contains hidden or 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
#!/bin/bash | |
# | |
# Depends on Lynx: | |
# | |
# $ apt-get -y install lynx | |
# | |
URL="https://www.dvdsreleasedates.com/" | |
MATCH_EXPRESSION=$(lynx -dump "${URL}" | \ | |
grep -i "Most Requested DVD Release Dates" -A 15 | \ | |
grep -i -v "Most Requested DVD Release Dates" | \ | |
tr '.' '\n' | \ | |
sed -e 's/[0-9]*//g' -e 's/\[//g' \ | |
-e 's/\]//g' -e '/^[[:space:]]*$/d' \ | |
-e 's/\///g' -e 's/^[[:space:]]*//' \ | |
-e 's/[[:space:]]*$//' -e 's/$/\*/' | \ | |
tr '\n' ',' | \ | |
tr ' ' '?') | |
echo ${MATCH_EXPRESSION::-1} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment