X Tutup
The Wayback Machine - https://web.archive.org/web/20221229151811/https://github.com/aborruso/flat_data_bash_example
Skip to content

aborruso/flat_data_bash_example

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 

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
X Tutup