lectures.alex.balgavy.eu

Lecture notes from university.
git clone git://git.alex.balgavy.eu/lectures.alex.balgavy.eu.git
Log | Files | Refs | Submodules

commit 53ee825d0218bdca142f19ec4d6807f77b568ad6
parent 8533ba691222313735fea051017a04079e1ddebb
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Sat,  3 Oct 2020 23:44:49 +0200

Sed script to convert vimwiki syntax to markdown with Zola frontmatter

Diffstat:
Afrom_vimwiki.sed | 16++++++++++++++++
1 file changed, 16 insertions(+), 0 deletions(-)

diff --git a/from_vimwiki.sed b/from_vimwiki.sed @@ -0,0 +1,16 @@ +/^%template/ { + i\ + +++ + s/%template math/template = 'page-math.html'/ + /^=/s/^==* \([^=]*\) ==*$/title = '\1'/ + a\ + +++ +} +s/{{local:\([^|]*\)|\([^}]*\)}}/![\2](\1)/ +s/\[\[\([^|]*\)|\([^\]]*\)\]\]/[\2](\1)/ +s/^= \([^=]*\) =$/# \1/ +s/^== \([^=]*\) ==$/## \1/ +s/^=== \([^=]*\) ===$/### \1/ +s/^==== \([^=]*\) ====$/#### \1/ +s/^===== \([^=]*\) =====$/##### \1/ +s/^====== \([^=]*\) ======$/###### \1/