output dir

This commit is contained in:
2026-03-04 22:22:13 +01:00
parent 58ef5122ac
commit 89dc3afa12
3 changed files with 6 additions and 6 deletions

4
.gitignore vendored
View File

@@ -1,4 +1,2 @@
.env .env
BLOGPOST.md output/*.md
TRANSLATED_BLOGPOST.md
SOURCE.md

View File

@@ -28,9 +28,10 @@ import urllib.error
# Config & Templates # Config & Templates
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
SOURCE_FILE = "SOURCE.md" OUTPUT_DIR = "output"
BLOGPOST_FILE = "BLOGPOST.md" SOURCE_FILE = os.path.join(OUTPUT_DIR, "SOURCE.md")
TRANSLATED_FILE = "TRANSLATED_BLOGPOST.md" BLOGPOST_FILE = os.path.join(OUTPUT_DIR, "BLOGPOST.md")
TRANSLATED_FILE = os.path.join(OUTPUT_DIR, "TRANSLATED_BLOGPOST.md")
INSTRUCTIONS_FILE = "INSTRUCTIONS.md" INSTRUCTIONS_FILE = "INSTRUCTIONS.md"
GEMINI_MODEL = "gemini-flash-latest" GEMINI_MODEL = "gemini-flash-latest"
@@ -155,6 +156,7 @@ def read_file(path: str) -> str:
def write_file(path: str, content: str) -> None: def write_file(path: str, content: str) -> None:
os.makedirs(os.path.dirname(path), exist_ok=True)
with open(path, "w", encoding="utf-8") as f: with open(path, "w", encoding="utf-8") as f:
f.write(content) f.write(content)
print(f"✓ Saved to {path}") print(f"✓ Saved to {path}")

0
output/.keep Normal file
View File