def mergeSingle(src): if not os.path.isdir(src): Log.w(Duokan.__name__, '[%s] is not a diractory, exit...' % (src, )) return path = os.path.split(src) id = path[1] destPath = os.path.join(path[0], id+'.pdf') DuoPdf.clean(src) DuoPdf.merge(destPath, src)
def mergeSingle(src): if not os.path.isdir(src): Log.w(Duokan.__name__, '[%s] is not a diractory, exit...' % (src, )) return path = os.path.split(src) id = path[1] destPath = os.path.join(path[0], id + '.pdf') DuoPdf.clean(src) DuoPdf.merge(destPath, src)
def merge(id): '''merge pdf files in tmp/${id}, to books/new/${id}.pdf''' srcPath = os.path.join(os.path.curdir, 'tmp', id) destPath = os.path.join(os.path.curdir, 'books', 'new', id+'.pdf') DuoPdf.clean(srcPath) # clean pdf DuoPdf.merge(destPath, srcPath)
def merge(id): '''merge pdf files in tmp/${id}, to books/new/${id}.pdf''' srcPath = os.path.join(os.path.curdir, 'tmp', id) destPath = os.path.join(os.path.curdir, 'books', 'new', id + '.pdf') DuoPdf.clean(srcPath) # clean pdf DuoPdf.merge(destPath, srcPath)