Commits

luoboiqingcai committed 83a0bee

refine gendocument.py commandline descriptions.
and
add some hints when change preface page names using prefaces.py
and
remove redundant lines in downloadlib.py
but
prefex command line option does not work in downloadlib.py which needs fixs.

Comments (0)

Files changed (3)

             raise DeprecationWarning('this method is not sopported yet.')
         instance = DownloadChaoXing(lnp=lnp,pattern=pattern_for_chaoxing,img_url_prex=chaoxing_img_url_prex,prex=prex,logfile=logfile)
         if resume:
-            if prex[-1] == '/' or prex[-1] == '\\':
-                print('prex should not end with slash')
-                exit(1)
             instance(from_remote,arg,sp=resume_point(os.path.join(prex,logfile)))
         if sp and ep:
             instance(from_remote,arg,sp=sp,ep=ep)
             pool.map_async(multidownloadduxiu,instance.get_img_pairs(from_remote,arg),processes)
             pool.close()
             pool.join()
-    sys.exit(0)
+    sys.exit(0)
     print("use this software at your own risk.")
     print("author:%s %s"%(__author__,__contact__))
     print("currently only pdf file type is supported.")
+    print("gendocument.py --tofile=where arg1 arg2 arg3 ...")
     print("-h show this help message.")
     print("--tofile= where to write the generated file")
     print("arg1 arg2 ... argn3 the images to be assembled to the result file")
     try:
         opts, args = getopt.getopt(sys.argv[1:],'h',['tofile='])
     except getopt.GetoptError, err:
-        print str(err)
+        print(str(err))
         usage()
         sys.exit(2)
     for o, a in opts:
             f1 = '0000004' + f
         if f1:
             shutil.move(f,f1)
+            sys.stdout.write("%s --> %s\n"%(f,f1))
 
 if __name__ == '__main__':
     main()