Refactoring step.
This commit is contained in:
parent
f7dab42239
commit
924d9ec0f9
1 changed files with 4 additions and 4 deletions
|
@ -5,8 +5,9 @@
|
|||
|
||||
import sys
|
||||
|
||||
def report(tabcolumn, binding, description):
|
||||
def report(binding, description):
|
||||
"Reporter suitable for a wiki inclusion"
|
||||
tabcolumn=-32
|
||||
print " %*s%s" % (tabcolumn, binding, description)
|
||||
|
||||
def strip(st):
|
||||
|
@ -14,7 +15,6 @@ def strip(st):
|
|||
st = st[1:-1]
|
||||
return st
|
||||
|
||||
tabcolumn=-32
|
||||
|
||||
in_keydef = False
|
||||
entry = {}
|
||||
|
@ -22,7 +22,7 @@ for line in sys.stdin:
|
|||
line=line.strip()
|
||||
if line.startswith("#!"):
|
||||
(key, explanation) = line.split("=")
|
||||
report(tabcolumn, key[3:], explanation)
|
||||
report(key[3:], explanation)
|
||||
elif line.startswith("#"):
|
||||
continue
|
||||
elif line == "[hotkey]":
|
||||
|
@ -35,7 +35,7 @@ for line in sys.stdin:
|
|||
if mod in entry and entry[mod] == 'yes':
|
||||
binding += mod + "-"
|
||||
binding += strip(entry['key'])
|
||||
report(tabcolumn, binding, strip(entry['description']))
|
||||
report(binding, strip(entry['description']))
|
||||
in_keydef = False
|
||||
entry = {}
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue