Commit Diff
Diff:
d212e35546cd5987e8656e685ed0e745c96db03f
de1c2a0cd3fa48ec4bddf7b3961767db20f36763
Commit:
de1c2a0cd3fa48ec4bddf7b3961767db20f36763
Tree:
02ef5b7fd186eac24d52c6b3b4e7269b3e9abf48
Author:
Fred. Galusik <dev@galusik.fr>
Committer:
Fred. Galusik <dev@galusik.fr>
Date:
Thu Jul 9 18:27:58 2020 UTC
Message:
use f-string
blob - 6c513afe0a6e571a0a4cff16deed46260175ca24
blob + c30c5e55178c9ee37e8984e54063e74c2be05fcf
--- babille.py
+++ babille.py
@@ -104,8 +104,8 @@ def gen_sitemap():
sm.write("<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n")
for item in files_in_dir:
sm.write(" <url>\n")
- sm.write(" <loc>" + item.replace(output_dir, siteroot) + "</loc>\n")
- sm.write(" <lastmod>" + today + "</lastmod>\n")
+ sm.write(f" <loc>{item.replace(output_dir, siteroot)}</loc>\n")
+ sm.write(f" <lastmod>{today}</lastmod>\n")
sm.write(" </url>\n")
sm.write("</urlset>\n")
Frédéric Galusik