This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// full API options at https://github.com/Keyang/node-csvtojson | |
const csv = require('csvtojson'); | |
// Commonly-tweaked defaults | |
const options = { | |
delimiter: ",", | |
trim: true, | |
ignoreEmpty: false, | |
flatKeys: false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Eleventy can process a bunch of markdown files into HTML for a blog, but it's also handy for turning big data files into individual HTML pages. https://www.11ty.dev/docs/data-global/ and https://www.11ty.dev/docs/pagination/ have the skinny. | |
project folder | |
├─ .eleventy.js <-- control/override plugins, templating, directory names, etc | |
│ | |
│ | |
├─ src <-- Your content, data files, templates, etc | |
│ ├─ _data <-- JSON files you put here become part of the 'global data' | |
│ │ └─ foo.json <-- any template can use this data as {{ data.foo }} | |
│ └─ foo-things.html <-- uses 'pagination' to output one page for each record in foo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const BarThemes = { | |
fractional: [' ', '▏', '▎', '▍', '▌', '▋', '▊', '▉', '█'], | |
shaded: [' ', '░', '▒', '▓', '█'], | |
simple: ['▒', '█'], | |
ascii: ['-', '#'], | |
}; | |
// Renders a fixed-length ASCII progress bar that supports | |
// fractionally-filled characters using Unicode boxes and bars. |
OlderNewer