summaryrefslogtreecommitdiffstats
path: root/4grab.py
diff options
context:
space:
mode:
authorGravatar ryuslash2010-02-09 02:10:17 +0100
committerGravatar ryuslash2010-02-09 02:10:17 +0100
commit1b09267876e51c0456c062e10ab70c0f7eba6c34 (patch)
tree8afb37f35b3563165aa7a41d32f2120620b5b811 /4grab.py
parent91e0b5dc665679e30cfd2114a68adce9af04a3e9 (diff)
download4grab-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.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/4grab.py b/4grab.py
index 4de6526..7863854 100644..100755
--- 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)