mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Meta: Remove 'keymap exploration' in favor of precommit hook
This commit is contained in:
parent
1d394b8a76
commit
a6ed034f89
Notes:
sideshowbarker
2024-07-18 22:38:42 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/a6ed034f893 Pull-request: https://github.com/SerenityOS/serenity/pull/5220
1 changed files with 1 additions and 21 deletions
|
@ -102,27 +102,7 @@ def run_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__':
|
||||
os.chdir(os.path.dirname(__file__) + "/../Base/res/keymaps/")
|
||||
if len(sys.argv) == 1:
|
||||
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)
|
||||
if not run_here():
|
||||
exit(1)
|
||||
|
|
Loading…
Reference in a new issue