Temp. fix for Gemini URIs; Add base for Mastodon support

This commit is contained in:
2022-06-30 18:50:18 +02:00
parent 28dbca3ea3
commit e0777bd143
9 changed files with 4094 additions and 9 deletions

View File

@ -22,11 +22,13 @@ OpenTags = (
'img')
def GemtextCompileList(Pages):
Cmd = ''
for File, Content, Titles, Meta, HTMLContent, Description, Image in Pages:
Src = 'public/{}.html.tmp'.format(StripExt(File))
WriteFile(Src, HTMLContent)
Src = 'public.gmi/{}.html.tmp'.format(StripExt(File))
WriteFile(Src, HTMLContent.replace('.html', '.gmi')) # TODO: Adjust links properly..
Dst = 'public.gmi/{}.gmi'.format(StripExt(File))
os.system('cat {} | html2gmi > {}'.format(Src, Dst))
Cmd += 'cat "{}" | html2gmi > "{}"; '.format(Src, Dst)
os.system(Cmd)
def FindEarliest(Str, Items):
Pos, Item = 0, ''