diff options
| author | alex <alex@pdp7.net> | 2026-02-15 10:42:00 +0100 |
|---|---|---|
| committer | alex <alex@pdp7.net> | 2026-02-15 10:42:00 +0100 |
| commit | cc5d4e07146da033ded55c216b41378bca9a10b4 (patch) | |
| tree | 0fb4e8dff5d64a9c47d02706716e4377a81a6d04 /gemini-to-web/src/gemini_to_web/__init__.py | |
| parent | 144273180f8b4fdcc3356bbe72c7bdc799f2c6eb (diff) | |
Add RSS generation
Remove old deprecated CLI converter in __init__
Diffstat (limited to 'gemini-to-web/src/gemini_to_web/__init__.py')
| -rw-r--r-- | gemini-to-web/src/gemini_to_web/__init__.py | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/gemini-to-web/src/gemini_to_web/__init__.py b/gemini-to-web/src/gemini_to_web/__init__.py index 0b2b70e..827031f 100644 --- a/gemini-to-web/src/gemini_to_web/__init__.py +++ b/gemini-to-web/src/gemini_to_web/__init__.py @@ -1,25 +1,4 @@ -import argparse -import pathlib -import shutil +import re -import htmlgenerator -from gemini_to_web import html - -def converter(): - parser = argparse.ArgumentParser() - parser.add_argument("source", type=pathlib.Path) - parser.add_argument("target", type=pathlib.Path) - args = parser.parse_args() - - shutil.copytree(args.source, args.target) - for gmi in args.target.glob("**/*.gmi"): - html_path = gmi.with_suffix(".html") - html_path.write_text( - html.pretty( - htmlgenerator.render( - html.to_html(gmi.read_text()), - {} - ) - ) - ) +ENTRY_ELEMENT_TITLE = re.compile(r"^(\d{4}-\d{2}-\d{2}) (.*)$") |
