From d41ab5335e9bc1cc9a7a0c1ec805f3b88b273bbf Mon Sep 17 00:00:00 2001 From: ryuslash Date: Fri, 12 Feb 2010 00:18:34 +0100 Subject: [PATCH 1/2] Removed some comments --- progressbar.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/progressbar.py b/progressbar.py index 0163c12..8143be9 100644 --- a/progressbar.py +++ b/progressbar.py @@ -36,17 +36,13 @@ class Progress(): def show_progress(self, value): str_value = str(value) str_maxvalue = str(self.maxvalue) - #true_maxwidth = self.maxwidth - 4 - len(str_value) - len(str_maxvalue) true_maxwidth = self.__get_true_maxwidth(len(str_value), len(str_maxvalue)) - #print true_maxwidth, ":", self.maxvalue, ":", value # for debugging purposes if self.maxvalue == 0: progress = true_maxwidth else: progress = int(round((true_maxwidth/float(self.maxvalue))*value)) - #self.fd.write("\r%s/%s [%s%s]" % (str_value, str_maxvalue, self.prog_char * progress, self.fill_char * (true_maxwidth - progress))) - #self.fd.flush() self.__write_progress(str_value, str_maxvalue, progress, true_maxwidth) def __write_progress(self, str_value, str_maxvalue, progress, true_maxwidth): From 9ed19eae00538b2ec4f24dd298737e27139d8b2a Mon Sep 17 00:00:00 2001 From: ryuslash Date: Fri, 12 Feb 2010 00:34:36 +0100 Subject: [PATCH 2/2] Who knows what the hell I did this time --- 4grab.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/4grab.py b/4grab.py index ae550b4..28889c7 100755 --- a/4grab.py +++ b/4grab.py @@ -29,6 +29,7 @@ base_url = "http://boards.4chan.org/" parser = optparse.OptionParser() def walk_with_wizard(baseurl): + wzrd_msg = "Pilates! *SHAZAM* Here they come!" print "Alright, let me put on my robe and wizard hat." # Single or all @@ -46,12 +47,14 @@ def walk_with_wizard(baseurl): else: thread = inp inp = raw_input("Which category is this thread in? ") + print wzrd_msg t = download.get_image_links("%s%s/res/" % (baseurl, inp), [thread]) else: inp = raw_input("Which category would you like to download? ") config.Configuration().set_category(inp) baseurl = "%s%s/" % (baseurl, config.Configuration().get_category()) + print wzrd_msg t = download.get_thread_links(baseurl) t = download.get_image_links(baseurl, t) (skipped, failed, downloaded, total) = download.get_images(t)