Skip to content

aborruso/flat_data_bash_example

Repository files navigation

Using bash as postprocess script for GitHub's Flat Data actions

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.

Execution :

  • 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 script postprocess.sh. It also forwards the arguments;
  • postprocess.sh takes the downloaded CSV file and retains only two columns of it.

Thanks

Thanks to Pierre-Olivier Simonard for its inspirational Python way to do it.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published