From aecfd2afe9622f5256f67a54105830ba5440fbc8 Mon Sep 17 00:00:00 2001

From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= jaakko.keranen@iki.fi

Date: Mon, 30 Dec 2024 20:42:35 +0200

Subject: [PATCH 1/1] Added editable license metadata field


booster.py | 25 ++++++++++++++++++++++---

1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/booster.py b/booster.py

index 81eccc1..3af9b7e 100755

--- a/booster.py

+++ b/booster.py

@@ -70,7 +70,7 @@ def report_error(code, msg):

class Tinylog:

 TIME_FORMAT  = '%Y-%m-%d %H:%M:%S %Z'

 MONTH_FORMAT = '/%Y/%m/'

 YEAR_FORMAT  = '/%Y/'

@@ -80,6 +80,7 @@ class Tinylog:

     self.info     = ''

     self.author   = ''

     self.avatar   = ''

     self.entries  = {}   # timestamp -> text

     self.editable = editable

     self.base_url = base_url

@@ -104,6 +105,8 @@ class Tinylog:

                     self.avatar = line[7:].strip()

                 elif line.startswith('author:'):

                     self.author = line[7:].strip()

                 else:

                     self.info += line

             else:

@@ -186,10 +189,12 @@ class Tinylog:

                     label = time.strftime('%B %Y' if is_recent else '%Y', tm)

                     output += f'=> gemini://{self.base_url}{cur_month} Archived: {label}\n'

                 output += f'author: {self.author}\n'

                 output += f'avatar: {self.avatar}\n'

             if is_editable:

                 output += f'=> gemini://{self.base_url}/edit Edit metadata\n'

                 output += f'\n=> titan://{self.base_url} New post\n'

@@ -312,6 +317,9 @@ for file_group in CONFIG['files']:

             print()

             print(tinylog.avatar)

             print(f'=> gemini://{tinylog.base_url}/avatar Edit avatar')

             sys.exit(0)

         if path_info == '/title' and is_authorized:

@@ -347,6 +355,17 @@ for file_group in CONFIG['files']:

             tinylog.write()

             report_error(30, f'gemini://{tinylog.base_url}/edit')

         if req_edit and is_authorized:

             if path_info == '/info':

                 print('20 text/gemini;charset=utf-8\r\n' + tinylog.info)

--

2.25.1

Proxy Information
Original URL
gemini://git.skyjake.fi/booster/main/patch/aecfd2afe9622f5256f67a54105830ba5440fbc8.patch
Status Code
Success (20)
Meta
text/plain
Capsule Response Time
28.208646 milliseconds
Gemini-to-HTML Time
0.876117 milliseconds

This content has been proxied by September (ba2dc).