Christian Fraß commited on 2017-04-17 22:19:08
Zeige 420 geänderte Dateien mit 51 Einfügungen und 8 Löschungen.
... | ... |
@@ -0,0 +1,21 @@ |
1 |
+#!/usr/bin/env python3 |
|
2 |
+ |
|
3 |
+import os as _os |
|
4 |
+import json as _json |
|
5 |
+ |
|
6 |
+ |
|
7 |
+def main(): |
|
8 |
+ data = [] |
|
9 |
+ folder = "concepts/json" |
|
10 |
+ for name in _os.listdir(folder): |
|
11 |
+ path = _os.path.join(folder, name) |
|
12 |
+ handle = open(path, "r") |
|
13 |
+ content = handle.read() |
|
14 |
+ handle.close() |
|
15 |
+ entry = _json.loads(content) |
|
16 |
+ data.append(entry) |
|
17 |
+ print(_json.dumps(data)) |
|
18 |
+ |
|
19 |
+ |
|
20 |
+main() |
|
21 |
+ |
... | ... |
@@ -0,0 +1,17 @@ |
1 |
+#!/usr/bin/env sh |
|
2 |
+ |
|
3 |
+path=words.json |
|
4 |
+python3 tools/merge.py > ${path} |
|
5 |
+ |
|
6 |
+destination=mehl:/home/bfadmin/websites/folksprak.org/htdocs |
|
7 |
+rsync \ |
|
8 |
+ --verbose \ |
|
9 |
+ --archive \ |
|
10 |
+ --compress \ |
|
11 |
+ --recursive \ |
|
12 |
+ --rsh=ssh \ |
|
13 |
+ ${path} \ |
|
14 |
+ ${destination}/ |
|
15 |
+ |
|
16 |
+rm ${path} |
|
17 |
+ |
... | ... |
@@ -7,8 +7,10 @@ import common as _common |
7 | 7 |
|
8 | 8 |
def main(args): |
9 | 9 |
_common.filemap( |
10 |
- "concepts", _common.json_from, |
|
11 |
- "temp/dokuwiki", _common.dokuwiki_to, |
|
10 |
+ "concepts/json", |
|
11 |
+ _common.json_from, |
|
12 |
+ "concepts/wiki", |
|
13 |
+ _common.dokuwiki_to, |
|
12 | 14 |
lambda name_from: ("concept_%u.txt" % (int(name_from.split(".")[0].split("_")[1]))) |
13 | 15 |
) |
14 | 16 |
|
... | ... |
@@ -7,8 +7,10 @@ import common as _common |
7 | 7 |
|
8 | 8 |
def main(args): |
9 | 9 |
_common.filemap( |
10 |
- "temp/dokuwiki", _common.dokuwiki_from, |
|
11 |
- "concepts", _common.json_to, |
|
10 |
+ "concepts/wiki", |
|
11 |
+ _common.dokuwiki_from, |
|
12 |
+ "concepts/json", |
|
13 |
+ _common.json_to, |
|
12 | 14 |
lambda name_from: ("concept_%u.json" % (int(name_from.split(".")[0].split("_")[1]))) |
13 | 15 |
) |
14 | 16 |
|
15 | 17 |