2015-05-11 10:35:45 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-02-05 15:21:10 +00:00
|
|
|
fetch()
|
|
|
|
{
|
2016-02-05 15:21:13 +00:00
|
|
|
FILE="$1"
|
|
|
|
LINK="$2"
|
|
|
|
TIME="$3"
|
2015-05-11 10:35:45 +00:00
|
|
|
|
2016-02-05 15:21:13 +00:00
|
|
|
echo "Fetch $FILE"
|
|
|
|
if [ ! -f "$FILE" ] || test "`find $FILE -mtime $TIME`"; then
|
|
|
|
curl -L -o "$FILE" -z "$FILE" "$LINK"
|
2016-02-11 18:55:22 +00:00
|
|
|
|
|
|
|
if [[ "${FILE##*.}" == "gz" ]]; then
|
2016-02-05 15:21:13 +00:00
|
|
|
gunzip -k -f "$FILE"
|
|
|
|
fi
|
2016-02-11 18:55:22 +00:00
|
|
|
if [[ "${FILE##*.}" == "zip" ]]; then
|
2016-02-05 15:21:13 +00:00
|
|
|
unzip -o "$FILE"
|
|
|
|
fi
|
|
|
|
fi
|
2016-02-05 15:21:10 +00:00
|
|
|
}
|
2015-05-11 10:35:45 +00:00
|
|
|
|
2016-02-05 15:21:10 +00:00
|
|
|
fetch anidb.txt.gz 'http://anidb.net/api/anime-titles.dat.gz' +5
|
|
|
|
fetch tvdb.zip 'http://thetvdb.com/api/58B4AA94C59AD656/updates/updates_all.zip' +5
|
|
|
|
fetch omdb.zip 'http://beforethecode.com/projects/omdb/download.aspx?e=reinhard.pointner%40gmail.com&tsv=movies' +30
|
|
|
|
fetch osdb.txt 'http://www.opensubtitles.org/addons/export_movie.php' +30
|
2015-05-11 19:47:02 +00:00
|
|
|
|
2016-02-05 15:21:13 +00:00
|
|
|
fetch anime-list.xml 'https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-list.xml' +30
|
|
|
|
fetch anime-movieset-list.xml 'https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-movieset-list.xml' +30
|
2015-05-11 19:51:32 +00:00
|
|
|
|
|
|
|
echo 'DONE'
|