Project

covid_pt

0.0
No commit activity in last 3 years
No release in over 3 years
COVID19 data fetcher and parser for Portugal
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

COVID PT

A gem to get the COVID-19 data for Portugal.

Installation

Add this line to your application's Gemfile:

gem 'covid_pt'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install covid_pt

Usage

There are 3 main functions to generate a report.

report = CovidPT.at("2020-07-01")
# Generates the report for the given date

report = CovidPT.between("2020-07-01", "2020-07-02")
# Compare the two dates directly

report = CovidPT.range("2020-07-01", "2020-07-05")
# Compare every date between the two given dates

# Printing a given report in different formats:

# Printing in TXT format
CovidPT::Printer.pp(report)

# Printing in Markdown format
CovidPT::Printer.md(report)

# Printing in JSON
CovidPT::Printer.json(report)

There is also a command line tool available:

$ covid_pt --date="2020-07-01" --output=md
$ covid_pt --between="2020-07-01,2020-07-02" --output=json
$ covid_pt --range="2020-07-01,2020-07-10"

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/frm/covid_pt. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the CovidPT project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.