chore: more dev QoL, exclude dolphin dev from json. fix: scummvm
This commit is contained in:
@@ -2,11 +2,10 @@ import sys
|
||||
import os
|
||||
|
||||
|
||||
def stitch_markdown_files(init_file, table_file, faq_file, output_file="README.md"):
|
||||
files = [init_file, table_file, faq_file]
|
||||
def stitch_markdown_files(markdown_files, output_file="README.md"):
|
||||
combined_content = []
|
||||
|
||||
for file in files:
|
||||
for file in markdown_files:
|
||||
if not os.path.exists(file):
|
||||
print(f"❌ File not found: {file}")
|
||||
sys.exit(1)
|
||||
@@ -18,12 +17,13 @@ def stitch_markdown_files(init_file, table_file, faq_file, output_file="README.m
|
||||
with open(output_file, "w", encoding="utf-8") as f:
|
||||
f.write("\n\n".join(combined_content) + "\n")
|
||||
|
||||
print(f"✅ README.md successfully created with {len(files)} sections.")
|
||||
print(f"✅ {output_file} successfully created with {len(markdown_files)} sections.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 4:
|
||||
print("Usage: python stitch_markdown.py init.md table.md faq.md")
|
||||
if len(sys.argv) < 2:
|
||||
print("Usage: python stitch_markdown.py file1.md file2.md ... [fileN.md]")
|
||||
sys.exit(1)
|
||||
|
||||
stitch_markdown_files(sys.argv[1], sys.argv[2], sys.argv[3])
|
||||
input_files = sys.argv[1:]
|
||||
stitch_markdown_files(input_files)
|
||||
|
||||
Reference in New Issue
Block a user