feat(journal): include specific journal paths
continuous-integration/drone/push Build is failing Details

This commit is contained in:
ktyl 2023-12-04 22:15:02 +00:00
parent 36af38e908
commit 570cefafbb
2 changed files with 31 additions and 1 deletions

@ -1 +1 @@
Subproject commit 95f85eaa95c875d2aa7897c0120f72bf31ade907 Subproject commit 170fb442a8c4a0c06b47e28821ab5fb475e35be1

30
src/garden/journal.py Normal file
View File

@ -0,0 +1,30 @@
#!/usr/bin/env python
import sys
import os
import md2html
def print_usage():
print(f"usage: python {sys.argv[0]} PATHS")
print("")
print("\t\PATHS\tpaths of input markdown files")
if len(sys.argv) < 2:
print_usage()
exit(1)
# we don't want to publish *everything* in the journal, so for now let's just
# hardcode the files we want.
files = sys.argv[1:]
# TODO: copy images
# TODO: separate md fromm images
for f in files:
md2html.write_html(f)
html_path = f.replace(".md", ".html")
print(html_path)