summaryrefslogtreecommitdiff
path: root/asciifarm/client/main.py
diff options
context:
space:
mode:
authortroido <troido@hotmail.com>2018-04-14 18:13:19 +0200
committertroido <troido@hotmail.com>2018-04-14 18:13:19 +0200
commitaa5b7c9d753f6f140d7f55d0089e6e19028031b7 (patch)
tree6573cbda9383c9f12a625f95bd48bbd20cfd3f22 /asciifarm/client/main.py
parentb15f89a3576b98f57ff1ec083e9299c890c1f7fc (diff)
Stopped using hy for keybindings
keybindings are now a JSON format. Somehow hy errored for me, and the cleanest solution seemed not to use hy at all Thinking about it, the client was basically loading a new interpreter to optimize something that didn't need optimizing. It didn't make it more readable/writable either, and it always was a lot of hassle.
Diffstat (limited to 'asciifarm/client/main.py')
-rwxr-xr-xasciifarm/client/main.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/asciifarm/client/main.py b/asciifarm/client/main.py
index 1a4ac51..ece3c5a 100755
--- a/asciifarm/client/main.py
+++ b/asciifarm/client/main.py
@@ -15,7 +15,7 @@ charMapPath = os.path.join(farmsPath, "charmaps")
keybindingsPath = os.path.join(farmsPath, "keybindings")
standardCharFiles = [name[:-5] for name in os.listdir(charMapPath) if name[-5:] == ".json"]
-standardKeyFiles = [name[:-3] for name in os.listdir(keybindingsPath) if name[-3:] == ".hy"]
+standardKeyFiles = [name[:-5] for name in os.listdir(keybindingsPath) if name[-5:] == ".json"]
defaultAdresses = {
@@ -54,9 +54,10 @@ def main(argv=None):
keyFile = args.keybindings
if keyFile in standardKeyFiles:
- keyFile = os.path.join(keybindingsPath, keyFile + ".hy")
+ keyFile = os.path.join(keybindingsPath, keyFile + ".json")
with open(keyFile, 'r') as kf:
- keybindings = kf.read()
+ # todo: support yaml
+ keybindings = json.load(kf)
address = args.address
if address is None: