Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
280f84f
📦 NEW: add open collective URL
warengonzaga Mar 20, 2021
40e3133
👌 IMPROVE: Update funding URL with proper links
warengonzaga Mar 20, 2021
05d8250
👌 IMPROVE: Update .gitignore and dependencies
warengonzaga Mar 20, 2021
9d81d64
use relative image urls #62
jcads Mar 27, 2021
d61e74a
Merge pull request #68 from jcads/fix-img-links
warengonzaga Mar 27, 2021
efadd84
📦 NEW: Complete rewrite
warengonzaga Mar 29, 2021
80545a7
Add editorconfig
Mar 29, 2021
41597e5
Add quiet mode
Mar 29, 2021
0fd572d
Remove styling from error handler for better compatibility
Mar 29, 2021
d1373bf
Add missing newline
Mar 29, 2021
11708da
Add plain mode
Mar 30, 2021
f5c2abe
Add documentation and quiet mode to plain routes
Mar 30, 2021
a82a1ae
Add and improve documentation
Mar 30, 2021
f17145f
Make not found handler send a 404 response code
Mar 30, 2021
818e046
Add function dedicated to handling historical data
Mar 31, 2021
f5bf1e8
Add plain mode to CLI
Mar 31, 2021
dff091f
Point vercel to src/index.ts
Mar 31, 2021
5c9e92d
Point vercel to src/api.ts
Mar 31, 2021
9e36076
Make vercel config simple
Mar 31, 2021
eaa6e2e
Revert broken vercel configuration
Mar 31, 2021
c4293a9
Merge pull request #70 from scinscinscin/v4
warengonzaga Mar 31, 2021
60ba2f1
👌 IMPROVE: Update ignore files
warengonzaga Mar 31, 2021
c0ceb5e
👌 IMPROVE: Update funding information
warengonzaga Mar 31, 2021
72764dd
👌 IMPROVE: Update package file info
warengonzaga Mar 31, 2021
2706199
👌 IMPROVE: Update info
warengonzaga Mar 31, 2021
c9f09a9
👌 IMPROVE: Update help and info
warengonzaga Apr 1, 2021
b55ccd8
Merge pull request #73 from wareneutron/new/info
warengonzaga Apr 1, 2021
991e044
Add central location for links
Apr 1, 2021
3affb03
Replace source link with docs link
Apr 1, 2021
6ba6b5d
Remove GCash message
Apr 1, 2021
f9755e9
Merge pull request #74 from scinscinscin/v4
warengonzaga Apr 1, 2021
650335e
👌 IMPROVE: Update info
warengonzaga Apr 2, 2021
bb94e78
Add linking feature
Apr 3, 2021
170eddc
Remove vercel rewrite
Apr 3, 2021
b30f159
Point vercel to /src/api.ts
Apr 3, 2021
1c74ab6
Merge pull request #76 from scinscinscin/v4
warengonzaga Apr 3, 2021
827feda
Change color code replacer to tilde
Apr 3, 2021
709c9c5
Fix broken connector lines
Apr 3, 2021
1b291f2
Add ENV variable to override colors
Apr 3, 2021
728a5a4
Merge pull request #77 from scinscinscin/v4
warengonzaga Apr 3, 2021
15ea081
👌 IMPROVE: Update info
warengonzaga Apr 3, 2021
16523b1
📦 NEW: Revised code of conduct
warengonzaga Apr 3, 2021
2cdc1f9
📦 NEW: Improved readme file with new banner
warengonzaga Apr 3, 2021
3ac0225
📖 DOC: Typo
warengonzaga Apr 3, 2021
1e5f896
📖 DOC: Add Digital Ocean logo
warengonzaga Apr 4, 2021
4ed2bd6
🤖 TEST: CircleCI config
warengonzaga Apr 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
👌 IMPROVE: Update help and info
  • Loading branch information
warengonzaga committed Apr 1, 2021
commit c9f09a95d95cea6b4ad8c0f29ded9b66cb7352f7
2 changes: 1 addition & 1 deletion src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ app.use("/", errorHandler);
// Not found handler
app.use("*", (_req, res) =>
res.status(404).send(
`Welcome to COVID-19 Tracker CLI v${version} by Waren Gonzaga with Wareneutron Developers\n
`Welcome to COVID-19 Tracker & CLI v${version} by Waren Gonzaga with Wareneutron Developers\n
Please visit: https://warengonza.ga/covid19-tracker-cli\n`
)
);
Expand Down
9 changes: 7 additions & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const country = args._[0];

const { version } = require("../package.json");

const helpMessage = `COVID-19 Tracker CLI v${version} by Waren Gonzaga with Wareneutron Developers
const helpMessage = `COVID-19 Tracker & CLI v${version} by Waren Gonzaga with Wareneutron Developers
Usage: covid [COUNTRY] [OPTIONS...]

Country: Can be a country name or ISO 3166-1 alpha-2 country code
Expand All @@ -29,7 +29,12 @@ Options:
--history Show a chart of country's cases of world's cases
--mode Use with --history to make show a chart of cases, deaths, or recovered
--quiet Only show necessary information
--plain Enable plain mode`;
--plain Enable plain mode

Useful Links:
Docs: docs.wareneutron.com/covid19-tracker-cli
Repo: repo.wareneutron.com/covid19-tracker-cli
Donate: wareneutron.com/donate`;

let output: string = "";
const main = async () => {
Expand Down
6 changes: 3 additions & 3 deletions src/utils/generateOutput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const generateOutput: (
quiet?: boolean
) => string = (chartType, updateTime, data, quiet) => {
quiet = quiet === undefined ? true : quiet;
let header = `COVID-19 Tracker CLI v${version} - ${chartType}`;
let header = `COVID-19 Tracker & CLI v${version} - ${chartType}`;
let timestamp = getTimestamp(updateTime).yellow;

data.unshift(timestamp);
Expand All @@ -28,8 +28,8 @@ export const generateOutput: (
if (!quiet)
data = data.concat([
"Help: Try to append the URL with /help to learn more...",
"Source: https://disease.sh/v3/covid-19/",
"Code: https://github.com/wareneutron/covid19-tracker-cli",
"Docs: docs.wareneutron.com/covid19-tracker-cli",
"Repo: repo.wareneutron.com/covid19-tracker-cli",
]);

let response = generateColorTable(data, "cyan");
Expand Down
2 changes: 1 addition & 1 deletion src/utils/generatePlainOutput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const generatePlainOutput: (
let line = extraRows === undefined ? "-".repeat(60) : "-".repeat(68);
line += "\n";

let header = `COVID-19 Tracker CLI v${version} - ${chartType}`;
let header = `COVID-19 Tracker & CLI v${version} - ${chartType}`;
let timestamp = getTimestamp(metainfo.updated as number);
let saying = getSaying();

Expand Down