Source code of my website
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
personal_website/addsec.py

27 lines
583 B

#!/usr/bin/env python
from pandocfilters import toJSONFilter, Header
import sys
def behead(key, value, format, meta):
if key == "Header" and value[0] >= 2:
return Header(
value[0],
value[1],
[
{
"t": "Link",
"c": [
["", [], []],
value[2],
["#" + value[1][0], ""],
],
}
],
)
return None
if __name__ == "__main__":
toJSONFilter(behead)