|
|
@ -14,6 +14,14 @@ binding_accept = [ord('l'), ord(' '), ord('\n')]
|
|
|
|
binding_back = [ord('h'), ord('q'), curses.KEY_BACKSPACE]
|
|
|
|
binding_back = [ord('h'), ord('q'), curses.KEY_BACKSPACE]
|
|
|
|
binding_exit = [ord('Q')]
|
|
|
|
binding_exit = [ord('Q')]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def stretch(text, length, char = ' '):
|
|
|
|
|
|
|
|
missing = length - len(text)
|
|
|
|
|
|
|
|
if 0 < missing:
|
|
|
|
|
|
|
|
text += char * missing
|
|
|
|
|
|
|
|
elif missing < 0:
|
|
|
|
|
|
|
|
text = text[0:length]
|
|
|
|
|
|
|
|
return text
|
|
|
|
|
|
|
|
|
|
|
|
def build_description(base_dir, desc_path):
|
|
|
|
def build_description(base_dir, desc_path):
|
|
|
|
rel_path = desc_path.relative_to(base_dir)
|
|
|
|
rel_path = desc_path.relative_to(base_dir)
|
|
|
|
parts = list(rel_path.parts[:-1])
|
|
|
|
parts = list(rel_path.parts[:-1])
|
|
|
|