Skip to content

Commit

Permalink
added --dir option (would help, http://blog.kung-foo.tv/archives/0011…
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhammond committed Sep 14, 2004
1 parent 031005a commit 00344ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion webkit2png
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 00344ab

Please sign in to comment.