about summary refs log tree commit diff stats
path: root/ara.pl
Commit message (Collapse)AuthorAgeFilesLines
...
* use Getopt::Long to GetOptions from cliAndinus2020-06-061-9/+31
|
* Switch to Text::ASCIITable for $covid_19_dataAndinus2020-06-061-8/+18
| | | | Instead of using 2 modules we switch everything to Text:ASCIITable.
* Remove DateTime, use Time::Moment insteadAndinus2020-06-061-9/+11
| | | | | | | After removing all DateTime code it took ~0.98s to run, before that it was ~1.2s. And after removing 'use DateTime' it now takes ~0.30s to run, all of this is without File::Fetch part, it loaded the data from disk instead of fetching.
* Use == to compare numbers instead of eqAndinus2020-06-061-1/+1
| | | | | No need to convert it to string for comparision, we instead use == to compare numbers.
* Use Time::Moment for $file_mtime instead of DateTimeAndinus2020-06-061-5/+3
| | | | | | | | | First step to replacing DateTime with Time::Moment, DateTime is very huge, no need to load that large module for simple tasks, it'll also make the program run faster. This comparison happens in utc time instead of converting it to other time zone which was meaningless anyways.
* use File::Fetch only when requiredAndinus2020-06-061-1/+2
| | | | | 'use File::Fetch' gets processed at compile time so we use 'require File::Fetch' instead.
* Use Text::ASCIITable for State NotesAndinus2020-06-051-7/+7
| | | | | | Text::Table::Tiny wasn't good for state notes because they were long & had characters like '\n'. Text::ASCIITable has nice options to work with these.
* Print state notes along with covid-19 dataAndinus2020-06-051-4/+16
|
* Merge if statements into a single blockAndinus2020-06-051-9/+7
| | | | | Instead of checking if( $update_info eq "Today" ) three times, we check it only once.
* Fetch latest data only if local data is old or doesn't existAndinus2020-06-051-6/+24
| | | | | This will fetch the latest data only if the local data is older than 8 minutes or the file doesn't exist.
* Fix deltarecovered & deltadeathsAndinus2020-06-051-2/+2
| | | | They were swapped for some reason.
* Show delta only if it was updated TodayAndinus2020-06-051-3/+16
|
* Add $statewise as intermediateAndinus2020-06-031-7/+10
|
* Remove @statewise & clean up codeAndinus2020-06-031-10/+7
| | | | | @statewise thing did some stuff that I didn't understand, instead of that we directly take data from $json_data.
* Remove use Data::DumperAndinus2020-05-291-1/+0
|
* Use statecode if state name is too longAndinus2020-05-291-4/+8
|
* Change timezone to 'Asia/Kolkata'Andinus2020-05-291-1/+1
|
* Use $last_update_dmy instead of substr func everywhereAndinus2020-05-291-3/+4
|
* Fix datetime check, clone before subtract/addAndinus2020-05-291-2/+2
| | | | subtract/add modifies in place so we clone it.
* Add check for tomorrow in datesAndinus2020-05-291-2/+4
|
* Make time relative in outputAndinus2020-05-291-1/+20
| | | | | It now shows "Today", "Yesterday" instead of showing solid dates for all entries.
* Format date in output to 'Month Date'Andinus2020-05-291-1/+4
|
* Add last updated to outputAndinus2020-05-291-1/+3
|
* Change output format to tablesAndinus2020-05-291-6/+24
| | | | | | | This version is much better, it will print all states information along with delta in some fields like confirmed, deaths, recovered. I'm not sure though if this is the best way, it just works.
* Initial versionAndinus2020-05-291-0/+59