diff options
author | Rob Austein <sra@hactrn.net> | 2021-02-16 06:46:38 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2021-02-16 06:46:38 +0000 |
commit | a4a027a6700e1197a50b24bdfbde1697049b7348 (patch) | |
tree | 6d0c71cdb020bb7b6725414ed5ca50a97d5f20e2 /extract.py | |
parent | 61a631cbcf8c584dd8adde13d26d005eb4675935 (diff) |
Refactor Wiki2Markdown as class
Makes portions of the mess clearer, not as much as I'd hoped.
With a bit more work we could fold header-crunching into the existing
regexp mechanism, but code blocks, links, and tables require state.
Diffstat (limited to 'extract.py')
-rwxr-xr-x | extract.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -92,6 +92,8 @@ def main(): os.link("pelicanconf.py", "pelican/pelicanconf.py") + wiki_to_markdown = trac2md.Trac2Markdown() + keep = Filter() first_published = {} @@ -105,7 +107,7 @@ def main(): #print(slug, row.version) with open("wiki/{}.trac".format(slug), "w") as f: f.write(row.text) - md = markdown_header(row, first_published) + trac2md.WikiToMD(row.text, slug) + md = markdown_header(row, first_published) + wiki_to_markdown(row.text, slug) with open("pelican/content/{}.md".format(slug), "w") as f: f.write(md) |