Skip to content

Commit c914be9

Browse files
authored
Merge pull request #22 from jmason86/master
Made textbook_folder an optional input
2 parents 2ae5d7b + d57eb10 commit c914be9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/generate_summary_from_folders.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
" The alpha-numeric name of folders/files will be used to choose the order of chapters.")
66

77
parser = argparse.ArgumentParser(description=DESCRIPTION)
8-
parser.add_argument("textbook_folder", default=None, help="Path to the folder where the textbook is stored.")
8+
parser.add_argument("--textbook_folder", default=None, help="Path to the folder where the textbook is stored. Default is ./notebooks.")
99
parser.add_argument("--out_path", default=None, help="Path to the folder where the output SUMMARY.md file will be written.")
1010
parser.add_argument("--filename_split_char", default='_', help="The character used to split words in the file name. Used to generate titles from file names. Defaults to '_'")
1111
parser.add_argument("--overwrite", action='store_true', help="Overwrite SUMMARY.md if it already exists.")
@@ -61,8 +61,8 @@ def notebooks_folder_to_files(notebooks_folder):
6161
files = notebooks_folder_to_files(args.textbook_folder)
6262
print('Found {} chapters'.format(len(files)))
6363
md = files_to_markdown(files)
64-
65-
64+
65+
6666
out_path_file = os.path.join(args.out_path, 'SUMMARY.md')
6767
if os.path.exists(out_path_file) and bool(args.overwrite) is False:
6868
raise ValueError('SUMMARY.md file exists, delete the file or set `overwrite=True`')

0 commit comments

Comments
 (0)