added rule to get last 100 decks from mtgtop8

master
melvin 2013-07-14 10:11:06 +08:00
parent 24bff910ac
commit d26dc20812
1 changed files with 5 additions and 0 deletions

View File

@ -257,6 +257,11 @@ decks/ml_%.dec: scripts/apprentice2dec.awk
decks/mtgtop8_%.dec:
wget "http://www.mtgtop8.com/export_files/deck$*.mwDeck" -O $@
decks/update:
$(eval LAST := $(shell curl http://mtgtop8.com/search | grep "d=[0-9]\+" -o | sort | tail -1 | sed 's/d=//'))
seq `expr ${LAST} - 100` ${LAST} | parallel make decks/mtgtop8_{}.dec
find decks -size 0 -delete
ref/rules.txt:
curl `wget http://www.wizards.com/magic/rules -O - | grep txt | cut -d'"' -f4` | fmt -s > $@
flip -bu $@