[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-www] 01/10: make dirs if they don't exist
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-www] 01/10: make dirs if they don't exist |
Date: |
Mon, 06 Mar 2017 04:13:11 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository www.
commit df95abeb7a4a967553b08b3f4bbc5065aa4c63e2
Author: Florian Dold <address@hidden>
AuthorDate: Mon Mar 6 00:13:00 2017 +0100
make dirs if they don't exist
---
template.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/template.py b/template.py
index 179e32a..ed8f47e 100755
--- a/template.py
+++ b/template.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# This file is in the public domain.
#
# This script runs the jinga2 templating engine on an input template-file
@@ -15,6 +15,7 @@ import gettext
import jinja2
import glob
import codecs
+import os
env =
jinja2.Environment(loader=jinja2.FileSystemLoader(os.path.dirname(__file__)),
extensions=["jinja2.ext.i18n"],
@@ -51,5 +52,6 @@ for in_file in glob.glob("*.j2"):
content = tmpl.render(lang=locale, url=url,
self_localized=self_localized, url_localized=url_localized)
out_name = "./" + locale + "/" + in_file.rstrip(".j2")
+ os.makedirs("./" + locale, exist_ok=True)
with codecs.open(out_name, "w", "utf-8") as f:
f.write(content)
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [taler-www] branch master updated (9d4d87c -> 61ac0e3), gnunet, 2017/03/05
- [GNUnet-SVN] [taler-www] 10/10: faq, gnunet, 2017/03/05
- [GNUnet-SVN] [taler-www] 07/10: missing files, gnunet, 2017/03/05
- [GNUnet-SVN] [taler-www] 01/10: make dirs if they don't exist,
gnunet <=
- [GNUnet-SVN] [taler-www] 03/10: shorter taxable point, privacy friendly, gnunet, 2017/03/05
- [GNUnet-SVN] [taler-www] 08/10: remove empty section, gnunet, 2017/03/05
- [GNUnet-SVN] [taler-www] 05/10: clean up main page, gnunet, 2017/03/05
- [GNUnet-SVN] [taler-www] 04/10: advantages instead of acronym expansion, gnunet, 2017/03/05
- [GNUnet-SVN] [taler-www] 09/10: footer, gnunet, 2017/03/05
- [GNUnet-SVN] [taler-www] 02/10: factor out base template, gnunet, 2017/03/05
- [GNUnet-SVN] [taler-www] 06/10: conversion/text, gnunet, 2017/03/05