Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

MyCareersFuture profile imageDickson Tan
Dickson Tan forMyCareersFuture

Posted on

     

Automating Sprint Review Slides with Pandoc

In the MyCareersFuture team, we conduct sprint reviews at the end of the sprint to showcase what the team has achieved. We use PowerPoint slides to highlight stories that have been done and those which are still being worked on. Preparing this by hand was time-consuming. Here's how we automated the process.

Getting Story Data

We use Pivotal Tracker for project management. The Pivotal Tracker API returns stories in the current iteration or sprint via the/projects/{project_id}/iterations?scope=current_backlog&limit=1 API call. The response looks like this:

{"finish":"2020-05-19T00:00:00Z","kind":"iteration","start":"2020-05-04T00:00:00Z","stories":[{"kind":"story","id":563,"created_at":"2020-05-19T12:01:00Z","updated_at":"2020-05-19T12:01:00Z","estimate":3,"story_type":"feature","name":"Complete construction of the Expeditionary Battle Planetoid","description":"Palpatine was impressed with the PoC, make this one bigger","current_state":"accepted",//lotsmoredataforthisstory},//dataforotherstoriesinthatsprint]}

Generating PowerPoint Slides

Programmatically generating a PowerPoint file isn't for the faint of heart even in a language that has a library for the task. This is where Pandoc comes to the rescue.

Pandoc is an open source tool that converts between almost any markup format that you can think of, including from markdown to PowerPoint. By using the Pivotal API, I wrote a tool that outputs markdown source which Pandoc then converts into the actual slides. Here's what the markdown might look like:

---title:"Sprint63"date:18 Sep - 02 Oct---## Sprint backlog - Done!*Jobseeker** Create a service/API to serve constants to all other modules (5 points)* change redux code to Typescript for ui-jobseeker* Populate the content placeholder on the category landing page with the html content (batch 2)* Implement page title and meta description for category landing page (batch 2)* Revise content piece, page title and meta description for Risk Management category landing page*Employer** Add "Employers Toolkit" link in Employer navbar## Jobseeker - In Progress Features*Delivered** Implement VDP link for MCF jobseeker and make changes to footer*Finished** Implement GA tracking on the recommended jobs on the application confirmation page* Switch to MCF figures for application count of all jobs* Include "Search term" in recommender API* Implement recommended jobs on JD page (getting the jobs from DSAID API)* Implement data science tracking for view JD page* Set up company profile page* Implement data science tracking for the jobs returned on each page of the search page*Started** Change copy for government scheme section on JD page and search results page* Implement recommended jobs on JD page (frontend)* Company profile page - jobs section* Company profile page - About the company section* Company profile page meta description* Take contact number and email address from MCF instead of MySF## Jobseeker - In Progress Chores*Started** Improve stability of job application tests* Jobseeker: Cypress Tests for GA calls

Saving that to a file namedpresentation.md, the following Pandoc invocation generatespresentation.pptx:

pandoc presentation.md-o presentation.pptx--self-contained--reference-doc=template.pptx--slide-level 2

When there is too much content to fit into a slide or if ad hoc changes need to be made, the generated markdown and PowerPoint file can be edited afterwards.

Sprint 63 Title Slide with a main title of Sprint 63 and subtitle 18 Sep - 02 Oct

Sprint 63 slide for done stories. Refer to the markdown source above for its contents

Sprint 63 slide for in-progress Jobseeker feature stories. Refer to the markdown source above for its contents

The references to "Jobseeker" and "Employer" are the 2 squads in MCF which implement the jobseeker and employer facing portions of the product respectively.

Here's how markdown's semantics naturally map to slides:

  • Lines 2 and 3 in the source above specify metadata about the document, title and date in this case. This is part of Pandoc's support for front matter and causes a title slide to be generated with this information.
  • Pandoc was configured to use a slide level of 2. Hence, the level 2 headings are used as slide titles of new slides.
  • Text between level 2 headings appear on slides as content. Any markdown formatting there such as lists and emphasis causes the corresponding formatting changes in the output.
  • A line with 3 consecutive dashes (---) causes a new slide to begin after that point. This isn't used in the example above but is very useful when content needs to be split between slides without creating a title for each slide. Refer toPandoc's user guide for other directives to insert pauses, incremental lists and speaker notes.

Customizing Appearance of Generated Slides

The--reference-doc=template.pptx argument instructs Pandoc to use a PowerPoint template which provides some control over layout and formatting. Although Pandoc technically supports using your own templates, Pandoc crashed often when I tried doing so1. Hence, I recommend exporting a copy of Pandoc's default PowerPoint template and using it as a starting point for customization with the following command:

# writes Pandoc's default PowerPoint template to template.pptxpandoc-o template.pptx--print-default-data-file reference.pptx

Open this file in PowerPoint and under the view ribbon, activate slide master view.

The first slide is the master slide. Changing the formatting of the title and text at various list levels applies the corresponding formatting when used to generate slides, a poor man's CSS.

The Slide Master for our sprint review slides, which lets you adjust formatting for slide titles and text in list levels 1 through 6


Here's the Slide Master for our sprint review slides set to use the Arial font instead of the default Calibri. Notice how this matches with the content slides above.

The title slide for our sprint review slides. It can have its main title, subtitle and date placeholder fields customized


Similarly, here's our Title Slide layout.

Limitations

The format of content was kept as simple as possible - essentially a title and content in lists. Pandoc's PowerPoint writer technically supports a 2-column layout and the use of tables. However, we ran into issues because we could not adequately customize the formatting applied to our needs. For instance, each column in a table could not have different widths causing text to often go offscreen.

Besides PowerPoint, Pandoc also supports creating PDF slides via LaTeX and HTML5 slides via Slideous, Slidy, DZSlides or reveal.js. These formats allow virtually full customization of the generated slides, including the use of JavaScript and CSS for HTML5 presentations.

Conclusion

We've been automating most of the preparation for our sprint review slides this way for almost a year now, saving an hour each sprint. If you're preparing slides with information from a system that exposes an API or prefer the text editor like I do, I highly recommend trying Pandoc out.


  1. this seems to happen if the template file is not compatible with the set of XML directives Pandoc recognizes for PowerPoint files. For example, Pandoc wouldn't accept the template file from a set of slides prepared with Google Slides. 

Top comments(2)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
shonoru profile image
Andrey Bodoev
Writing on code reviews
  • Location
    Singapore
  • Work
    Software Engineer at Zenika
  • Joined

Congrats on your first post under MCF :D

CollapseExpand
 
neurrone profile image
Dickson Tan
Technologist, avid reader and occasional writer. My day doesn't begin until my first cup of freshly brewed coffee.
  • Location
    Singapore
  • Education
    National University of Singapore
  • Work
    Associate Software Engineer at Government Technology of Singapore
  • Joined

Thanks :)

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

More fromMyCareersFuture

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp