From 1b09267876e51c0456c062e10ab70c0f7eba6c34 Mon Sep 17 00:00:00 2001 From: ryuslash Date: Tue, 9 Feb 2010 02:10:17 +0100 Subject: 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 --- 4grab.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) mode change 100644 => 100755 4grab.py (limited to '4grab.py') diff --git a/4grab.py b/4grab.py old mode 100644 new mode 100755 index 4de6526..7863854 --- a/4grab.py +++ b/4grab.py @@ -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) -- cgit v1.2.3-54-g00ecf