output dir
This commit is contained in:
@@ -28,9 +28,10 @@ import urllib.error
|
||||
# Config & Templates
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
SOURCE_FILE = "SOURCE.md"
|
||||
BLOGPOST_FILE = "BLOGPOST.md"
|
||||
TRANSLATED_FILE = "TRANSLATED_BLOGPOST.md"
|
||||
OUTPUT_DIR = "output"
|
||||
SOURCE_FILE = os.path.join(OUTPUT_DIR, "SOURCE.md")
|
||||
BLOGPOST_FILE = os.path.join(OUTPUT_DIR, "BLOGPOST.md")
|
||||
TRANSLATED_FILE = os.path.join(OUTPUT_DIR, "TRANSLATED_BLOGPOST.md")
|
||||
INSTRUCTIONS_FILE = "INSTRUCTIONS.md"
|
||||
|
||||
GEMINI_MODEL = "gemini-flash-latest"
|
||||
@@ -155,6 +156,7 @@ def read_file(path: str) -> str:
|
||||
|
||||
|
||||
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:
|
||||
f.write(content)
|
||||
print(f"✓ Saved to {path}")
|
||||
|
||||
Reference in New Issue
Block a user