Skip to content

Commit b55ccd8

Browse files
authored
Merge pull request #73 from wareneutron/new/info
👌 IMPROVE: Update help and info
2 parents 2706199 + c9f09a9 commit b55ccd8

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

src/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ app.use("/", errorHandler);
2525
// Not found handler
2626
app.use("*", (_req, res) =>
2727
res.status(404).send(
28-
`Welcome to COVID-19 Tracker CLI v${version} by Waren Gonzaga with Wareneutron Developers\n
28+
`Welcome to COVID-19 Tracker & CLI v${version} by Waren Gonzaga with Wareneutron Developers\n
2929
Please visit: https://warengonza.ga/covid19-tracker-cli\n`
3030
)
3131
);

src/cli.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const country = args._[0];
1818

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

21-
const helpMessage = `COVID-19 Tracker CLI v${version} by Waren Gonzaga with Wareneutron Developers
21+
const helpMessage = `COVID-19 Tracker & CLI v${version} by Waren Gonzaga with Wareneutron Developers
2222
Usage: covid [COUNTRY] [OPTIONS...]
2323
2424
Country: Can be a country name or ISO 3166-1 alpha-2 country code
@@ -29,7 +29,12 @@ Options:
2929
--history Show a chart of country's cases of world's cases
3030
--mode Use with --history to make show a chart of cases, deaths, or recovered
3131
--quiet Only show necessary information
32-
--plain Enable plain mode`;
32+
--plain Enable plain mode
33+
34+
Useful Links:
35+
Docs: docs.wareneutron.com/covid19-tracker-cli
36+
Repo: repo.wareneutron.com/covid19-tracker-cli
37+
Donate: wareneutron.com/donate`;
3338

3439
let output: string = "";
3540
const main = async () => {

src/utils/generateOutput.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const generateOutput: (
1919
quiet?: boolean
2020
) => string = (chartType, updateTime, data, quiet) => {
2121
quiet = quiet === undefined ? true : quiet;
22-
let header = `COVID-19 Tracker CLI v${version} - ${chartType}`;
22+
let header = `COVID-19 Tracker & CLI v${version} - ${chartType}`;
2323
let timestamp = getTimestamp(updateTime).yellow;
2424

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

3535
let response = generateColorTable(data, "cyan");

src/utils/generatePlainOutput.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const generatePlainOutput: (
2020
let line = extraRows === undefined ? "-".repeat(60) : "-".repeat(68);
2121
line += "\n";
2222

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

0 commit comments

Comments
 (0)