From e5f7b3b511893ddedf574d2003728c6fec2ce27a Mon Sep 17 00:00:00 2001 From: Guy Godfroy Date: Thu, 3 Dec 2020 16:37:48 +0100 Subject: [PATCH] use new parameter rellink_func --- geminer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/geminer.py b/geminer.py index c27206c..d0958bc 100755 --- a/geminer.py +++ b/geminer.py @@ -17,6 +17,10 @@ tpl_path = os.path.expanduser(config.tpl_dir) os.chdir(md_path) +def add_ext_gmi(link): + # Custom function to apply to local links + return link+".gmi" + # Walk through markdown directories for dirname, subdirlist, mdlist in os.walk('.'): @@ -62,7 +66,7 @@ for dirname, subdirlist, mdlist in os.walk('.'): plain=config.plain, strip_html=config.strip_html, base_url=config.base_url, - md_links=True, + rellink_func=add_ext_gmi, table_tag=config.table_tag )