tweaks
This commit is contained in:
24
Makefile
24
Makefile
@@ -2,26 +2,26 @@ ENV = export $(shell cat .env | grep -v '^\#' | grep -v '^$$' | xargs)
|
|||||||
|
|
||||||
.PHONY: fetch write translate upload clean all
|
.PHONY: fetch write translate upload clean all
|
||||||
|
|
||||||
## Letölt egy wiki oldalt SOURCE.md-be
|
## Downloads a wiki page into SOURCE.md
|
||||||
## Használat: make fetch URL=/path/to/page
|
## Usage: make fetch URL=/path/to/page
|
||||||
fetch:
|
fetch:
|
||||||
$(ENV) && python3 generator.py fetch $(URL)
|
@$(ENV) && python3 generator.py fetch $(URL)
|
||||||
|
|
||||||
## Blogposztot ír SOURCE.md-ből → BLOGPOST.md
|
## Writes a blog post from SOURCE.md → BLOGPOST.md
|
||||||
write:
|
write:
|
||||||
$(ENV) && python3 generator.py write
|
@$(ENV) && python3 generator.py write
|
||||||
|
|
||||||
## Lefordítja BLOGPOST.md → TRANSLATED_BLOGPOST.md
|
## Translates BLOGPOST.md → TRANSLATED_BLOGPOST.md
|
||||||
translate:
|
translate:
|
||||||
$(ENV) && python3 generator.py translate
|
@$(ENV) && python3 generator.py translate
|
||||||
|
|
||||||
## Feltölti TRANSLATED_BLOGPOST.md-t a wikire
|
## Uploads TRANSLATED_BLOGPOST.md to the wiki
|
||||||
upload:
|
upload:
|
||||||
$(ENV) && python3 generator.py upload
|
@$(ENV) && python3 generator.py upload
|
||||||
|
|
||||||
## Törli az output mappából az .md fájlokat
|
## Deletes .md files from the output directory
|
||||||
clean:
|
clean:
|
||||||
$(ENV) && python3 generator.py clean
|
@$(ENV) && python3 generator.py clean
|
||||||
|
|
||||||
## Teljes pipeline: write → translate → upload
|
## Full pipeline: write → translate → upload
|
||||||
all: write translate upload
|
all: write translate upload
|
||||||
@@ -324,7 +324,7 @@ class BlogWriter:
|
|||||||
print(f"→ Cleaning {OUTPUT_DIR}/...")
|
print(f"→ Cleaning {OUTPUT_DIR}/...")
|
||||||
count = 0
|
count = 0
|
||||||
for filename in os.listdir(OUTPUT_DIR):
|
for filename in os.listdir(OUTPUT_DIR):
|
||||||
if filename.endswith(".md"):
|
if filename.endswith(".md") or filename.endswith(".txt"):
|
||||||
os.remove(os.path.join(OUTPUT_DIR, filename))
|
os.remove(os.path.join(OUTPUT_DIR, filename))
|
||||||
count += 1
|
count += 1
|
||||||
print(f"✓ Removed {count} Markdown files.")
|
print(f"✓ Removed {count} Markdown files.")
|
||||||
|
|||||||
Reference in New Issue
Block a user