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__(
42
42
include_files : bool = False ,
43
43
recursive : bool = True ,
44
44
workers : int = multiprocessing .cpu_count (),
45
+ export_name : str = None ,
45
46
):
46
47
"""
47
48
Initializes the NotionExporter class.
@@ -57,9 +58,14 @@ def __init__(
57
58
include_files (bool, optional): If True, includes files in the export. Defaults to False.
58
59
recursive (bool, optional): If True, exports will be recursive. Defaults to True.
59
60
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.
60
62
"""
61
63
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
+ )
63
69
self .token_v2 = token_v2
64
70
self .file_token = file_token
65
71
self .include_files = include_files
You can’t perform that action at this time.
0 commit comments