lscontests 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +4 -3
  2. package/bin/cli.js +3 -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 output the version number
17
- -a, --all List all contests
18
- -d, --days Only list contests within a given number of days
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.2.0";
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
- durationHours: contest.durationSeconds / 60 / 60,
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
- durationHours: (contest.endTime - contest.startTime) / 60 / 60,
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());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lscontests",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "A CLI tool to get information about the contests on each OJ",
5
5
  "keywords": [
6
6
  "cli",