Incorporated pandas for printing to .csv and .xlsx files
Reading urls from files instead of terminal
Expanded testing
Better file organization.
Changelog:
CLI arguments:
Added --file_input which reads urls from text files. Mutually incompatible with --urls
Added --output, which determines how results will be printed (defaults to .json + printing in terminal)
Can now add start/end of time frame using dd/mm/YYYY:HH:MM timestamps
Added more strict limits for several arguments, including --frequency and --output, to prevent errors.
Improved hints in argparser
File writing:
Added functionality to create /output/ folder + print results to timestamped files in one of four filetypes.
If a spreadsheet filetype is chosen, the output is sorted by url and by code and printed to two separate outputs (two files if .csv, two sheets of the same spreadsheet if .xlsx). This makes it easy to see all codes for a website or all websites sharing a common code.
Tests:
Added tests for basic formatting helper functions + init_output using mock.
This PR fleshes out several features, mainly:
.txt
,.csv
,.xlsx
and.json
files.csv
and.xlsx
filesChangelog:
CLI arguments:
--file_input
which reads urls from text files. Mutually incompatible with--urls
--output
, which determines how results will be printed (defaults to.json
+ printing in terminal)--frequency
and--output
, to prevent errors.File writing:
/output/
folder + print results to timestamped files in one of four filetypes..csv
, two sheets of the same spreadsheet if.xlsx
). This makes it easy to see all codes for a website or all websites sharing a common code.Tests: