lscontests 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +4 -3
- package/bin/cli.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
@@ -13,9 +13,10 @@ A CLI tool to get information about the contests on each OJ
|
|
13
13
|
lsct [options]
|
14
14
|
|
15
15
|
Options:
|
16
|
-
-V, --version
|
17
|
-
-
|
18
|
-
-
|
16
|
+
-V, --version output the version number
|
17
|
+
-d, --days, <day> Number of days to get contests information (default: "3")
|
18
|
+
-l, --list List all supported OJ
|
19
|
+
-o, --oj <ojs...> OJs to get contests information (choices: "cf", "lg")
|
19
20
|
```
|
20
21
|
|
21
22
|
## License
|
package/bin/cli.js
CHANGED
@@ -8,7 +8,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
8
8
|
|
9
9
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
10
10
|
|
11
|
-
var version = "1.
|
11
|
+
var version = "1.3.0";
|
12
12
|
|
13
13
|
const ruleRecord$1 = {
|
14
14
|
"CF": "Codeforces",
|
@@ -22,7 +22,7 @@ async function get$1() {
|
|
22
22
|
name: contest.name,
|
23
23
|
rule: ruleRecord$1[contest.type],
|
24
24
|
startTime: new Date(contest.startTimeSeconds * 1000),
|
25
|
-
|
25
|
+
endTime: new Date((contest.startTimeSeconds + contest.durationSeconds) * 1000),
|
26
26
|
url: `https://codeforces.com/contests/${contest.id}`
|
27
27
|
};
|
28
28
|
}).filter(contest => contest.startTime >= new Date());
|
@@ -49,7 +49,7 @@ async function get() {
|
|
49
49
|
name: contest.name,
|
50
50
|
rule: ruleRecord[contest.ruleType],
|
51
51
|
startTime: new Date(contest.startTime * 1000),
|
52
|
-
|
52
|
+
endTime: new Date(contest.endTime * 1000),
|
53
53
|
url: `https://www.luogu.com.cn/contest/${contest.id}`
|
54
54
|
};
|
55
55
|
}).filter(contest => contest.startTime >= new Date());
|