add rule to convert google code wiki page to markdown

master
melvin 2014-10-09 10:51:10 +08:00
parent ada9e98218
commit b6e373034c
1 changed files with 7 additions and 0 deletions

View File

@ -739,3 +739,10 @@ firemind:
# extract name<tab>image url from gallery page
%.tsv: %.html
grep "alt.*src.*media" $^ | sed 's/.*alt="\([^"]*\)".*src="\([^"]*\)".*/\1\t\2/' > $@
%.md:
curl https://code.google.com/p/magarena/wiki/$* \
| xmllint --html --xpath "//div[@id='wikicontent']" - \
| pandoc --from html --to markdown --no-wrap \
> $@