forked from OSSPhilippines/covid19-tracker-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlabel.js
More file actions
230 lines (211 loc) · 5 KB
/
label.js
File metadata and controls
230 lines (211 loc) · 5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
const say = require("../../lib/sayings/threads.json"); // sayings
const { color, txt } = require("./helper");
const pkg = require("../../package.json"); // package.json info
const { space, line, br, tab } = txt;
const randomSay = () => say[Math.floor(Math.random() * say.length)];
exports.randomSay = randomSay;
const source = "Source: https://www.worldometers.info/coronavirus/",
repo = "Code: https://github.com/warengonzaga/covid19-tracker-cli",
help = "Help: Try to append the URL with /help to learn more...",
bmcurl = "warengonza.ga/coffee4dev",
twitterhandle = "@warengonzaga",
twitterhashtag = "#covid19trackercli",
bmc = "(Buy Me A Coffee) ",
bmcline = "Love this project? Help us to help others by means of coffee!",
twitterline = "Follow me on twitter for more updates!",
gcashNum = "+639176462753",
ansiBMC = color.redBright("(Buy Me A Coffee) " + bmcurl),
ansiTwitter =
color.cyanBG(color.black(twitterhandle)) +
space +
color.cyanBG(color.black(twitterhashtag)),
gCash = "(GCash) ",
ansiGCash = color.cyan(gCash + gcashNum),
title = {
global: "COVID-19 Tracker CLI v" + pkg.version + " - Global Update",
country: (name) =>
"COVID-19 Tracker CLI v" + pkg.version + " - " + name + " Update",
globalHistory:
"COVID-19 Tracker CLI v" + pkg.version + " - Global Historical Chart",
history: (name) =>
`COVID-19 Tracker CLI v ${pkg.version} - ${name} Historical Chart`,
},
asOfDate = (asof, currentdate) =>
"As of " + asof.toLocaleString() + " [Date:" + currentdate + "]",
footerOne = br + br + " " + line + br + " " + bmcline + br + " ",
footerTwo = br + " " + line + br + " " + twitterline + br + " ",
defaultFooter = footerOne + ansiBMC + footerTwo + ansiTwitter + br + br,
specialFooter =
footerOne +
ansiGCash +
br +
" " +
ansiBMC +
footerTwo +
ansiTwitter +
br +
br,
plainDefaultFooter =
br +
tab +
line +
br +
tab +
bmcline +
br +
tab +
bmc +
bmcurl +
br +
tab +
line +
br +
tab +
twitterline +
br +
tab +
twitterhandle +
space +
twitterhashtag +
br +
br,
plainCountryDefaultFooter =
br +
tab +
line +
br +
tab +
bmcline +
br +
tab +
bmc +
bmcurl +
br +
tab +
line +
br +
tab +
twitterline +
br +
tab +
twitterhandle +
space +
twitterhashtag +
br +
br,
plainCountrySpecialFooter =
br +
tab +
line +
br +
tab +
bmcline +
br +
tab +
gCash +
gcashNum +
br +
tab +
bmc +
bmcurl +
br +
tab +
line +
br +
tab +
twitterline +
br +
tab +
twitterhandle +
space +
twitterhashtag +
br +
br,
manual = `
${line}
COVID-19 Tracker CLI v${pkg.version} by Waren Gonzaga
${line}
Basic Usage:
/<country name> ................... by country stats
ex. /philippines /korea
/<ISO 3166-1 code> ................ by country stats shortcut
ex. /ph /kor
/cmd .............................. if using CMD
/cmd/<country name> ............... by country stats on CMD
/cmd/<ISO 3166-1 code> ............ by country stats shortcut on CMD
/plain or /basic .................. if your cli does not support ANSI encoding
similar to /cmd usage and layout
ex. /plain/philippines or /plain/ph
/basic/philippines or /basic/ph
${line}
ANSI Supported Features
/history/ or /history/all ......... historical chart globally
/history/<country name> ........... historical chart for cases of a country
ex. /history/philippines /history/korea
/history/<ISO 3166-1 code> ........ shortcut historical chart for cases of a country
ex. /history/ph /history/kor
Cases and Deaths is currently available for historical chart.
/history/ph/cases or /history/ph/deaths
${line}
To learn more about the usage... please visit
https://warengonza.ga/covid19-tracker-cli
ISO 3166-1 Code List:
https://warengonza.ga/iso-3166-1-codes
${line}
${repo}
${line}
${randomSay()}
`,
helpMenu =
manual +
br +
tab +
line +
br +
tab +
bmcline +
br +
tab +
bmc +
bmcurl +
br +
tab +
txt.line +
br +
tab +
twitterline +
br +
tab +
twitterhandle +
space +
twitterhashtag +
br +
br;
exports.labels = {
pkg,
source,
repo,
help,
bmcurl,
twitterhandle,
twitterhashtag,
bmc,
bmcline,
twitterline,
gCash,
gcashNum,
ansiBMC,
ansiTwitter,
ansiGCash,
title,
asOfDate,
footerOne,
footerTwo,
defaultFooter,
specialFooter,
plainDefaultFooter,
plainCountryDefaultFooter,
plainCountrySpecialFooter,
manual,
helpMenu,
};