output dir
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,4 +1,2 @@
|
|||||||
.env
|
.env
|
||||||
BLOGPOST.md
|
output/*.md
|
||||||
TRANSLATED_BLOGPOST.md
|
|
||||||
SOURCE.md
|
|
||||||
@@ -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
0
output/.keep
Normal file
Reference in New Issue
Block a user