From 2f691416e159fa6a1fc5413bbec3f86acb3096ab Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 11 Apr 2017 18:30:30 +0200 Subject: Config files cleaned up --- .gitattributes | 2 +- config.json | Bin 149 -> 0 bytes config/dates.json | 3 +++ config/db.json | Bin 0 -> 149 bytes config/test-dates.json | 4 ++++ dates.json | 3 --- pyranking/db.py | 2 +- test-dates.json | 4 ---- 8 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 config.json create mode 100644 config/dates.json create mode 100644 config/db.json create mode 100644 config/test-dates.json delete mode 100644 dates.json delete mode 100644 test-dates.json diff --git a/.gitattributes b/.gitattributes index 7daec9b..17366f1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -config.json filter=git-crypt diff=git-crypt +config/db.json filter=git-crypt diff=git-crypt diff --git a/config.json b/config.json deleted file mode 100644 index 9db40bf..0000000 Binary files a/config.json and /dev/null differ diff --git a/config/dates.json b/config/dates.json new file mode 100644 index 0000000..7dfdd66 --- /dev/null +++ b/config/dates.json @@ -0,0 +1,3 @@ +{ + "2016-12-31": "." +} diff --git a/config/db.json b/config/db.json new file mode 100644 index 0000000..9db40bf Binary files /dev/null and b/config/db.json differ diff --git a/config/test-dates.json b/config/test-dates.json new file mode 100644 index 0000000..f417da7 --- /dev/null +++ b/config/test-dates.json @@ -0,0 +1,4 @@ +{ + "2016-12-31": "2017-01.html", + "2017-04-30": "." +} diff --git a/dates.json b/dates.json deleted file mode 100644 index e3fbcd5..0000000 --- a/dates.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "2016-12-31": "" -} diff --git a/pyranking/db.py b/pyranking/db.py index d28147d..16595d3 100644 --- a/pyranking/db.py +++ b/pyranking/db.py @@ -1,7 +1,7 @@ import json import mysql.connector -settings = json.load(file('config.json')) +settings = json.load(file('config/db.json')) connection = mysql.connector.connect( user=settings['user'], diff --git a/test-dates.json b/test-dates.json deleted file mode 100644 index f3692ae..0000000 --- a/test-dates.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "2016-12-31": "2017-01.html", - "2017-04-30": "" -} -- cgit v1.2.3