diff options
author | ryuslash | 2010-02-09 02:10:17 +0100 |
---|---|---|
committer | ryuslash | 2010-02-09 02:10:17 +0100 |
commit | 1b09267876e51c0456c062e10ab70c0f7eba6c34 (patch) | |
tree | 8afb37f35b3563165aa7a41d32f2120620b5b811 /4grab.py | |
parent | 91e0b5dc665679e30cfd2114a68adce9af04a3e9 (diff) | |
download | 4grab-1b09267876e51c0456c062e10ab70c0f7eba6c34.tar.gz 4grab-1b09267876e51c0456c062e10ab70c0f7eba6c34.zip |
configuration settings and startfile
Configuration Settings can now be changed with the -e command line argument
execution of 4grab has been moved to 4grab.py, but should also still work with download.py
Diffstat (limited to '4grab.py')
-rwxr-xr-x[-rw-r--r--] | 4grab.py | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1,7 +1,9 @@ +#!/bin/env python import optparse import sys import config +import download parser = optparse.OptionParser() @@ -14,4 +16,12 @@ if options.confval: print "%s: error: %s is not a valid configuration option" % (sys.argv[0], options.confval[0]) exit(1) print "Setting", options.confval[0], "to", options.confval[1] - config.Configuration(). + config.Configuration().set_option(options.confval[0], options.confval[1]) + config.Configuration().save() + exit(0) + +base_url = "http://boards.4chan.org/%s/" % (config.Configuration().get_category()) + +t = download.get_thread_links(base_url) +t = download.get_image_links(base_url, t) +download.get_images(t) |