Skip to content

Commit

Permalink
feat(#41): built-in thumbnail
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfzc committed Aug 26, 2019
1 parent 581685d commit d3aaeeb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions stagesepx/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,16 @@ def draw(self,
sim_line = self._draw_sim(cut_result)
page.add(sim_line)

# insert thumbnail
if not self.thumbnail_list:
logger.debug('auto insert thumbnail ...')
_, unstable = cut_result.get_range()
for each in unstable:
self.add_thumbnail(
f'{each.start}({each.start_time}) - {each.end}({each.end_time})',
cut_result.thumbnail(each),
)

# insert extras
template = Template(TEMPLATE)
template_content = template.render(
Expand Down

0 comments on commit d3aaeeb

Please sign in to comment.