Software Engineer

Generating Baseball Card Backs

· by jsnby · Read in about 2 min · (244 Words)
golang

Card Front

Card Back

I coached my sons’ baseball teams this year and for my older son, the team’s manager and I used GameChanger to keep track of statistics. Throughout the season, we used the statistics to help set the lineup and the kids also enjoyed hearing about their stats. Towards the end of the season, we decided that we wanted to make baseball cards for the kids with their stats on them.

I settled on using the 1987 Topps style card for the front and wanted something similar to the 1987 style card back. I created the card backs in Photoshop and manually input the statistics for each child. I then had the cards printed at mytradingcards.com. They turned out great. I had a feeling that other coaches might want something similar in the future and the All-Star coach immediately asked if I’d make cards for one of the All-Star teams. I agreed, but I didn’t want to have to input the stats manually in Photoshop…instead I wanted to generate the card backs programatically. GameChanger allows you to export all the stats in Comma-Separated-Value (CSV) format, so it was a matter of building a parser for those stats, then setting up some code to draw the card backs.

A little time writing some code in Go and I was able to generate the card backs. The results turned out pretty good. The card back below is test data and was generated (rather than manually input into Photoshop).

Generated All Star Card