Expand description
Interpret a well-formatted CSV file into a set of initialized Process structs, one for each row
When identifying the need for new processes, a well-formatted list can be constructed, with a specified first set of columns, then all remaining columns assumed to be additional flags for templates:
| “Document Number” | “Title” | “Subject” | “Product” | “Author” | “Reviewer” | TFlag | TFlag | … |
|---|---|---|---|---|---|---|---|---|
| … | … | … | … | … | … | x | … | |
| … | … | … | … | … | … | x | … | |
| … | … | … | … | … | … | … | ||
| … | … | … | … | … | … | x | x | … |
The TFlag columns are user-defined. For example, if a TFlag column is “WarpSpeed” then this module assumes there is a Cascading Stylesheet file called “WarpSpeed.css” available to these processes, and any process with an “x” in the “WarpSpeed” column will have this Template (CSS file) applied.
All other columns are strictly enforced as shown above. Empty values in the data rows are OK, but in the first row of the CSV file, the first 6 columns must be those six, in that order.
Functions§
- new_
css_ 🔒file_ if_ none_ exists - Create CSS files for every TFlag found that doesn’t already have a CSS file in the “./assets” directory
- read_
csv - Pull header and content data from a specifically-formatted CSV file, and return a list of requested processes (one per CSV data row).