=> aecfd2afe9622f5256f67a54105830ba5440fbc8
[1mdiff --git a/booster.py b/booster.py[m [1mindex 81eccc1..3af9b7e 100755[m [1m--- a/booster.py[m [1m+++ b/booster.py[m [36m@@ -70,7 +70,7 @@[m [mdef report_error(code, msg):[m [m class Tinylog:[m TIME_FORMAT = '%Y-%m-%d %H:%M:%S %Z'[m [31m- PATH_FORMAT = '/%Y/%m/%d/%H.%M.%S.%Z'[m [32m+[m[32m PATH_FORMAT = '/%Y/%m/%d/%H.%M.%S.%Z' # directly linking to an entry[m MONTH_FORMAT = '/%Y/%m/'[m YEAR_FORMAT = '/%Y/'[m [m [36m@@ -80,6 +80,7 @@[m [mclass Tinylog:[m self.info = ''[m self.author = ''[m self.avatar = ''[m [32m+[m[32m self.license = ''[m self.entries = {} # timestamp -> text[m self.editable = editable[m self.base_url = base_url[m [36m@@ -104,6 +105,8 @@[m [mclass Tinylog:[m self.avatar = line[7:].strip()[m elif line.startswith('author:'):[m self.author = line[7:].strip()[m [32m+[m[32m elif line.startswith('license:'):[m [32m+[m[32m self.license = line[8:].strip()[m else:[m self.info += line[m else:[m [36m@@ -186,10 +189,12 @@[m [mclass Tinylog:[m label = time.strftime('%B %Y' if is_recent else '%Y', tm)[m output += f'=> gemini://{self.base_url}{cur_month} Archived: {label}\n'[m [m [31m- if self.author or self.avatar:[m [31m- #if self.info: output += '\n'[m [32m+[m[32m if self.author:[m output += f'author: {self.author}\n'[m [32m+[m[32m if self.avatar:[m output += f'avatar: {self.avatar}\n'[m [32m+[m[32m if self.license:[m [32m+[m[32m output += f'license: {self.license}\n'[m if is_editable:[m output += f'=> gemini://{self.base_url}/edit Edit metadata\n'[m output += f'\n=> titan://{self.base_url} New post\n'[m [36m@@ -312,6 +317,9 @@[m [mfor file_group in CONFIG['files']:[m print()[m print(tinylog.avatar)[m print(f'=> gemini://{tinylog.base_url}/avatar Edit avatar')[m [32m+[m[32m print()[m [32m+[m[32m print(tinylog.license)[m [32m+[m[32m print(f'=> gemini://{tinylog.base_url}/license Edit license')[m sys.exit(0)[m [m if path_info == '/title' and is_authorized:[m [36m@@ -347,6 +355,17 @@[m [mfor file_group in CONFIG['files']:[m tinylog.write()[m report_error(30, f'gemini://{tinylog.base_url}/edit')[m [m [32m+[m[32m if path_info == '/license' and is_authorized:[m [32m+[m[32m if not req_query:[m [32m+[m[32m report_error(10, 'Enter license:')[m [32m+[m[32m elif req_query == '-':[m [32m+[m[32m req_query = ''[m [32m+[m[32m else:[m [32m+[m[32m req_query = req_query.strip()[m [32m+[m[32m tinylog.license = req_query[m [32m+[m[32m tinylog.write()[m [32m+[m[32m report_error(30, f'gemini://{tinylog.base_url}/edit')[m [32m+[m if req_edit and is_authorized:[m if path_info == '/info':[m print('20 text/gemini;charset=utf-8\r\n' + tinylog.info)[m
text/gemini; charset=utf-8
This content has been proxied by September (3851b).