Skip to content

Commit d96aeba

Browse files
committed
change filenames
1 parent 445f7ee commit d96aeba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/HPC_chatbot_preprocessor/chatbot_parser.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,9 @@ def split_on_paragraphs(file, main_title, options, is_linux_tutorial, current_pa
536536

537537
# create a title for the previous paragraph
538538
if current_paragraph_number == -1:
539-
paragraph_title = main_title + _PARAGRAPH_ + str(paragraph_number)
539+
paragraph_title = main_title + _PARAGRAPH_ + f"{paragraph_number:03}"
540540
else:
541-
paragraph_title = main_title + "_" + OS + _PARAGRAPH_ + str(current_paragraph_number) + '.' + str(paragraph_number)
541+
paragraph_title = main_title + "_" + OS + _PARAGRAPH_ + f"{current_paragraph_number:03}.{paragraph_number:03}"
542542
paragraph_number += 1
543543

544544
# write text of previous file
@@ -588,9 +588,9 @@ def split_on_paragraphs(file, main_title, options, is_linux_tutorial, current_pa
588588

589589
# create a title for the last paragraph
590590
if current_paragraph_number == -1:
591-
paragraph_title = main_title + _PARAGRAPH_ + str(paragraph_number)
591+
paragraph_title = main_title + _PARAGRAPH_ + f"{paragraph_number:03}"
592592
else:
593-
paragraph_title = main_title + "_" + OS + _PARAGRAPH_ + str(current_paragraph_number) + '.' + str(paragraph_number)
593+
paragraph_title = main_title + "_" + OS + _PARAGRAPH_ + f"{current_paragraph_number:03}.{paragraph_number:03}"
594594

595595
# write dictionaries for the last file
596596
if previous_contained_if:

0 commit comments

Comments
 (0)