forked from LiveCarta/BookConverter
Annotations in Epub converter
This commit is contained in:
@@ -4,8 +4,7 @@ import argparse
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description="Utility for folders's clean up.")
|
||||
parser.add_argument('-f', '--folders', type=str, nargs='*', help='Names of the folders to be cleaned.')
|
||||
|
||||
parser.add_argument("-f", "--folders", type=str, nargs="*", help="Names of the folders to be cleaned.")
|
||||
args = parser.parse_args()
|
||||
return args
|
||||
|
||||
@@ -18,10 +17,10 @@ def check_dir(dir_path):
|
||||
raise exc
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if __name__ == "__main__":
|
||||
folders = parse_args().folders
|
||||
if not folders:
|
||||
folders = ['docx', 'html', 'json', 'logs', 'config']
|
||||
folders = ["docx", "html", "json", "logs", "config"]
|
||||
|
||||
folder_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
folders = [os.path.join(folder_path, folder) for folder in folders]
|
||||
|
||||
Reference in New Issue
Block a user