backlog-exporter 0.6.0 → 0.6.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 +64 -8
- package/dist/commands/all/index.d.ts +2 -0
- package/dist/commands/all/index.js +124 -75
- package/oclif.manifest.json +50 -32
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,6 +15,8 @@ Backlog のデータをエクスポートするためのコマンドラインツ
|
|
|
15
15
|
* [Wikiのエクスポート](#wikiのエクスポート)
|
|
16
16
|
* [ドキュメントのエクスポート](#ドキュメントのエクスポート)
|
|
17
17
|
* [課題・Wiki・ドキュメントの一括エクスポート](#課題wikiドキュメントの一括エクスポート)
|
|
18
|
+
* [特定のデータタイプのみをエクスポート(onlyフラグ)](#特定のデータタイプのみをエクスポートonlyフラグ)
|
|
19
|
+
* [特定のデータタイプを除外してエクスポート(excludeフラグ)](#特定のデータタイプを除外してエクスポートexcludeフラグ)
|
|
18
20
|
* [データの更新](#データの更新)
|
|
19
21
|
* [npxを使った課題のエクスポート](#npxを使った課題のエクスポート)
|
|
20
22
|
* [npxを使ったデータの更新](#npxを使ったデータの更新)
|
|
@@ -31,6 +33,12 @@ Backlog のデータをエクスポートするためのコマンドラインツ
|
|
|
31
33
|
* [課題・Wiki・ドキュメント の一括エクスポート](#課題wikiドキュメント-の一括エクスポート)
|
|
32
34
|
* [基本的な使用方法](#基本的な使用方法)
|
|
33
35
|
* [出力先を指定](#出力先を指定)
|
|
36
|
+
* [特定のデータタイプのみをエクスポート(onlyフラグ)](#特定のデータタイプのみをエクスポートonlyフラグ)
|
|
37
|
+
* [特定のデータタイプを除外してエクスポート(excludeフラグ)](#特定のデータタイプを除外してエクスポートexcludeフラグ)
|
|
38
|
+
* [課題とWikiのみをエクスポート](#課題とwikiのみをエクスポート)
|
|
39
|
+
* [ドキュメントのみをエクスポート](#ドキュメントのみをエクスポート)
|
|
40
|
+
* [ドキュメント以外(課題とWiki)をエクスポート](#ドキュメント以外課題とwikiをエクスポート)
|
|
41
|
+
* [課題以外(WikiとDocuments)をエクスポート](#課題以外wikiとdocumentsをエクスポート)
|
|
34
42
|
* [データの更新](#データの更新)
|
|
35
43
|
* [カレントディレクトリとそのサブディレクトリのデータを更新](#カレントディレクトリとそのサブディレクトリのデータを更新)
|
|
36
44
|
* [指定したディレクトリとそのサブディレクトリのデータを更新](#指定したディレクトリとそのサブディレクトリのデータを更新)
|
|
@@ -66,7 +74,7 @@ $ npm install -g backlog-exporter
|
|
|
66
74
|
$ backlog-exporter COMMAND
|
|
67
75
|
running command...
|
|
68
76
|
$ backlog-exporter (--version)
|
|
69
|
-
backlog-exporter/0.6.
|
|
77
|
+
backlog-exporter/0.6.1 linux-x64 node-v24.3.0
|
|
70
78
|
$ backlog-exporter --help [COMMAND]
|
|
71
79
|
USAGE
|
|
72
80
|
$ backlog-exporter COMMAND
|
|
@@ -99,6 +107,12 @@ $ backlog-exporter document --domain example.backlog.jp --projectIdOrKey PROJECT
|
|
|
99
107
|
# 課題・Wiki・ドキュメントの一括エクスポート
|
|
100
108
|
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./backlog-data
|
|
101
109
|
|
|
110
|
+
# 特定のデータタイプのみをエクスポート(onlyフラグ)
|
|
111
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --only issues,wiki
|
|
112
|
+
|
|
113
|
+
# 特定のデータタイプを除外してエクスポート(excludeフラグ)
|
|
114
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --exclude documents
|
|
115
|
+
|
|
102
116
|
# データの更新
|
|
103
117
|
$ backlog-exporter update
|
|
104
118
|
```
|
|
@@ -220,10 +234,44 @@ $ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY
|
|
|
220
234
|
|
|
221
235
|
# 出力先を指定
|
|
222
236
|
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./backlog-data
|
|
237
|
+
|
|
238
|
+
# 特定のデータタイプのみをエクスポート(onlyフラグ)
|
|
239
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --only issues,wiki
|
|
240
|
+
|
|
241
|
+
# 特定のデータタイプを除外してエクスポート(excludeフラグ)
|
|
242
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --exclude documents
|
|
223
243
|
```
|
|
224
244
|
|
|
225
245
|
一括エクスポートでは、課題は`issues`ディレクトリに、Wiki は`wiki`ディレクトリに、ドキュメントは`documents`ディレクトリに保存されます。
|
|
226
246
|
|
|
247
|
+
## エクスポート対象の制御
|
|
248
|
+
|
|
249
|
+
`all`コマンドでは、以下のフラグを使用してエクスポート対象を制御できます:
|
|
250
|
+
|
|
251
|
+
### --only フラグ
|
|
252
|
+
特定のデータタイプのみをエクスポートします。カンマ区切りで複数指定可能です。
|
|
253
|
+
|
|
254
|
+
```sh
|
|
255
|
+
# 課題とWikiのみをエクスポート
|
|
256
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --only issues,wiki
|
|
257
|
+
|
|
258
|
+
# ドキュメントのみをエクスポート
|
|
259
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --only documents
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### --exclude フラグ
|
|
263
|
+
特定のデータタイプを除外してエクスポートします。カンマ区切りで複数指定可能です。
|
|
264
|
+
|
|
265
|
+
```sh
|
|
266
|
+
# ドキュメント以外(課題とWiki)をエクスポート
|
|
267
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --exclude documents
|
|
268
|
+
|
|
269
|
+
# 課題以外(WikiとDocuments)をエクスポート
|
|
270
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --exclude issues
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
**注意**: `--only`と`--exclude`フラグは同時に使用できません。どちらか一方を使用してください。
|
|
274
|
+
|
|
227
275
|
# データの更新
|
|
228
276
|
|
|
229
277
|
`update`コマンドを使用すると、既存のエクスポートデータを最新の状態に更新できます。このコマンドは、ディレクトリ内の`backlog-settings.json`ファイルを探索し、見つかったディレクトリでデータを更新します。
|
|
@@ -279,14 +327,16 @@ Backlogから課題・Wiki・ドキュメントを取得してMarkdownファイ
|
|
|
279
327
|
|
|
280
328
|
```
|
|
281
329
|
USAGE
|
|
282
|
-
$ backlog-exporter all --domain <value> --projectIdOrKey <value> [--apiKey <value>] [
|
|
283
|
-
<value>]
|
|
330
|
+
$ backlog-exporter all --domain <value> --projectIdOrKey <value> [--apiKey <value>] [--exclude <value>]
|
|
331
|
+
[-m <value>] [--only <value>] [-o <value>]
|
|
284
332
|
|
|
285
333
|
FLAGS
|
|
286
334
|
-m, --maxCount=<value> [default: 5000] 一度に取得する課題の最大数(デフォルト: 5000)
|
|
287
335
|
-o, --output=<value> 出力ディレクトリパス
|
|
288
336
|
--apiKey=<value> Backlog API key (環境変数 BACKLOG_API_KEY からも自動読み取り可能)
|
|
289
337
|
--domain=<value> (required) Backlog domain (e.g. example.backlog.jp)
|
|
338
|
+
--exclude=<value> Exclude the specified types, separated by commas (e.g., 'documents,wiki')
|
|
339
|
+
--only=<value> Export only the specified types, separated by commas (e.g., 'issues,wiki')
|
|
290
340
|
--projectIdOrKey=<value> (required) Backlog project ID or key
|
|
291
341
|
|
|
292
342
|
DESCRIPTION
|
|
@@ -299,11 +349,17 @@ EXAMPLES
|
|
|
299
349
|
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-project
|
|
300
350
|
指定したディレクトリに課題・Wiki・ドキュメントを保存する
|
|
301
351
|
|
|
352
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --only issues,wiki
|
|
353
|
+
課題とWikiのみを取得する
|
|
354
|
+
|
|
355
|
+
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --exclude documents
|
|
356
|
+
ドキュメント以外(課題とWiki)を取得する
|
|
357
|
+
|
|
302
358
|
$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --maxCount 1000
|
|
303
359
|
最大1000件の課題を取得する(デフォルトは5000件)
|
|
304
360
|
```
|
|
305
361
|
|
|
306
|
-
_See code: [src/commands/all/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.6.
|
|
362
|
+
_See code: [src/commands/all/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.6.1/src/commands/all/index.ts)_
|
|
307
363
|
|
|
308
364
|
## `backlog-exporter document`
|
|
309
365
|
|
|
@@ -335,7 +391,7 @@ EXAMPLES
|
|
|
335
391
|
キーワード「仕様書」を含むドキュメントのみを取得する
|
|
336
392
|
```
|
|
337
393
|
|
|
338
|
-
_See code: [src/commands/document/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.6.
|
|
394
|
+
_See code: [src/commands/document/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.6.1/src/commands/document/index.ts)_
|
|
339
395
|
|
|
340
396
|
## `backlog-exporter help [COMMAND]`
|
|
341
397
|
|
|
@@ -391,7 +447,7 @@ EXAMPLES
|
|
|
391
447
|
最大10000件の課題を取得する(デフォルトは5000件)
|
|
392
448
|
```
|
|
393
449
|
|
|
394
|
-
_See code: [src/commands/issue/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.6.
|
|
450
|
+
_See code: [src/commands/issue/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.6.1/src/commands/issue/index.ts)_
|
|
395
451
|
|
|
396
452
|
## `backlog-exporter plugins`
|
|
397
453
|
|
|
@@ -721,7 +777,7 @@ EXAMPLES
|
|
|
721
777
|
指定したディレクトリの設定を使用して更新する
|
|
722
778
|
```
|
|
723
779
|
|
|
724
|
-
_See code: [src/commands/update/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.6.
|
|
780
|
+
_See code: [src/commands/update/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.6.1/src/commands/update/index.ts)_
|
|
725
781
|
|
|
726
782
|
## `backlog-exporter wiki`
|
|
727
783
|
|
|
@@ -748,7 +804,7 @@ EXAMPLES
|
|
|
748
804
|
指定したディレクトリにWikiを保存する
|
|
749
805
|
```
|
|
750
806
|
|
|
751
|
-
_See code: [src/commands/wiki/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.6.
|
|
807
|
+
_See code: [src/commands/wiki/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.6.1/src/commands/wiki/index.ts)_
|
|
752
808
|
<!-- commandsstop -->
|
|
753
809
|
|
|
754
810
|
# 出力形式
|
|
@@ -5,7 +5,9 @@ export default class All extends Command {
|
|
|
5
5
|
static flags: {
|
|
6
6
|
apiKey: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
7
|
domain: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
exclude: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
9
|
maxCount: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
only: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
11
|
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
12
|
projectIdOrKey: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
13
|
};
|
|
@@ -15,6 +15,12 @@ export default class All extends Command {
|
|
|
15
15
|
`,
|
|
16
16
|
`<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-project
|
|
17
17
|
指定したディレクトリに課題・Wiki・ドキュメントを保存する
|
|
18
|
+
`,
|
|
19
|
+
`<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --only issues,wiki
|
|
20
|
+
課題とWikiのみを取得する
|
|
21
|
+
`,
|
|
22
|
+
`<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --exclude documents
|
|
23
|
+
ドキュメント以外(課題とWiki)を取得する
|
|
18
24
|
`,
|
|
19
25
|
`<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --maxCount 1000
|
|
20
26
|
最大1000件の課題を取得する(デフォルトは5000件)
|
|
@@ -29,12 +35,20 @@ export default class All extends Command {
|
|
|
29
35
|
description: 'Backlog domain (e.g. example.backlog.jp)',
|
|
30
36
|
required: true,
|
|
31
37
|
}),
|
|
38
|
+
exclude: Flags.string({
|
|
39
|
+
description: "Exclude the specified types, separated by commas (e.g., 'documents,wiki')",
|
|
40
|
+
required: false,
|
|
41
|
+
}),
|
|
32
42
|
maxCount: Flags.integer({
|
|
33
43
|
char: 'm',
|
|
34
44
|
default: 5000,
|
|
35
45
|
description: '一度に取得する課題の最大数(デフォルト: 5000)',
|
|
36
46
|
required: false,
|
|
37
47
|
}),
|
|
48
|
+
only: Flags.string({
|
|
49
|
+
description: "Export only the specified types, separated by commas (e.g., 'issues,wiki')",
|
|
50
|
+
required: false,
|
|
51
|
+
}),
|
|
38
52
|
output: Flags.string({
|
|
39
53
|
char: 'o',
|
|
40
54
|
description: '出力ディレクトリパス',
|
|
@@ -48,88 +62,123 @@ export default class All extends Command {
|
|
|
48
62
|
async run() {
|
|
49
63
|
const { flags } = await this.parse(All);
|
|
50
64
|
try {
|
|
51
|
-
const { domain, maxCount, projectIdOrKey } = flags;
|
|
65
|
+
const { domain, exclude, maxCount, only, projectIdOrKey } = flags;
|
|
52
66
|
const apiKey = flags.apiKey || getApiKey(this);
|
|
53
67
|
const outputRoot = flags.output || './backlog-data';
|
|
68
|
+
// Check for conflicting flags
|
|
69
|
+
if (only && exclude) {
|
|
70
|
+
this.error('Cannot use both --only and --exclude flags together. Please use only one.');
|
|
71
|
+
}
|
|
72
|
+
// Determine targets based on flags
|
|
73
|
+
let targets;
|
|
74
|
+
if (only) {
|
|
75
|
+
targets = only.split(',');
|
|
76
|
+
}
|
|
77
|
+
else if (exclude) {
|
|
78
|
+
const excludeTargets = exclude.split(',');
|
|
79
|
+
const allTargets = ['issues', 'wiki', 'documents'];
|
|
80
|
+
targets = allTargets.filter(target => !excludeTargets.includes(target));
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
targets = ['issues', 'wiki', 'documents'];
|
|
84
|
+
}
|
|
85
|
+
// Validate targets
|
|
86
|
+
const validTargets = ['issues', 'wiki', 'documents'];
|
|
87
|
+
const inputTargets = only ? only.split(',') : exclude ? exclude.split(',') : [];
|
|
88
|
+
for (const target of inputTargets) {
|
|
89
|
+
if (!validTargets.includes(target)) {
|
|
90
|
+
this.error(`Invalid target '${target}'. Available targets are: ${validTargets.join(', ')}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// Check if any targets remain after exclusion
|
|
94
|
+
if (targets.length === 0) {
|
|
95
|
+
this.error('No targets remaining after exclusion. Please specify valid targets to export.');
|
|
96
|
+
}
|
|
54
97
|
// 出力ディレクトリの作成
|
|
55
98
|
await createOutputDirectory(outputRoot);
|
|
56
99
|
// プロジェクトキーからプロジェクトIDを取得
|
|
57
100
|
const projectId = await validateAndGetProjectId(domain, projectIdOrKey, apiKey);
|
|
58
101
|
this.log(`プロジェクトID: ${projectId} を使用します`);
|
|
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
|
-
|
|
102
|
+
if (targets.includes('issues')) {
|
|
103
|
+
// 課題の出力ディレクトリ
|
|
104
|
+
const issueOutput = path.join(outputRoot, 'issues');
|
|
105
|
+
await createOutputDirectory(issueOutput);
|
|
106
|
+
// 課題フォルダに設定ファイルを保存
|
|
107
|
+
await updateSettings(issueOutput, {
|
|
108
|
+
apiKey,
|
|
109
|
+
domain,
|
|
110
|
+
folderType: FolderType.ISSUE,
|
|
111
|
+
outputDir: issueOutput,
|
|
112
|
+
projectIdOrKey,
|
|
113
|
+
});
|
|
114
|
+
// 課題の取得と保存
|
|
115
|
+
this.log('課題の取得を開始します...');
|
|
116
|
+
await downloadIssues(this, {
|
|
117
|
+
apiKey,
|
|
118
|
+
count: maxCount,
|
|
119
|
+
domain,
|
|
120
|
+
outputDir: issueOutput,
|
|
121
|
+
projectId,
|
|
122
|
+
});
|
|
123
|
+
// 課題フォルダの最終更新日時を更新
|
|
124
|
+
await updateSettings(issueOutput, {
|
|
125
|
+
lastUpdated: new Date().toISOString(),
|
|
126
|
+
});
|
|
127
|
+
this.log('課題の取得が完了しました');
|
|
128
|
+
}
|
|
129
|
+
if (targets.includes('wiki')) {
|
|
130
|
+
// Wikiの出力ディレクトリ
|
|
131
|
+
const wikiOutput = path.join(outputRoot, 'wiki');
|
|
132
|
+
await createOutputDirectory(wikiOutput);
|
|
133
|
+
// Wikiフォルダに設定ファイルを保存
|
|
134
|
+
await updateSettings(wikiOutput, {
|
|
135
|
+
apiKey,
|
|
136
|
+
domain,
|
|
137
|
+
folderType: FolderType.WIKI,
|
|
138
|
+
outputDir: wikiOutput,
|
|
139
|
+
projectIdOrKey,
|
|
140
|
+
});
|
|
141
|
+
// Wikiの取得と保存
|
|
142
|
+
this.log('Wikiの取得を開始します...');
|
|
143
|
+
await downloadWikis(this, {
|
|
144
|
+
apiKey,
|
|
145
|
+
domain,
|
|
146
|
+
outputDir: wikiOutput,
|
|
147
|
+
projectIdOrKey,
|
|
148
|
+
});
|
|
149
|
+
// Wikiフォルダの最終更新日時を更新
|
|
150
|
+
await updateSettings(wikiOutput, {
|
|
151
|
+
lastUpdated: new Date().toISOString(),
|
|
152
|
+
});
|
|
153
|
+
this.log('Wikiの取得が完了しました');
|
|
154
|
+
}
|
|
155
|
+
if (targets.includes('documents')) {
|
|
156
|
+
// ドキュメントの出力ディレクトリ
|
|
157
|
+
const documentOutput = path.join(outputRoot, 'documents');
|
|
158
|
+
await createOutputDirectory(documentOutput);
|
|
159
|
+
// ドキュメントフォルダに設定ファイルを保存
|
|
160
|
+
await updateSettings(documentOutput, {
|
|
161
|
+
apiKey,
|
|
162
|
+
domain,
|
|
163
|
+
folderType: FolderType.DOCUMENT,
|
|
164
|
+
outputDir: documentOutput,
|
|
165
|
+
projectIdOrKey,
|
|
166
|
+
});
|
|
167
|
+
// ドキュメントの取得と保存
|
|
168
|
+
this.log('ドキュメントの取得を開始します...');
|
|
169
|
+
await downloadDocuments(this, {
|
|
170
|
+
apiKey,
|
|
171
|
+
domain,
|
|
172
|
+
outputDir: documentOutput,
|
|
173
|
+
projectId,
|
|
174
|
+
projectIdOrKey,
|
|
175
|
+
});
|
|
176
|
+
// ドキュメントフォルダの最終更新日時を更新
|
|
177
|
+
await updateSettings(documentOutput, {
|
|
178
|
+
lastUpdated: new Date().toISOString(),
|
|
179
|
+
});
|
|
180
|
+
this.log('ドキュメントの取得が完了しました');
|
|
181
|
+
}
|
|
133
182
|
this.log('すべてのデータの取得が完了しました!');
|
|
134
183
|
}
|
|
135
184
|
catch (error) {
|
package/oclif.manifest.json
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
"examples": [
|
|
8
8
|
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY\n課題・Wiki・ドキュメントをMarkdownファイルとして保存する\n",
|
|
9
9
|
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-project\n指定したディレクトリに課題・Wiki・ドキュメントを保存する\n",
|
|
10
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --only issues,wiki\n課題とWikiのみを取得する\n",
|
|
11
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --exclude documents\nドキュメント以外(課題とWiki)を取得する\n",
|
|
10
12
|
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --maxCount 1000\n最大1000件の課題を取得する(デフォルトは5000件)\n"
|
|
11
13
|
],
|
|
12
14
|
"flags": {
|
|
@@ -26,6 +28,14 @@
|
|
|
26
28
|
"multiple": false,
|
|
27
29
|
"type": "option"
|
|
28
30
|
},
|
|
31
|
+
"exclude": {
|
|
32
|
+
"description": "Exclude the specified types, separated by commas (e.g., 'documents,wiki')",
|
|
33
|
+
"name": "exclude",
|
|
34
|
+
"required": false,
|
|
35
|
+
"hasDynamicHelp": false,
|
|
36
|
+
"multiple": false,
|
|
37
|
+
"type": "option"
|
|
38
|
+
},
|
|
29
39
|
"maxCount": {
|
|
30
40
|
"char": "m",
|
|
31
41
|
"description": "一度に取得する課題の最大数(デフォルト: 5000)",
|
|
@@ -36,6 +46,14 @@
|
|
|
36
46
|
"multiple": false,
|
|
37
47
|
"type": "option"
|
|
38
48
|
},
|
|
49
|
+
"only": {
|
|
50
|
+
"description": "Export only the specified types, separated by commas (e.g., 'issues,wiki')",
|
|
51
|
+
"name": "only",
|
|
52
|
+
"required": false,
|
|
53
|
+
"hasDynamicHelp": false,
|
|
54
|
+
"multiple": false,
|
|
55
|
+
"type": "option"
|
|
56
|
+
},
|
|
39
57
|
"output": {
|
|
40
58
|
"char": "o",
|
|
41
59
|
"description": "出力ディレクトリパス",
|
|
@@ -70,15 +88,14 @@
|
|
|
70
88
|
"index.js"
|
|
71
89
|
]
|
|
72
90
|
},
|
|
73
|
-
"
|
|
91
|
+
"document": {
|
|
74
92
|
"aliases": [],
|
|
75
93
|
"args": {},
|
|
76
|
-
"description": "Backlog
|
|
94
|
+
"description": "Backlogからドキュメントを取得してMarkdownファイルとして保存する",
|
|
77
95
|
"examples": [
|
|
78
|
-
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY\n
|
|
79
|
-
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-
|
|
80
|
-
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --
|
|
81
|
-
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --maxCount 10000\n最大10000件の課題を取得する(デフォルトは5000件)\n"
|
|
96
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY\nドキュメントをMarkdownファイルとして保存する\n",
|
|
97
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-documents\n指定したディレクトリにドキュメントを保存する\n",
|
|
98
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --keyword 仕様書\nキーワード「仕様書」を含むドキュメントのみを取得する\n"
|
|
82
99
|
],
|
|
83
100
|
"flags": {
|
|
84
101
|
"apiKey": {
|
|
@@ -97,12 +114,10 @@
|
|
|
97
114
|
"multiple": false,
|
|
98
115
|
"type": "option"
|
|
99
116
|
},
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"name": "maxCount",
|
|
117
|
+
"keyword": {
|
|
118
|
+
"description": "検索キーワード",
|
|
119
|
+
"name": "keyword",
|
|
104
120
|
"required": false,
|
|
105
|
-
"default": 5000,
|
|
106
121
|
"hasDynamicHelp": false,
|
|
107
122
|
"multiple": false,
|
|
108
123
|
"type": "option"
|
|
@@ -123,19 +138,11 @@
|
|
|
123
138
|
"hasDynamicHelp": false,
|
|
124
139
|
"multiple": false,
|
|
125
140
|
"type": "option"
|
|
126
|
-
},
|
|
127
|
-
"statusId": {
|
|
128
|
-
"description": "ステータスID(カンマ区切りで複数指定可能)",
|
|
129
|
-
"name": "statusId",
|
|
130
|
-
"required": false,
|
|
131
|
-
"hasDynamicHelp": false,
|
|
132
|
-
"multiple": false,
|
|
133
|
-
"type": "option"
|
|
134
141
|
}
|
|
135
142
|
},
|
|
136
143
|
"hasDynamicHelp": false,
|
|
137
144
|
"hiddenAliases": [],
|
|
138
|
-
"id": "
|
|
145
|
+
"id": "document",
|
|
139
146
|
"pluginAlias": "backlog-exporter",
|
|
140
147
|
"pluginName": "backlog-exporter",
|
|
141
148
|
"pluginType": "core",
|
|
@@ -145,18 +152,19 @@
|
|
|
145
152
|
"relativePath": [
|
|
146
153
|
"dist",
|
|
147
154
|
"commands",
|
|
148
|
-
"
|
|
155
|
+
"document",
|
|
149
156
|
"index.js"
|
|
150
157
|
]
|
|
151
158
|
},
|
|
152
|
-
"
|
|
159
|
+
"issue": {
|
|
153
160
|
"aliases": [],
|
|
154
161
|
"args": {},
|
|
155
|
-
"description": "Backlog
|
|
162
|
+
"description": "Backlogから課題を取得してMarkdownファイルとして保存する",
|
|
156
163
|
"examples": [
|
|
157
|
-
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY\n
|
|
158
|
-
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-
|
|
159
|
-
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --
|
|
164
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY\n課題をMarkdownファイルとして保存する\n",
|
|
165
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./my-issues\n指定したディレクトリに課題を保存する\n",
|
|
166
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --statusId 1,2,3\n指定したステータスIDの課題のみを取得する\n",
|
|
167
|
+
"<%= config.bin %> <%= command.id %> --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --maxCount 10000\n最大10000件の課題を取得する(デフォルトは5000件)\n"
|
|
160
168
|
],
|
|
161
169
|
"flags": {
|
|
162
170
|
"apiKey": {
|
|
@@ -175,10 +183,12 @@
|
|
|
175
183
|
"multiple": false,
|
|
176
184
|
"type": "option"
|
|
177
185
|
},
|
|
178
|
-
"
|
|
179
|
-
"
|
|
180
|
-
"
|
|
186
|
+
"maxCount": {
|
|
187
|
+
"char": "m",
|
|
188
|
+
"description": "一度に取得する課題の最大数(デフォルト: 5000)",
|
|
189
|
+
"name": "maxCount",
|
|
181
190
|
"required": false,
|
|
191
|
+
"default": 5000,
|
|
182
192
|
"hasDynamicHelp": false,
|
|
183
193
|
"multiple": false,
|
|
184
194
|
"type": "option"
|
|
@@ -199,11 +209,19 @@
|
|
|
199
209
|
"hasDynamicHelp": false,
|
|
200
210
|
"multiple": false,
|
|
201
211
|
"type": "option"
|
|
212
|
+
},
|
|
213
|
+
"statusId": {
|
|
214
|
+
"description": "ステータスID(カンマ区切りで複数指定可能)",
|
|
215
|
+
"name": "statusId",
|
|
216
|
+
"required": false,
|
|
217
|
+
"hasDynamicHelp": false,
|
|
218
|
+
"multiple": false,
|
|
219
|
+
"type": "option"
|
|
202
220
|
}
|
|
203
221
|
},
|
|
204
222
|
"hasDynamicHelp": false,
|
|
205
223
|
"hiddenAliases": [],
|
|
206
|
-
"id": "
|
|
224
|
+
"id": "issue",
|
|
207
225
|
"pluginAlias": "backlog-exporter",
|
|
208
226
|
"pluginName": "backlog-exporter",
|
|
209
227
|
"pluginType": "core",
|
|
@@ -213,7 +231,7 @@
|
|
|
213
231
|
"relativePath": [
|
|
214
232
|
"dist",
|
|
215
233
|
"commands",
|
|
216
|
-
"
|
|
234
|
+
"issue",
|
|
217
235
|
"index.js"
|
|
218
236
|
]
|
|
219
237
|
},
|
|
@@ -364,5 +382,5 @@
|
|
|
364
382
|
]
|
|
365
383
|
}
|
|
366
384
|
},
|
|
367
|
-
"version": "0.6.
|
|
385
|
+
"version": "0.6.1"
|
|
368
386
|
}
|