parser.add_argument(
'file',
nargs='?',
- default='thumb')
+ default='thumb',
+ choices=['thumb'])
return parser
@classmethod
def args_to_request(cls, args):
return request_from_args(
- args, ['size', 'file'])
+ args, ['thumb_size', 'file'])
def process(self, thumb_size=None, file=None):
self.common_setup()
if not quality:
quality = self.image_config['quality']
if not filter:
- filter = self.image_config['filter']
+ filter = self.image_config['resize_filter']
resize_tool(self.entry, True, 'thumb', self.orig_filename,
self.name_builder.fill('{basename}.thumbnail{ext}'),
self.common_setup()
self.generate_medium_if_applicable(size=size, filter=filter,
quality=quality)
- self.generate_thumb(size=thumb_sizei, filter=filter, quality=quality)
+ self.generate_thumb(size=thumb_size, filter=filter, quality=quality)
self.copy_original()
self.extract_metadata()
self.delete_queue_file()
if self.name_builder.ext == 'pdf':
self.pdf_filename = self.orig_filename
elif self.entry.media_files.get('pdf'):
- self.pdf_filename = self.workbench.local_file(
+ self.pdf_filename = self.workbench.localized_file(
mgg.public_store, self.entry.media_files['pdf'])
else:
self.pdf_filename = self._generate_pdf()
# since pdftocairo added '.png', we need to include it with the
# filename
- store_public(self.entry, 'thumb', filename + '.png',
+ store_public(self.entry, 'medium', filename + '.png',
self.name_builder.fill('{basename}.medium.png'))
type=int)
parser.add_argument(
- '--thumb-size',
+ '--thumb_size',
nargs=2,
metavar=('max_width', 'max_height'),
type=int)
self.generate_frontview(size=size)
self.generate_sideview(size=size)
elif file == 'thumb':
- self.generate_thumb(size=size)
+ self.generate_thumb(thumb_size=size)
class StlProcessingManager(ProcessingManager):