|
|
|
@ -59,24 +59,11 @@ class Soup(Bureau):
|
|
|
|
|
|
|
|
|
|
@add_command('tp', 'Print a short excerpt of a text')
|
|
|
|
|
def print_preview(self, data):
|
|
|
|
|
|
|
|
|
|
self.log.debug(f'print_preview data param: {data}')
|
|
|
|
|
|
|
|
|
|
filename, _ = data.split(".")
|
|
|
|
|
|
|
|
|
|
self.log.debug(f'filename: {filename}')
|
|
|
|
|
|
|
|
|
|
with open(os.path.join(self.mdir, 'contents', filename + '.txt'), 'r') as f:
|
|
|
|
|
text = f.read()
|
|
|
|
|
self.print_small(filename + '\n' + text[:200] + '...')
|
|
|
|
|
|
|
|
|
|
# @add_command("weave", "Weave two text together")
|
|
|
|
|
# def weave(self):
|
|
|
|
|
# self.print_small('Select the first text')
|
|
|
|
|
# text_a = input()
|
|
|
|
|
# self.print_small('Select the second text')
|
|
|
|
|
# text_b = input()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
|
sb = Soup()
|
|
|
|
|