commit dc8c83534b91af7a6880a201ed35fc257468ef4f
parent 7478d6ca1abd589b795257f0b141a7678d5a3d08
Author: Matthias Balk <mbalk@mbalk.de>
Date: Wed, 3 Feb 2021 13:50:44 +0100
create 'config.py' from 'config.tpl' on setup
Diffstat:
4 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1,3 +1,5 @@
__pycache__
tags
env
+
+/src/config.py
diff --git a/Makefile b/Makefile
@@ -1,3 +1,7 @@
-setup:
+setup: src/config.py
virtualenv -p python3 env
. env/bin/activate && pip install -r requirements-freeze.txt
+
+src/config.py: src/config.tpl
+ if [ -f src/config.py ]; then cp src/config.py src/config.py~; fi
+ cp src/config.tpl src/config.py
diff --git a/src/config.py b/src/config.py
@@ -1,12 +0,0 @@
-from datetime import timedelta
-from os import path
-
-CAL_DIR = path.expanduser('~/.ya3/')
-
-DEFAULTS = {
- 'LOCATION': 'Besprechungsraum I',
- 'SUMMARY': 'Meeting'
-}
-
-MAX_AGE = timedelta(hours=6)
-MAX_AHEAD = timedelta(days=14)
diff --git a/src/config.tpl b/src/config.tpl
@@ -0,0 +1,12 @@
+from datetime import timedelta
+from os import path
+
+CAL_DIR = path.expanduser('~/.ya3/')
+
+DEFAULTS = {
+ 'LOCATION': 'Room I',
+ 'SUMMARY': 'Meeting'
+}
+
+MAX_AGE = timedelta(hours=6)
+MAX_AHEAD = timedelta(days=14)