File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/python_notion_exporter Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ def __init__(
4242 include_files : bool = False ,
4343 recursive : bool = True ,
4444 workers : int = multiprocessing .cpu_count (),
45+ export_name : str = None ,
4546 ):
4647 """
4748 Initializes the NotionExporter class.
@@ -57,9 +58,14 @@ def __init__(
5758 include_files (bool, optional): If True, includes files in the export. Defaults to False.
5859 recursive (bool, optional): If True, exports will be recursive. Defaults to True.
5960 workers (int, optional): Number of worker threads for exporting. Defaults to the number of CPUs available.
61+ export_name (str, optional): Name of the export. Defaults to the current date and time.
6062 """
6163
62- self .export_name = f"export-{ datetime .now ().strftime ('%Y-%m-%d-%H-%M-%S' )} "
64+ self .export_name = (
65+ f"export-{ datetime .now ().strftime ('%Y-%m-%d-%H-%M-%S' )} "
66+ if not export_name
67+ else export_name
68+ )
6369 self .token_v2 = token_v2
6470 self .file_token = file_token
6571 self .include_files = include_files
You can’t perform that action at this time.
0 commit comments