mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:57:45 +00:00
Meta: Remove 'keymap exploration' in favor of precommit hook
This commit is contained in:
parent
1d394b8a76
commit
a6ed034f89
1 changed files with 1 additions and 21 deletions
|
@ -102,27 +102,7 @@ def run_here():
|
||||||
return run_with(list_files_here())
|
return run_with(list_files_here())
|
||||||
|
|
||||||
|
|
||||||
def display_for(filename, index):
|
|
||||||
with open(filename, 'r') as fp:
|
|
||||||
fullmap = json.load(fp)
|
|
||||||
for name in PERMITTED_MAPS:
|
|
||||||
c = None
|
|
||||||
if name in fullmap:
|
|
||||||
m = fullmap[name]
|
|
||||||
if len(m) > index and m[index]:
|
|
||||||
c = m[index]
|
|
||||||
if c is None:
|
|
||||||
print('{}: None'.format(name))
|
|
||||||
else:
|
|
||||||
print('{}: "{}"'.format(name, c))
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
os.chdir(os.path.dirname(__file__) + "/../Base/res/keymaps/")
|
os.chdir(os.path.dirname(__file__) + "/../Base/res/keymaps/")
|
||||||
if len(sys.argv) == 1:
|
if not run_here():
|
||||||
exit(0 if run_here() else 1)
|
|
||||||
elif len(sys.argv) == 3:
|
|
||||||
display_for('{}.json'.format(sys.argv[1]), int(sys.argv[2], 0))
|
|
||||||
else:
|
|
||||||
print('USAGE: {} [mapcode index]'.format(sys.argv[0]), file=sys.stderr)
|
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue