print"Downloaded story {} to {}".format(story_name.search(name).group(1),name)
exceptExceptionase:
print"Exception: {}".format(e)
rmtree(loc)
loc=mkdtemp()
fp.write("{}\n".format(url))
continue
rmtree(loc)
@ -118,7 +138,7 @@ if __name__ == "__main__":
option_parser.add_option('-m','--mailbox',action='store',dest='mailbox',default='INBOX',help='Email Label. Default is "INBOX".')
option_parser.add_option('-l','--library',action='store',dest='library',default="",help="calibre library db location. If none is passed, the default is the calibre system library location. Make sure to enclose the path in quotes.")
option_parser.add_option('-l','--library',action='store',dest='library', help="calibre library db location. If none is passed, then this merely scrapes the email and error file for new stories and downloads them into the current directory.")
option_parser.add_option('-i','--input',action='store',dest='input',default="./fanfiction.txt",help="Error file. Any urls that fail will be output here, and file will be read to find any urls that failed previously. If file does not exist will create. File is overwitten every time the program is run.")