From 00344aba7b6b6ffe86966c0f384d91483fd769be Mon Sep 17 00:00:00 2001 From: Paul Hammond Date: Tue, 14 Sep 2004 20:55:20 +0000 Subject: [PATCH] added --dir option (would help, http://blog.kung-foo.tv/archives/001123.php ) --- webkit2png | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webkit2png b/webkit2png index e1169c4..9008679 100755 --- a/webkit2png +++ b/webkit2png @@ -59,7 +59,8 @@ class WebkitLoad (NSObject, WebKit.protocols.WebFrameLoadDelegate): import time now = time.strftime("%Y%m%d") filename = now + "-" + filename - return filename + dir = os.path.abspath(os.path.expanduser(options.dir)) + return os.path.join(dir,filename) def saveImages(self,bitmapdata,filename,options): # save the fullsize png @@ -165,6 +166,8 @@ examples: help="use md5 hash for filename (like del.icio.us)") cmdparser.add_option("-d", "--datestamp", action="store_true", help="include date in filename") + cmdparser.add_option("-D", "--dir",type="string",default="./", + help="directory to place images into") (options, args) = cmdparser.parse_args() if len(args) == 0: cmdparser.print_help()