X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;ds=sidebyside;f=html2wiki%2Fsfmag_fetch.py;fp=html2wiki%2Fsfmag_fetch.py;h=bca25bc0a68c9ed69aa8326a914d3c4ea012de02;hb=063385f5e7c95c5f794ec39cc14857b8809a75a4;hp=0000000000000000000000000000000000000000;hpb=d4ee3f3304edf5267bfeb462f1e20e15fb79f7c3;p=otptools%2Fotptools.git diff --git a/html2wiki/sfmag_fetch.py b/html2wiki/sfmag_fetch.py new file mode 100755 index 0000000..bca25bc --- /dev/null +++ b/html2wiki/sfmag_fetch.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import fetch_sfjpmag +import sys +import os.path + +usage = "%s " % sys.argv[0] + +try: + urllist = sys.argv[1] + output_dir = sys.argv[2] +except IndexError: + sys.exit(usage) + +if not os.path.isdir(output_dir): + sys.exit(usage) + +try: + f = open(urllist, "r") +except IOError: + sys.exit(usage) + +for url in f: + if url[0] == "#": + continue + + url = url.strip() + fetch_sfjpmag.fetch(url, output_dir) +