going-flying.com gemini git repository
5ec805e57800f8f5975085087f4acc266be37b83 - Matthew Ernisse - 1596986542
play with the thoughts renderer a bit
diff --git a/files/thoughts-to-gemini.py b/files/thoughts-to-gemini.py index 55906e7..7efe220 100755 --- a/files/thoughts-to-gemini.py +++ b/files/thoughts-to-gemini.py @@ -38,7 +38,7 @@ import time from bs4 import BeautifulSoup -entry_template = '''===>> [ {{ entry.date }} ] +entry_template = '''╒═════╣▒ {{ entry.date }} ▒╟──────────┘ > {{ entry.message }} {% if 'attachment' in entry.keys() %} @@ -69,9 +69,12 @@ index_template = '''``` {% endfor %} {% endfor %} {% endfor %} +Ω # 🕰️ Generated at {{ build_time }} + +🚀 © MMXX matt@going-flying.com ''' class DeHTMLizer(object): @@ -124,6 +127,8 @@ class DeHTMLizer(object): if tag.name == 'a': self.links.append(tag['href']) num = len(self.links) + if not tag.string: + return f'«{tag["href"]}[{num}]»' return f'«{tag.string}[{num}]»'