September 2015
Intermediate to advanced
200 pages
6h 40m
English
We’ve looked at writing data either in an unformatted way or into standard formats like XML, JSON, and CSV. Sometimes, though, we need to conform to more complex or more unusual formats, ones that don’t have ready-made libraries but that are nevertheless still text formats.
For example, imagine that we want to generate a financial report for a bar, outlining the purchases made by the bar in the past month. We want the final output to look something like this:
| | The Bistro Illegal |
| | Sector RT 74 |
| | Lazgar Beta |
| | |
| | Purchase ledger, October 2014 |
| | |
| | Generated: 4 October 2014, 12:49pm |
| | |
| | Product Units Price |
| | |
| | Ol' Janx Spirit 282 $27,918.00 |
| | Eau de Santraginus V 300 $600.00 |
| | Arcturan Mega-Gin 150 $7,500.00 |
| |
Read now
Unlock full access