]> git.proxmox.com Git - mirror_frr.git/blobdiff - tools/render_md.py
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / tools / render_md.py
index 16c4bbe8a30e0446759a284a5919394d4d2a7861..80e26f341cd1a27aff314eb03ac690a3585f993c 100644 (file)
@@ -1,8 +1,9 @@
 #!/usr/bin/env python
+# SPDX-License-Identifier: NONE
 # written 2016 by David Lamparter, placed in Public Domain.
 import sys, markdown
 
-template = '''<html><head><meta charset="UTF-8"><style type="text/css">
+template = """<html><head><meta charset="UTF-8"><style type="text/css">
 body { max-width: 45em; margin: auto; margin-top: 2em; margin-bottom: 2em;
     font-family:Fira Sans,sans-serif; text-align: justify;
     counter-reset: ch2; }
@@ -18,11 +19,13 @@ img[alt~="float-right"] { float:right; margin-left:2em; margin-bottom:2em; }
 </style></head><body>
 %s
 </body></html>
-'''
+"""
 
-md = markdown.Markdown(extensions=['extra', 'toc'])
+md = markdown.Markdown(extensions=["extra", "toc"])
 
 for fn in sys.argv[1:]:
-    with open(fn, 'r') as ifd:
-        with open('%s.html' % (fn), 'w') as ofd:
-            ofd.write((template % (md.convert(ifd.read().decode('UTF-8')))).encode('UTF-8'))
+    with open(fn, "r") as ifd:
+        with open("%s.html" % (fn), "w") as ofd:
+            ofd.write(
+                (template % (md.convert(ifd.read().decode("UTF-8")))).encode("UTF-8")
+            )