Skip to content

Instantly share code, notes, and snippets.

@Igglybuff
Last active December 20, 2018 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Igglybuff/d9105efe7c1046d9e052d71be64f7f89 to your computer and use it in GitHub Desktop.
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.
#!/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