|
|
|
@ -59,10 +59,11 @@ class Soup(Bureau):
|
|
|
|
|
|
|
|
|
|
@add_command('tp', 'Print a short excerpt of a text')
|
|
|
|
|
def print_preview(self, data):
|
|
|
|
|
filename, _ = data.split(".")
|
|
|
|
|
with open(os.path.join(self.mdir, 'contents', filename + '.txt'), 'r') as f:
|
|
|
|
|
text = f.read()
|
|
|
|
|
self.print_small(filename + '\n' + text[:200] + '...')
|
|
|
|
|
self.print_small('hello')
|
|
|
|
|
# filename, _ = data.split(".")
|
|
|
|
|
# with open(os.path.join(self.mdir, 'contents', filename + '.txt'), 'r') as f:
|
|
|
|
|
# text = f.read()
|
|
|
|
|
# self.print_small(filename + '\n' + text[:200] + '...')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
|