|
|
@@ -123,9 +123,6 @@ def convert_chat_html_to_markdown(html_path: str) -> str:
|
|
|
if not body:
|
|
|
continue
|
|
|
|
|
|
- # # Preserve single spacing
|
|
|
- # body = body.replace("\n", " ") # Doesn't work
|
|
|
-
|
|
|
role = conversation_turn.get_attribute_list('data-message-author-role')
|
|
|
if role[0] == "user":
|
|
|
message = f"**You:**\n\n{body}"
|
|
|
@@ -153,7 +150,7 @@ def main(args):
|
|
|
input_html = input_html_ext
|
|
|
|
|
|
output_name, markdown_text = convert_chat_html_to_markdown(input_html)
|
|
|
-
|
|
|
+
|
|
|
os.makedirs("output", exist_ok=True)
|
|
|
output_path = os.path.join("output", output_name)
|
|
|
|