Compare commits
2 Commits
377278b88f
...
e5f7b3b511
Author | SHA1 | Date |
---|---|---|
|
e5f7b3b511 | |
|
435e3d698d |
|
@ -9,7 +9,7 @@ import locale
|
||||||
import config
|
import config
|
||||||
|
|
||||||
# locale (for templates, for example dates rendering)
|
# locale (for templates, for example dates rendering)
|
||||||
locale = "fr_FR.utf8"
|
locale.setlocale(locale.LC_ALL, config.locale)
|
||||||
|
|
||||||
md_path = os.path.expanduser(config.md_dir)
|
md_path = os.path.expanduser(config.md_dir)
|
||||||
gmi_path = os.path.expanduser(config.gmi_dir)
|
gmi_path = os.path.expanduser(config.gmi_dir)
|
||||||
|
@ -17,6 +17,10 @@ tpl_path = os.path.expanduser(config.tpl_dir)
|
||||||
|
|
||||||
os.chdir(md_path)
|
os.chdir(md_path)
|
||||||
|
|
||||||
|
def add_ext_gmi(link):
|
||||||
|
# Custom function to apply to local links
|
||||||
|
return link+".gmi"
|
||||||
|
|
||||||
# Walk through markdown directories
|
# Walk through markdown directories
|
||||||
for dirname, subdirlist, mdlist in os.walk('.'):
|
for dirname, subdirlist, mdlist in os.walk('.'):
|
||||||
|
|
||||||
|
@ -62,7 +66,7 @@ for dirname, subdirlist, mdlist in os.walk('.'):
|
||||||
plain=config.plain,
|
plain=config.plain,
|
||||||
strip_html=config.strip_html,
|
strip_html=config.strip_html,
|
||||||
base_url=config.base_url,
|
base_url=config.base_url,
|
||||||
md_links=True,
|
rellink_func=add_ext_gmi,
|
||||||
table_tag=config.table_tag
|
table_tag=config.table_tag
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue