libroadcast-cli 1.10.2 → 1.11.1

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.
package/README.md CHANGED
@@ -18,14 +18,15 @@ Usage: <command> [options]
18
18
 
19
19
 
20
20
  Commands:
21
- delay <broadcastId> <delayInSeconds> [--onlyDelay] [--noDelay]
21
+ delay <broadcastId> <delayInSeconds> [--onlyDelay] [--noDelay] [--rounds <roundsToFix>]
22
22
  Sets the delay for all rounds in the specified broadcast.
23
23
  Note: The delay is specified in seconds. (max 3600 seconds = 1 hour)
24
24
  Options:
25
25
  --onlyDelay Set only the delay without changing the start time.
26
26
  --noDelay Do not modify the delay, only adjust the start time.
27
+ --rounds <roundsToFix> Specify which rounds to fix using formats like '1-4', '8+', '3,5,7', etc.
27
28
 
28
- setPGN <broadcastId> <sourcePGNUrl> [--withFilter] [--slice <sliceFilter>]
29
+ setPGN <broadcastId> <sourcePGNUrl> [--withFilter] [--slice <sliceFilter>] [--rounds <roundsToFix>]
29
30
  Sets the source PGN URL for all rounds in the specified broadcast.
30
31
  (optional) Use "{}" in the URL as a placeholder for the round number.
31
32
  Note: For livechesscloud URLs, please ensure it ends with "/{}".
@@ -34,7 +35,7 @@ Commands:
34
35
  --slice <sliceFilter> Apply slice filtering using the provided filter string.
35
36
  --rounds <roundsToFix> Specify which rounds to fix using formats like '1-4', '8+', '3,5,7', etc.
36
37
 
37
- setPGNMulti <broadcastId> <sourcePGNUrl> <gamesNum> [--withFilter] [--onlyGames <sliceFilter>]
38
+ setPGNMulti <broadcastId> <sourcePGNUrl> <gamesNum> [--withFilter] [--onlyGames <sliceFilter>] [--rounds <roundsToFix>]
38
39
  Sets the source PGN URLs for all rounds in the specified broadcast.
39
40
  Use {r} in the URL as a placeholder for the round number and {g} for the game number.
40
41
  Use the gamesNum parameter to specify how many games per round.
@@ -57,6 +58,13 @@ Commands:
57
58
  startsPrevious <broadcastId> <startsPrevious>
58
59
  Sets the startsAfterPrevious flag for all rounds in the specified broadcast.
59
60
 
61
+ period <broadcastId> <periodInSeconds>
62
+ Sets the period between polling for all rounds in the specified broadcast.
63
+ Required: Your Lichess token needs the web:mod scope to use this command. (Broadcast/Study Admin perm required)
64
+ Note: The period is specified in seconds.
65
+ Options:
66
+ --rounds <roundsToFix> Specify which rounds to fix using formats like '1-4', '8+', '3,5,7', etc.
67
+
60
68
 
61
69
  Examples:
62
70
  # Set a 5-minute delay without changing start time
package/dist/cmd/delay.js CHANGED
@@ -8,8 +8,11 @@ const node_process_1 = require("node:process");
8
8
  const commandHandler_1 = require("../utils/commandHandler");
9
9
  const getInfoBroadcast_1 = require("../utils/getInfoBroadcast");
10
10
  const colors_1 = __importDefault(require("../utils/colors"));
11
- const setDelayRounds = async (rounds, delay, onlyDelay, noDelay) => {
12
- for (const round of rounds) {
11
+ const setDelayRounds = async (rounds, delay, onlyDelay, noDelay, roundsToFix) => {
12
+ let filteredRounds = rounds.filter((_, i) => !roundsToFix?.length || roundsToFix.includes(i + 1));
13
+ if (filteredRounds.length === 0)
14
+ filteredRounds = rounds;
15
+ for (const round of filteredRounds) {
13
16
  await (0, commandHandler_1.handleApiResponse)(commandHandler_1.client.POST("/broadcast/round/{broadcastRoundId}/edit", {
14
17
  params: {
15
18
  path: { broadcastRoundId: round.id },
@@ -26,6 +29,7 @@ const setDelayRounds = async (rounds, delay, onlyDelay, noDelay) => {
26
29
  }
27
30
  };
28
31
  const delayCommand = async (args) => {
32
+ await (0, commandHandler_1.checkTokenScopes)();
29
33
  const [broadcastId, delay] = args.slice(0, 2);
30
34
  if (!broadcastId || !delay) {
31
35
  (0, commandHandler_1.msgCommonErrorHelp)("Broadcast ID and delay are required.");
@@ -42,11 +46,17 @@ const delayCommand = async (args) => {
42
46
  console.error(colors_1.default.red("Cannot use --onlyDelay and --noDelay together."));
43
47
  (0, node_process_1.exit)(1);
44
48
  }
49
+ const roundsArgIndex = args.findIndex((arg) => arg === "--rounds");
50
+ let roundsToFix = undefined;
51
+ if (roundsArgIndex !== -1 && roundsArgIndex + 1 < args.length) {
52
+ const roundsArg = args[roundsArgIndex + 1];
53
+ roundsToFix = roundsArg ? (0, commandHandler_1.translateRoundsToFix)(roundsArg) : undefined;
54
+ }
45
55
  const broadcast = await (0, getInfoBroadcast_1.getBroadcast)(broadcastId);
46
56
  if (!broadcast?.rounds || broadcast.rounds.length === 0) {
47
57
  console.error(colors_1.default.red("No rounds found for the specified broadcast."));
48
58
  (0, node_process_1.exit)(1);
49
59
  }
50
- await setDelayRounds(broadcast.rounds, delayNum, onlyDelay, noDelay);
60
+ await setDelayRounds(broadcast.rounds, delayNum, onlyDelay, noDelay, roundsToFix);
51
61
  };
52
62
  exports.delayCommand = delayCommand;
@@ -31,6 +31,7 @@ const fixScheduleRounds = async (rounds, timeDiff, roundsToFix) => {
31
31
  }
32
32
  };
33
33
  const fixScheduleCommand = async (args) => {
34
+ await (0, commandHandler_1.checkTokenScopes)();
34
35
  const [broadcastId, timeDiffStr] = args.slice(0, 2);
35
36
  if (!broadcastId || !timeDiffStr) {
36
37
  (0, commandHandler_1.msgCommonErrorHelp)("Broadcast ID and time difference are required.");
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.periodCommand = void 0;
7
+ const node_process_1 = require("node:process");
8
+ const commandHandler_1 = require("../utils/commandHandler");
9
+ const getInfoBroadcast_1 = require("../utils/getInfoBroadcast");
10
+ const colors_1 = __importDefault(require("../utils/colors"));
11
+ const setPeriodRounds = async (rounds, period, roundsToFix) => {
12
+ let filteredRounds = rounds.filter((_, i) => !roundsToFix?.length || roundsToFix.includes(i + 1));
13
+ if (filteredRounds.length === 0)
14
+ filteredRounds = rounds;
15
+ for (const round of filteredRounds) {
16
+ await (0, commandHandler_1.handleApiResponse)(commandHandler_1.client.POST("/broadcast/round/{broadcastRoundId}/edit", {
17
+ params: {
18
+ path: { broadcastRoundId: round.id },
19
+ query: { patch: 1 },
20
+ },
21
+ body: {
22
+ period: period,
23
+ },
24
+ }), `Successfully set period for round ${colors_1.default.whiteBold(round.id)} to ${colors_1.default.whiteBold(period.toString())} seconds.`, `Error setting period for round ${colors_1.default.whiteBold(round.id)}`);
25
+ await (0, commandHandler_1.sleep)(200);
26
+ }
27
+ };
28
+ const periodCommand = async (args) => {
29
+ await (0, commandHandler_1.checkTokenScopes)(true);
30
+ const [broadcastId, period] = args.slice(0, 2);
31
+ if (!broadcastId || !period) {
32
+ (0, commandHandler_1.msgCommonErrorHelp)("Broadcast ID and period are required.");
33
+ (0, node_process_1.exit)(1);
34
+ }
35
+ const periodNum = parseInt(period, 10);
36
+ if (isNaN(periodNum) || periodNum < 2 || periodNum > 60) {
37
+ (0, commandHandler_1.msgCommonErrorHelp)("Period must be a number between 2 and 60 seconds.");
38
+ (0, node_process_1.exit)(1);
39
+ }
40
+ const roundsArgIndex = args.findIndex((arg) => arg === "--rounds");
41
+ let roundsToFix = undefined;
42
+ if (roundsArgIndex !== -1 && roundsArgIndex + 1 < args.length) {
43
+ const roundsArg = args[roundsArgIndex + 1];
44
+ roundsToFix = roundsArg ? (0, commandHandler_1.translateRoundsToFix)(roundsArg) : undefined;
45
+ }
46
+ const broadcast = await (0, getInfoBroadcast_1.getBroadcast)(broadcastId);
47
+ if (!broadcast?.rounds || broadcast.rounds.length === 0) {
48
+ console.error(colors_1.default.red("No rounds found for the specified broadcast."));
49
+ (0, node_process_1.exit)(1);
50
+ }
51
+ await setPeriodRounds(broadcast.rounds, periodNum, roundsToFix);
52
+ };
53
+ exports.periodCommand = periodCommand;
@@ -19,6 +19,7 @@ const setLichessGames = (round, games) => (0, commandHandler_1.handleApiResponse
19
19
  },
20
20
  }), `Successfully set games for round ${colors_1.default.whiteBold(round.id)} to ${colors_1.default.whiteBold(games)}.`, `Error setting games for round ${colors_1.default.whiteBold(round.id)}`);
21
21
  const setLichessGamesCommand = async (args) => {
22
+ await (0, commandHandler_1.checkTokenScopes)();
22
23
  const bId = args.shift();
23
24
  const games = args.slice(0, 64).join(" ");
24
25
  if (!bId || !games) {
@@ -32,6 +32,7 @@ const setPGN = async (rounds, urlRound, setRoundFilter, setSliceFilter = null, r
32
32
  }
33
33
  };
34
34
  const setPGNCommand = async (args) => {
35
+ await (0, commandHandler_1.checkTokenScopes)();
35
36
  const [bId, sourcePGN] = args.slice(0, 2);
36
37
  if (!bId || !sourcePGN) {
37
38
  (0, commandHandler_1.msgCommonErrorHelp)("Broadcast ID and source PGN URL are required.");
@@ -66,6 +66,7 @@ const translateGamesToAdd = (arg, gamesN) => {
66
66
  return [...new Set(rounds)];
67
67
  };
68
68
  const setPGNMultiCommand = async (args) => {
69
+ await (0, commandHandler_1.checkTokenScopes)();
69
70
  const [bId, sourcePGNs, gamesN] = args.slice(0, 3);
70
71
  if (!bId || !sourcePGNs || !gamesN) {
71
72
  (0, commandHandler_1.msgCommonErrorHelp)("Broadcast ID, source PGN URLs, and number of games are required.");
@@ -24,6 +24,7 @@ const setStartsPrevious = async (rounds, startsPrevious) => {
24
24
  }
25
25
  };
26
26
  const startsPreviousCommand = async (args) => {
27
+ await (0, commandHandler_1.checkTokenScopes)();
27
28
  const [broadcastId, startsPrevious] = args.slice(0, 2);
28
29
  if (!broadcastId || !startsPrevious) {
29
30
  (0, commandHandler_1.msgCommonErrorHelp)("Broadcast ID and startsPrevious are required.");
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const node_util_1 = require("node:util");
4
4
  exports.default = {
5
5
  red: (text) => (0, node_util_1.styleText)("red", text),
6
+ redBold: (text) => (0, node_util_1.styleText)(["red", "bold"], text),
6
7
  blue: (text) => (0, node_util_1.styleText)("blue", text),
7
8
  boldYellow: (text) => (0, node_util_1.styleText)(["bold", "yellow"], text),
8
9
  underItalic: (text) => (0, node_util_1.styleText)(["underline", "italic"], text),
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.translateRoundsToFix = exports.handleApiResponse = exports.msgCommonErrorHelp = exports.sleep = exports.client = exports.commands = exports.Command = exports.args = exports.LICHESS_TOKEN = void 0;
6
+ exports.checkTokenScopes = exports.translateRoundsToFix = exports.handleApiResponse = exports.msgCommonErrorHelp = exports.sleep = exports.client = exports.commands = exports.Command = exports.args = exports.LICHESS_TOKEN = void 0;
7
7
  const node_process_1 = require("node:process");
8
8
  const openapi_fetch_1 = __importDefault(require("openapi-fetch"));
9
9
  const colors_1 = __importDefault(require("./colors"));
@@ -13,6 +13,7 @@ const setPGNMulti_1 = require("../cmd/setPGNMulti");
13
13
  const setLichessGames_1 = require("../cmd/setLichessGames");
14
14
  const fixSchedule_1 = require("../cmd/fixSchedule");
15
15
  const startsPrevious_1 = require("../cmd/startsPrevious");
16
+ const period_1 = require("../cmd/period");
16
17
  exports.LICHESS_TOKEN = node_process_1.env.LICHESS_TOKEN;
17
18
  const LICHESS_DOMAIN = (node_process_1.env.LICHESS_DOMAIN || "https://lichess.org").replace(/\/$/, "") + "/";
18
19
  exports.args = node_process_1.argv.slice(2);
@@ -24,6 +25,7 @@ var Command;
24
25
  Command["SetLichessGames"] = "setLichessGames";
25
26
  Command["FixSchedule"] = "fixSchedule";
26
27
  Command["StartsPrevious"] = "startsPrevious";
28
+ Command["Period"] = "period";
27
29
  })(Command || (exports.Command = Command = {}));
28
30
  exports.commands = new Map([
29
31
  [Command.Delay, delay_1.delayCommand],
@@ -32,6 +34,7 @@ exports.commands = new Map([
32
34
  [Command.SetLichessGames, setLichessGames_1.setLichessGamesCommand],
33
35
  [Command.FixSchedule, fixSchedule_1.fixScheduleCommand],
34
36
  [Command.StartsPrevious, startsPrevious_1.startsPreviousCommand],
37
+ [Command.Period, period_1.periodCommand],
35
38
  ]);
36
39
  exports.client = (0, openapi_fetch_1.default)({
37
40
  baseUrl: LICHESS_DOMAIN,
@@ -94,3 +97,29 @@ const translateRoundsToFix = (arg) => {
94
97
  return [...new Set(rounds)];
95
98
  };
96
99
  exports.translateRoundsToFix = translateRoundsToFix;
100
+ const checkTokenScopes = async (modRequired) => {
101
+ const requiredScopes = ["study:read", "study:write"];
102
+ if (modRequired)
103
+ requiredScopes.push("web:mod");
104
+ await exports.client
105
+ .POST("/api/token/test", {
106
+ headers: {
107
+ "Content-Type": "text/plain",
108
+ },
109
+ body: exports.LICHESS_TOKEN,
110
+ bodySerializer: (body) => body,
111
+ })
112
+ .then((response) => response.data)
113
+ .then((data) => {
114
+ let scopes = data?.[exports.LICHESS_TOKEN]?.scopes;
115
+ return scopes ? scopes.split(",") : [];
116
+ })
117
+ .then((scopes) => {
118
+ const missingScopes = requiredScopes.filter((scope) => !scopes.includes(scope));
119
+ if (missingScopes.length > 0) {
120
+ console.error(colors_1.default.red(`Error: Missing required token scopes: ${missingScopes.join(", ")}`));
121
+ process.exit(1);
122
+ }
123
+ });
124
+ };
125
+ exports.checkTokenScopes = checkTokenScopes;
@@ -7,15 +7,16 @@ exports.includeHelp = exports.showHelp = void 0;
7
7
  const commandHandler_1 = require("./commandHandler");
8
8
  const colors_1 = __importDefault(require("./colors"));
9
9
  const helpDelay = [
10
- ` ${colors_1.default.underItalic("delay <broadcastId> <delayInSeconds> [--onlyDelay] [--noDelay]")}`,
10
+ ` ${colors_1.default.underItalic("delay <broadcastId> <delayInSeconds> [--onlyDelay] [--noDelay] [--rounds <roundsToFix>]")} `,
11
11
  ` ${colors_1.default.gray("Sets the delay for all rounds in the specified broadcast.")}`,
12
12
  ` ${colors_1.default.bold("Note:")} ${colors_1.default.gray("The delay is specified in seconds. (max 3600 seconds = 1 hour)")}`,
13
13
  ` ${colors_1.default.bold("Options:")}`,
14
14
  ` --onlyDelay ${colors_1.default.gray("Set only the delay without changing the start time.")}`,
15
15
  ` --noDelay ${colors_1.default.gray("Do not modify the delay, only adjust the start time.")}`,
16
+ ` --rounds <roundsToFix> ${colors_1.default.gray("Specify which rounds to fix using formats like '1-4', '8+', '3,5,7', etc.")}`,
16
17
  ].join("\n");
17
18
  const helpSetPGN = [
18
- ` ${colors_1.default.underItalic("setPGN <broadcastId> <sourcePGNUrl> [--withFilter] [--slice <sliceFilter>]")}`,
19
+ ` ${colors_1.default.underItalic("setPGN <broadcastId> <sourcePGNUrl> [--withFilter] [--slice <sliceFilter>] [--rounds <roundsToFix>]")}`,
19
20
  ` ${colors_1.default.gray("Sets the source PGN URL for all rounds in the specified broadcast.")}`,
20
21
  ` ${colors_1.default.italic("(optional)")} ${colors_1.default.gray('Use "{}" in the URL as a placeholder for the round number.')}`,
21
22
  ` ${colors_1.default.bold("Note:")} ${colors_1.default.gray('For livechesscloud URLs, please ensure it ends with "/{}".')}`,
@@ -25,7 +26,7 @@ const helpSetPGN = [
25
26
  ` --rounds <roundsToFix> ${colors_1.default.gray("Specify which rounds to fix using formats like '1-4', '8+', '3,5,7', etc.")}`,
26
27
  ].join("\n");
27
28
  const helpSetPGNMulti = [
28
- ` ${colors_1.default.underItalic("setPGNMulti <broadcastId> <sourcePGNUrl> <gamesNum> [--withFilter] [--onlyGames <sliceFilter>]")}`,
29
+ ` ${colors_1.default.underItalic("setPGNMulti <broadcastId> <sourcePGNUrl> <gamesNum> [--withFilter] [--onlyGames <sliceFilter>] [--rounds <roundsToFix>]")}`,
29
30
  ` ${colors_1.default.gray("Sets the source PGN URLs for all rounds in the specified broadcast.")}`,
30
31
  ` ${colors_1.default.gray("Use {r} in the URL as a placeholder for the round number and {g} for the game number.")}`,
31
32
  ` ${colors_1.default.gray("Use the gamesNum parameter to specify how many games per round.")}`,
@@ -51,6 +52,14 @@ const helpStartsPrevious = [
51
52
  ` ${colors_1.default.underItalic("startsPrevious <broadcastId> <startsPrevious>")}`,
52
53
  ` ${colors_1.default.gray("Sets the startsAfterPrevious flag for all rounds in the specified broadcast.")}`,
53
54
  ].join("\n");
55
+ const helpSetPeriod = [
56
+ ` ${colors_1.default.underItalic("period <broadcastId> <periodInSeconds>")}`,
57
+ ` ${colors_1.default.gray("Sets the period between polling for all rounds in the specified broadcast.")}`,
58
+ ` ${colors_1.default.redBold("Required:")} ${colors_1.default.gray(`Your Lichess token needs the ${colors_1.default.whiteBold("web:mod")} scope to use this command. (Broadcast/Study Admin perm required)`)}`,
59
+ ` ${colors_1.default.bold("Note:")} ${colors_1.default.gray("The period is specified in seconds.")}`,
60
+ ` ${colors_1.default.bold("Options:")}`,
61
+ ` --rounds <roundsToFix> ${colors_1.default.gray("Specify which rounds to fix using formats like '1-4', '8+', '3,5,7', etc.")}`,
62
+ ].join("\n");
54
63
  const msg = [
55
64
  `${colors_1.default.boldYellow("Usage:")} ${colors_1.default.underItalic("<command> [options]")}`,
56
65
  ``,
@@ -68,6 +77,8 @@ const msg = [
68
77
  ``,
69
78
  helpStartsPrevious,
70
79
  ``,
80
+ helpSetPeriod,
81
+ ``,
71
82
  ``,
72
83
  `${colors_1.default.boldYellow("Examples:")}`,
73
84
  ` ${colors_1.default.gray("# Set a 5-minute delay without changing start time")}`,
@@ -91,6 +102,7 @@ const showHelp = (cmd) => {
91
102
  [commandHandler_1.Command.SetLichessGames]: helpSetLichessGames,
92
103
  [commandHandler_1.Command.FixSchedule]: helpFixSchedule,
93
104
  [commandHandler_1.Command.StartsPrevious]: helpStartsPrevious,
105
+ [commandHandler_1.Command.Period]: helpSetPeriod,
94
106
  };
95
107
  const range = cmd ? ranges[cmd] : undefined;
96
108
  console.info(range ? range : msg.join("\n"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libroadcast-cli",
3
- "version": "1.10.2",
3
+ "version": "1.11.1",
4
4
  "description": "CLI to help with broadcast maintenance on Lichess",
5
5
  "main": "dist/index.js",
6
6
  "keywords": [
@@ -12,8 +12,8 @@
12
12
  "license": "MIT",
13
13
  "type": "commonjs",
14
14
  "dependencies": {
15
- "@lichess-org/types": "^2.0.96",
16
- "@types/node": "^24.10.0",
15
+ "@lichess-org/types": "^2.0.106",
16
+ "@types/node": "^24.10.1",
17
17
  "ms": "3.0.0-canary.202508261828",
18
18
  "openapi-fetch": "^0.15.0"
19
19
  },
package/cmdhelp.txt DELETED
@@ -1,57 +0,0 @@
1
- Usage: <command> [options]
2
-
3
-
4
- Commands:
5
- delay <broadcastId> <delayInSeconds> [--onlyDelay] [--noDelay]
6
- Sets the delay for all rounds in the specified broadcast.
7
- Note: The delay is specified in seconds. (max 3600 seconds = 1 hour)
8
- Options:
9
- --onlyDelay Set only the delay without changing the start time.
10
- --noDelay Do not modify the delay, only adjust the start time.
11
-
12
- setPGN <broadcastId> <sourcePGNUrl> [--withFilter] [--slice <sliceFilter>]
13
- Sets the source PGN URL for all rounds in the specified broadcast.
14
- (optional) Use "{}" in the URL as a placeholder for the round number.
15
- Note: For livechesscloud URLs, please ensure it ends with "/{}".
16
- Options:
17
- --withFilter Apply round number filtering based on round number.
18
- --slice <sliceFilter> Apply slice filtering using the provided filter string.
19
- --rounds <roundsToFix> Specify which rounds to fix using formats like '1-4', '8+', '3,5,7', etc.
20
-
21
- setPGNMulti <broadcastId> <sourcePGNUrl> <gamesNum> [--withFilter] [--onlyGames <sliceFilter>]
22
- Sets the source PGN URLs for all rounds in the specified broadcast.
23
- Use {r} in the URL as a placeholder for the round number and {g} for the game number.
24
- Use the gamesNum parameter to specify how many games per round.
25
- Note: For broadcasts with multiple rounds, the source PGN URLs must include the "{g}" placeholder for round numbers.
26
- Options:
27
- --withFilter Apply round number filtering based on round number.
28
- --onlyGames <sliceFilter> Apply slice filtering using the provided filter string.
29
- --rounds <roundsToFix> Specify which rounds to fix using formats like '1-4', '8+', '3,5,7', etc.
30
-
31
- setLichessGames <broadcastRoundId> <gameIds...>
32
- Sets the games for the specified broadcast round using Lichess game IDs.
33
- Note: Maximum of 64 game IDs can be provided.
34
-
35
- fixSchedule <broadcastId> <timeDiff> [--rounds <roundsToFix>]
36
- Fixes the schedule of rounds in the specified broadcast by applying a time difference.
37
- Note: The time difference should be in a format like "1h", "30m", "15s", etc.
38
- Options:
39
- --rounds <roundsToFix> Specify which rounds to fix using formats like '1-4', '8+', '3,5,7', etc.
40
-
41
- startsPrevious <broadcastId> <startsPrevious>
42
- Sets the startsAfterPrevious flag for all rounds in the specified broadcast.
43
-
44
-
45
- Examples:
46
- # Set a 5-minute delay without changing start time
47
- $ delay bcast123 300 --onlyDelay
48
- # Set source PGN URL with round and slice filters
49
- $ setPGN bcast123 https://example.com/pgns/round-{}/game.pgn --withFilter --slice "1-5,7,9-12"
50
- # Set source PGN URLs for multiple games per round
51
- $ setPGNMulti bcast123 https://example.com/pgns/round-{r}/game-{g}.pgn 12 --withFilter --onlyGames "1-5,7,9-12"
52
- # Set Lichess games for a broadcast round
53
- $ setLichessGames round456 gameId1 gameId2 gameId3
54
- # Fix schedule of rounds 1 to 4 and all rounds after 8 by adding 15 minutes
55
- $ fixSchedule bcast123 15m --rounds 1-4,8+
56
- # Set startsAfterPrevious to true for all rounds in a broadcast
57
- $ startsPrevious bcast123 true