|
|
|
@ -53,7 +53,7 @@ class Soup(Bureau):
|
|
|
|
|
prn = self._get_small_printer()
|
|
|
|
|
|
|
|
|
|
for file in files:
|
|
|
|
|
filename = os.path.basename(file)
|
|
|
|
|
filename, ext = os.path.basename(file).split('.')
|
|
|
|
|
self.print_small(filename)
|
|
|
|
|
prn.soft_barcode("code128", "SBtp." + filename)
|
|
|
|
|
|
|
|
|
@ -61,7 +61,7 @@ class Soup(Bureau):
|
|
|
|
|
def print_preview(self, data):
|
|
|
|
|
filename, _ = data.split(".")
|
|
|
|
|
|
|
|
|
|
with open(os.path.join(self.mdir, 'contents', filename), 'r') as f:
|
|
|
|
|
with open(os.path.join(self.mdir, 'contents', filename + '.txt'), 'r') as f:
|
|
|
|
|
text = f.read()
|
|
|
|
|
self.print_small(filename + '\n' + text[:200] + '...')
|
|
|
|
|
|
|
|
|
|