From 570cefafbb81b061b68191db9510e3dbf5525352 Mon Sep 17 00:00:00 2001 From: ktyl Date: Mon, 4 Dec 2023 22:15:02 +0000 Subject: [PATCH] feat(journal): include specific journal paths --- src/garden/journal | 2 +- src/garden/journal.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/garden/journal.py diff --git a/src/garden/journal b/src/garden/journal index 95f85ea..170fb44 160000 --- a/src/garden/journal +++ b/src/garden/journal @@ -1 +1 @@ -Subproject commit 95f85eaa95c875d2aa7897c0120f72bf31ade907 +Subproject commit 170fb442a8c4a0c06b47e28821ab5fb475e35be1 diff --git a/src/garden/journal.py b/src/garden/journal.py new file mode 100644 index 0000000..8386d36 --- /dev/null +++ b/src/garden/journal.py @@ -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) + +