This repository demonstrates how to run a bash
script as postprocess step for GitHub's Flat Data actions.
The idea is basic : use Deno to trigger the execution of a bash
script.
The goal is simple:
- to download every day COVID-19 italian regional data CSV file;
- to retain only two columns of it.
This example also install the great Miller: it's like awk, sed, cut, join, and sort for data formats such as CSV, TSV, tabular JSON and positionally-indexed.
- the Flat Data action is scheduled daily, and download the COVID-19 italian regional data CSV file from the official repo and stores it in
dpc-covid19-ita-regioni-latest.csv
; - the
postprocess.ts
script is then run, and runs the bash scriptpostprocess.sh
. It also forwards the arguments; postprocess.sh
takes the downloaded CSV file and retains only two columns of it.
Thanks to Pierre-Olivier Simonard for its inspirational Python way to do it.