meta-pages #1
16
geminer.py
16
geminer.py
|
@ -61,13 +61,6 @@ for dirname, subdirlist, mdlist in os.walk('.'):
|
||||||
# For now, tags list must be a comma-separated string
|
# For now, tags list must be a comma-separated string
|
||||||
# TODO: make possible to list tags as a YAML list
|
# TODO: make possible to list tags as a YAML list
|
||||||
|
|
||||||
posts_meta.append({
|
|
||||||
"title": title,
|
|
||||||
"author": author,
|
|
||||||
"date": date,
|
|
||||||
"tags": tags
|
|
||||||
})
|
|
||||||
|
|
||||||
for item in config.replace:
|
for item in config.replace:
|
||||||
mdtext = mdtext.replace(item[0],item[1])
|
mdtext = mdtext.replace(item[0],item[1])
|
||||||
|
|
||||||
|
@ -115,6 +108,15 @@ for dirname, subdirlist, mdlist in os.walk('.'):
|
||||||
gmifile = basename
|
gmifile = basename
|
||||||
if config.gmi_extension:
|
if config.gmi_extension:
|
||||||
gmifile += ".gmi"
|
gmifile += ".gmi"
|
||||||
|
|
||||||
|
posts_meta.append({
|
||||||
|
"title": title,
|
||||||
|
"author": author,
|
||||||
|
"date": date,
|
||||||
|
"tags": tags,
|
||||||
|
"filename": gmifile
|
||||||
|
})
|
||||||
|
|
||||||
print(gmi_subpath+"/"+gmifile)
|
print(gmi_subpath+"/"+gmifile)
|
||||||
with open(gmi_subpath+"/"+gmifile, 'w') as gmi:
|
with open(gmi_subpath+"/"+gmifile, 'w') as gmi:
|
||||||
gmi.write(gmitext)
|
gmi.write(gmitext)
|
||||||
|
|
Loading…
Reference in New Issue