From 89ac1c1ce372885940dd0fb2ab6a84709700f80d Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Fri, 2 Feb 2018 18:56:50 +0000 Subject: [PATCH] Implement loading/saving all configuration files at once --- conf/help.json | 2 +- conf/keyword.json | 2 +- threshold | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/conf/help.json b/conf/help.json index 0d8ac61..b505b6c 100644 --- a/conf/help.json +++ b/conf/help.json @@ -16,4 +16,4 @@ "save": "save ", "load": "load ", "dist": "dist" -} +} \ No newline at end of file diff --git a/conf/keyword.json b/conf/keyword.json index cd5374c..3980412 100644 --- a/conf/keyword.json +++ b/conf/keyword.json @@ -3,4 +3,4 @@ "example" ], "KeywordsExcept": {} -} +} \ No newline at end of file diff --git a/threshold b/threshold index 162e107..f7c4b97 100755 --- a/threshold +++ b/threshold @@ -512,6 +512,11 @@ class Helper(object): self.save(spl[1]) success("Saved %s to %s" % (spl[1], filemap[spl[1]][0])) return + elif spl[1] == "all": + for i in filemap.keys(): + helper.save(i) + success("Saved %s from %s" % (i, filemap[i][0])) + return else: incUsage("save") return @@ -525,6 +530,11 @@ class Helper(object): self.load(spl[1]) success("Loaded %s from %s" % (spl[1], filemap[spl[1]][0])) return + elif spl[1] == "all": + for i in filemap.keys(): + helper.load(i) + success("Loaded %s from %s" % (i, filemap[i][0])) + return else: incUsage("load") return