Implement char-list as config-get for now

This commit is contained in:
Tim Van Baak 2020-01-20 19:59:41 -08:00
parent ccc027d5ef
commit 5e25c433ee
1 changed files with 12 additions and 1 deletions

View File

@ -257,7 +257,18 @@ def command_char_list(args):
""" """
List all characters in a lexicon List all characters in a lexicon
""" """
raise NotImplementedError() # TODO import json
# Module imports
from lexicon import LexiconModel
# Verify arguments
lex = LexiconModel.by(name=args.lexicon)
if lex is None:
logger.error("Could not find lexicon '{}'".format(args.lexicon))
return -1
# Internal call
print(json.dumps(lex.character, indent=2))
# #
# Procedural commands # Procedural commands