Skip to content

Commit 87e5575

Browse files
committed
change directory in metadata to linux version
1 parent b354bb2 commit 87e5575

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/HPC_chatbot_preprocessor/chatbot_parser.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ def write_metadata(main_title, subtitle, links, title_level, directory, source_f
634634
:return paragraph_metadata: dictionary containing the metadata about the section
635635
"""
636636

637-
paragraph_metadata = {MAIN_TITLE: main_title, SUBTITLE: subtitle, SOURCE_FILE: source_file, TITLE_DEPTH: title_level, DIRECTORY: directory}
637+
paragraph_metadata = {MAIN_TITLE: main_title, SUBTITLE: subtitle, SOURCE_FILE: source_file, TITLE_DEPTH: title_level, DIRECTORY: Path(directory).as_posix()}
638638

639639
if len(links) > 0:
640640
paragraph_metadata[LINKS] = {}
@@ -1061,6 +1061,7 @@ def split_and_write_os_specific_section(text, metadata, subtitle_order, title_or
10611061
os_specific_metadata[os_subtitle][DIRECTORY] = os.path.join(parent, os_specific_metadata[os_subtitle][SUBTITLE])
10621062
else:
10631063
os_specific_metadata[os_subtitle][DIRECTORY] = os.path.join(all_metadata[parent][DIRECTORY], os_specific_metadata[os_subtitle][SUBTITLE])
1064+
os_specific_metadata[os_subtitle][DIRECTORY] = Path(os_specific_metadata[os_subtitle][DIRECTORY]).as_posix()
10641065

10651066
# make a directory to save the files
10661067
filepath = os.path.join(options[DESTINATION_DIRECTORY], PARSED_MDS, OS_SPECIFIC_DIR, OS, os_specific_metadata[os_subtitle][DIRECTORY])

0 commit comments

Comments
 (0)