backlog-exporter 1.0.0 → 1.1.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.
Files changed (70) hide show
  1. package/README.md +143 -636
  2. package/dist/commands/all/index.d.ts +1 -0
  3. package/dist/commands/all/index.js +8 -2
  4. package/dist/commands/document/index.d.ts +1 -0
  5. package/dist/commands/document/index.js +9 -2
  6. package/dist/commands/issue/index.d.ts +1 -0
  7. package/dist/commands/issue/index.js +12 -2
  8. package/dist/commands/update/index.d.ts +1 -0
  9. package/dist/commands/update/index.js +5 -0
  10. package/dist/commands/wiki/index.d.ts +1 -0
  11. package/dist/commands/wiki/index.js +9 -2
  12. package/dist/composition/backlog-repositories.d.ts +1 -1
  13. package/dist/composition/backlog-repositories.js +1 -1
  14. package/dist/modules/all/use-case/export-all.d.ts +1 -0
  15. package/dist/modules/all/use-case/export-all.js +7 -1
  16. package/dist/modules/document/domain/document-markdown.d.ts +1 -1
  17. package/dist/modules/document/domain/document-markdown.js +6 -3
  18. package/dist/modules/document/domain/document-path.d.ts +11 -1
  19. package/dist/modules/document/domain/document-path.js +17 -0
  20. package/dist/modules/document/domain/document-repository.d.ts +1 -0
  21. package/dist/modules/document/domain/document-save-plan.d.ts +4 -3
  22. package/dist/modules/document/domain/document-save-plan.js +11 -5
  23. package/dist/modules/document/domain/document-tree-gap.d.ts +2 -0
  24. package/dist/modules/document/domain/document-tree-gap.js +21 -0
  25. package/dist/modules/document/domain/document.d.ts +4 -0
  26. package/dist/modules/document/repository/backlog-document-repository.js +4 -0
  27. package/dist/modules/document/use-case/export-documents.d.ts +1 -0
  28. package/dist/modules/document/use-case/export-documents.js +72 -9
  29. package/dist/modules/issue/domain/issue-markdown.d.ts +4 -3
  30. package/dist/modules/issue/domain/issue-markdown.js +23 -8
  31. package/dist/modules/issue/domain/issue-path.d.ts +12 -1
  32. package/dist/modules/issue/domain/issue-path.js +12 -0
  33. package/dist/modules/issue/domain/issue-repository.d.ts +1 -0
  34. package/dist/modules/issue/domain/issue.d.ts +6 -0
  35. package/dist/modules/issue/repository/backlog-issue-repository.js +3 -0
  36. package/dist/modules/issue/use-case/export-issues.d.ts +1 -0
  37. package/dist/modules/issue/use-case/export-issues.js +29 -3
  38. package/dist/modules/prune/repository/prune-walker.js +5 -0
  39. package/dist/modules/prune/use-case/prune-directories.d.ts +1 -1
  40. package/dist/modules/prune/use-case/prune-directories.js +1 -1
  41. package/dist/modules/prune/use-case/prune-exports.js +15 -12
  42. package/dist/modules/settings/domain/settings.d.ts +1 -0
  43. package/dist/modules/update/domain/update-plan.d.ts +2 -0
  44. package/dist/modules/update/domain/update-plan.js +1 -0
  45. package/dist/modules/update/use-case/update-exports.d.ts +1 -1
  46. package/dist/modules/update/use-case/update-exports.js +4 -1
  47. package/dist/modules/wiki/domain/wiki-markdown.d.ts +6 -1
  48. package/dist/modules/wiki/domain/wiki-markdown.js +17 -2
  49. package/dist/modules/wiki/domain/wiki-path.d.ts +3 -0
  50. package/dist/modules/wiki/domain/wiki-path.js +12 -0
  51. package/dist/modules/wiki/domain/wiki-repository.d.ts +1 -0
  52. package/dist/modules/wiki/domain/wiki.d.ts +6 -0
  53. package/dist/modules/wiki/repository/backlog-wiki-repository.js +3 -0
  54. package/dist/modules/wiki/use-case/export-wikis.d.ts +1 -0
  55. package/dist/modules/wiki/use-case/export-wikis.js +31 -3
  56. package/dist/shared/attachment.d.ts +8 -0
  57. package/dist/shared/attachment.js +37 -0
  58. package/dist/shared/backlog/http-client.d.ts +5 -2
  59. package/dist/shared/backlog/http-client.js +41 -10
  60. package/dist/shared/backlog/sleep.d.ts +1 -0
  61. package/dist/shared/backlog/sleep.js +3 -0
  62. package/dist/shared/console/progress.js +8 -1
  63. package/dist/shared/file-name.d.ts +1 -0
  64. package/dist/shared/file-name.js +11 -0
  65. package/dist/shared/storage/markdown-store.d.ts +2 -0
  66. package/dist/shared/storage/markdown-store.js +11 -0
  67. package/oclif.manifest.json +43 -2
  68. package/package.json +1 -1
  69. package/dist/shared/backlog/rate-limiter.d.ts +0 -9
  70. package/dist/shared/backlog/rate-limiter.js +0 -25
package/README.md CHANGED
@@ -6,42 +6,35 @@ Backlog のデータをエクスポートするためのコマンドラインツ
6
6
  [![Version](https://img.shields.io/npm/v/backlog-exporter.svg)](https://npmjs.org/package/backlog-exporter)
7
7
  [![Downloads/week](https://img.shields.io/npm/dw/backlog-exporter.svg)](https://npmjs.org/package/backlog-exporter)
8
8
 
9
- <!-- toc -->
10
- * [backlog-exporter](#backlog-exporter)
11
- * [概要](#概要)
12
- * [インストール](#インストール)
13
- * [使用方法](#使用方法)
14
- * [課題のエクスポート](#課題のエクスポート)
15
- * [Wiki のエクスポート](#wiki-のエクスポート)
16
- * [ドキュメント のエクスポート](#ドキュメント-のエクスポート)
17
- * [課題・Wiki・ドキュメント の一括エクスポート](#課題wikiドキュメント-の一括エクスポート)
18
- * [データの更新](#データの更新)
19
- * [特定の課題だけを再取得(課題キーまたは課題ID)](#特定の課題だけを再取得課題キーまたは課題id)
20
- * [特定のWikiだけを再取得(Wiki ID)](#特定のwikiだけを再取得wiki-id)
21
- * [特定のドキュメントだけを再取得(ドキュメントID)](#特定のドキュメントだけを再取得ドキュメントid)
22
- * [カレントディレクトリ配下の設定ファイルを探索して実行](#カレントディレクトリ配下の設定ファイルを探索して実行)
23
- * [対象ディレクトリを指定](#対象ディレクトリを指定)
24
- * [確認プロンプトをスキップ](#確認プロンプトをスキップ)
25
- * [コマンド](#コマンド)
26
- * [出力形式](#出力形式)
27
- * [課題のタイトル](#課題のタイトル)
28
- * [Wiki のタイトル](#wiki-のタイトル)
29
- * [ドキュメントのタイトル](#ドキュメントのタイトル)
30
- * [その他の特徴](#その他の特徴)
31
- <!-- tocstop -->
32
-
33
- # 概要
34
-
35
- backlog-exporter は、Backlog のデータをローカルにエクスポートするためのコマンドラインツールです。
36
- 現在、以下の機能をサポートしています:
37
-
38
- - **課題(Issue)のエクスポート**:Backlog の課題を Markdown ファイルとして保存(カスタム属性対応)
39
- - **Wiki 記事のエクスポート**:Backlog の Wiki 記事を Markdown ファイルとして保存
40
- - **ドキュメントのエクスポート**:Backlog のドキュメントを Markdown ファイルとして保存
41
- - **一括エクスポート**:課題・Wiki・ドキュメントを同時に取得する機能
42
- - **データの更新**:既存のエクスポートデータを最新の状態に更新する機能
43
-
44
- # インストール
9
+ ## 目次
10
+
11
+ - [概要](#概要)
12
+ - [インストール](#インストール)
13
+ - [クイックスタート](#クイックスタート)
14
+ - [コマンド一覧](#コマンド一覧)
15
+ - [課題のエクスポート (issue)](#課題のエクスポート-issue)
16
+ - [Wiki のエクスポート (wiki)](#wiki-のエクスポート-wiki)
17
+ - [ドキュメントのエクスポート (document)](#ドキュメントのエクスポート-document)
18
+ - [一括エクスポート (all)](#一括エクスポート-all)
19
+ - [データの更新 (update)](#データの更新-update)
20
+ - [削除されたデータの整理 (prune)](#削除されたデータの整理-prune)
21
+ - [添付ファイルのダウンロード](#添付ファイルのダウンロード)
22
+ - [出力形式](#出力形式)
23
+ - [その他の特徴](#その他の特徴)
24
+ - [開発への貢献](#開発への貢献)
25
+ - [ライセンス](#ライセンス)
26
+
27
+ ## 概要
28
+
29
+ backlog-exporter は、Backlog のデータをローカルに Markdown ファイルとしてエクスポートするコマンドラインツールです。
30
+
31
+ - **課題(Issue)**:カスタム属性・コメント・添付ファイルを含めてエクスポート
32
+ - **Wiki**:階層構造を保持してエクスポート
33
+ - **ドキュメント**:ツリー構造を保持してエクスポート
34
+ - **一括エクスポート**:課題・Wiki・ドキュメントをまとめて取得
35
+ - **差分更新**:前回のエクスポート以降に変更されたデータのみを更新
36
+
37
+ ## インストール
45
38
 
46
39
  <!-- usage -->
47
40
  ```sh-session
@@ -49,7 +42,7 @@ $ npm install -g backlog-exporter
49
42
  $ backlog-exporter COMMAND
50
43
  running command...
51
44
  $ backlog-exporter (--version)
52
- backlog-exporter/1.0.0 linux-x64 node-v26.4.0
45
+ backlog-exporter/1.1.1 linux-x64 node-v26.8.1
53
46
  $ backlog-exporter --help [COMMAND]
54
47
  USAGE
55
48
  $ backlog-exporter COMMAND
@@ -57,123 +50,70 @@ USAGE
57
50
  ```
58
51
  <!-- usagestop -->
59
52
 
60
- # 使用方法
53
+ インストールせずに `npx backlog-exporter <コマンド>` として実行することもできます。
61
54
 
62
- backlog-exporter を使用するには、Backlog のドメイン、プロジェクト ID(またはキー)、API キーが必要です。
55
+ ## クイックスタート
63
56
 
64
- API キーは以下の方法で指定できます:
57
+ 利用には Backlog の **ドメイン**・**プロジェクト ID(またはキー)**・**API キー** が必要です。
65
58
 
66
- 1. コマンドラインオプションとして指定
59
+ API キーは以下のいずれかの方法で指定できます:
60
+
61
+ 1. コマンドラインオプション `--apiKey` で指定
67
62
  2. 環境変数 `BACKLOG_API_KEY` に設定
68
63
  3. `.env` ファイルに `BACKLOG_API_KEY=あなたのAPIキー` として設定
69
64
 
70
- ## 基本的な使用例
71
-
72
- **課題のエクスポート**
73
-
74
- ```sh
75
- $ backlog-exporter issue --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./issues
76
- ```
77
-
78
- **Wikiのエクスポート**
79
-
80
- ```sh
81
- $ backlog-exporter wiki --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./wiki
82
- ```
83
-
84
- **ドキュメントのエクスポート**
85
-
86
- ```sh
87
- $ backlog-exporter document --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./documents
88
- ```
89
-
90
- **課題・Wiki・ドキュメントの一括エクスポート**
91
-
92
65
  ```sh
93
66
  $ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./backlog-data
94
67
  ```
95
68
 
96
- **特定のデータタイプのみをエクスポート(onlyフラグ)**
97
-
98
- ```sh
99
- $ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --only issues,wiki
100
- ```
101
-
102
- **特定のデータタイプを除外してエクスポート(excludeフラグ)**
103
-
104
- ```sh
105
- $ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --exclude documents
106
- ```
107
-
108
- **データの更新**
69
+ 上記で課題・Wiki・ドキュメントが `./backlog-data` 配下にエクスポートされます。2 回目以降は、エクスポートしたディレクトリで以下を実行するだけで差分更新できます:
109
70
 
110
71
  ```sh
111
72
  $ backlog-exporter update
112
73
  ```
113
74
 
114
- npx を使用する場合は、コマンドの前に`npx`を付けるだけです:
75
+ ## コマンド一覧
115
76
 
116
- **npxを使った課題のエクスポート**
77
+ | コマンド | 説明 |
78
+ | ---------- | ------------------------------------------------------------------------ |
79
+ | `all` | 課題・Wiki・ドキュメントを一括エクスポート |
80
+ | `issue` | 課題をエクスポート(作成年ごとのフォルダに整理) |
81
+ | `wiki` | Wiki を階層構造を保持してエクスポート |
82
+ | `document` | ドキュメントをツリー構造を保持してエクスポート |
83
+ | `update` | エクスポート済みデータを差分更新 |
84
+ | `prune` | Backlog 上で削除・移動されたデータのローカルファイルを削除 |
85
+ | `help` | ヘルプを表示 |
117
86
 
118
- ```sh
119
- $ npx backlog-exporter issue --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./issues
120
- ```
121
-
122
- **npxを使ったデータの更新**
123
-
124
- ```sh
125
- $ npx backlog-exporter update
126
- ```
87
+ 全エクスポートコマンドで共通のフラグ:
127
88
 
128
- # 課題のエクスポート
89
+ | フラグ | 説明 |
90
+ | --------------------------- | ------------------------------------------------ |
91
+ | `--domain` | Backlog のドメイン(例: `example.backlog.jp`) |
92
+ | `--projectIdOrKey` | プロジェクトキーまたは数値 ID |
93
+ | `--apiKey` | API キー(環境変数でも指定可能) |
94
+ | `--output` | 出力先ディレクトリ |
95
+ | `-d, --downloadAttachments` | 添付ファイルもダウンロード([詳細](#添付ファイルのダウンロード)) |
129
96
 
130
- `issue`コマンドを使用すると、Backlog の課題を Markdown ファイルとしてエクスポートできます。
97
+ ## 課題のエクスポート (issue)
131
98
 
132
- **基本的な使用方法**
133
-
134
- ```sh
135
- $ backlog-exporter issue --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY
136
- ```
137
-
138
- **出力先を指定**
99
+ `issue` コマンドは、Backlog の課題を Markdown ファイルとしてエクスポートします。課題は作成年ごとのサブディレクトリに整理されます。
139
100
 
140
101
  ```sh
141
102
  $ backlog-exporter issue --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./issues
142
103
  ```
143
104
 
144
- **Markdownファイル名を課題キーにする**
105
+ | フラグ | 説明 |
106
+ | -------------------- | ---------------------------------------------------------- |
107
+ | `--issueKeyFileName` | Markdown ファイル名を課題キーにする |
108
+ | `--issueKeyFolder` | 課題キーごとにフォルダを作成する(両フラグは併用可能) |
145
109
 
146
- ```sh
147
- $ backlog-exporter issue --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --issueKeyFileName
148
- ```
110
+ ### カスタム属性の対応
149
111
 
150
- **課題キーでフォルダを作成する**
112
+ 課題のカスタム属性も Markdown テーブル形式で出力されます。改行やパイプ文字も適切に処理されます。
151
113
 
152
- ```sh
153
- $ backlog-exporter issue --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --issueKeyFolder
154
- ```
155
-
156
- **課題キーでフォルダを作成し、Markdownファイル名も課題キーにする**
157
-
158
- ```sh
159
- $ backlog-exporter issue --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --issueKeyFileName --issueKeyFolder
160
- ```
161
-
162
- エクスポートされた課題は、指定したディレクトリ内に Markdown ファイルとして保存されます。ファイル名は課題のキーに基づいて自動的に生成されます。
163
-
164
- ## カスタム属性の対応
165
-
166
- 課題のエクスポートでは、Backlogのカスタム属性も含めて出力されます:
167
-
168
- ### 対応している値の型
169
-
170
- - **プリミティブ値**: 文字列、数値などの単純な値
171
- - **配列値**: 複数選択のカスタム属性(カンマ区切りで表示)
172
- - **オブジェクト値**: 単一選択のカスタム属性(name または value プロパティを使用)
173
-
174
- ### 表示形式
175
-
176
- カスタム属性はMarkdownテーブル形式で表示され、改行やパイプ文字も適切に処理されます:
114
+ - **プリミティブ値**:文字列、数値などの単純な値
115
+ - **配列値**:複数選択のカスタム属性(カンマ区切りで表示)
116
+ - **オブジェクト値**:単一選択のカスタム属性(name または value プロパティを使用)
177
117
 
178
118
  ```markdown
179
119
  ## カスタム属性
@@ -185,57 +125,29 @@ $ backlog-exporter issue --domain example.backlog.jp --projectIdOrKey PROJECT_KE
185
125
  | 詳細 | 実装内容<br>- 機能A<br>- 機能B |
186
126
  ```
187
127
 
188
- # Wiki のエクスポート
189
-
190
- `wiki`コマンドを使用すると、Backlog の Wiki ページを Markdown ファイルとしてエクスポートできます。
128
+ ## Wiki のエクスポート (wiki)
191
129
 
192
- **基本的な使用方法**
193
-
194
- ```sh
195
- $ backlog-exporter wiki --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY
196
- ```
197
-
198
- **出力先を指定**
130
+ `wiki` コマンドは、Backlog の Wiki ページを Markdown ファイルとしてエクスポートします。Wiki の階層構造はディレクトリ構造として再現されます。
199
131
 
200
132
  ```sh
201
133
  $ backlog-exporter wiki --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./wiki
202
134
  ```
203
135
 
204
- エクスポートされた Wiki は、指定したディレクトリ内に Markdown ファイルとして保存されます。Wiki の階層構造は保持され、ディレクトリ構造として再現されます。
205
-
206
- # ドキュメント のエクスポート
136
+ ## ドキュメントのエクスポート (document)
207
137
 
208
- `document`コマンドを使用すると、Backlog のドキュメントページを Markdown ファイルとしてエクスポートできます。
209
-
210
- **基本的な使用方法**
211
-
212
- ```sh
213
- $ backlog-exporter document --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY
214
- ```
215
-
216
- **出力先を指定**
138
+ `document` コマンドは、Backlog のドキュメントを Markdown ファイルとしてエクスポートします。
217
139
 
218
140
  ```sh
219
141
  $ backlog-exporter document --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./documents
220
142
  ```
221
143
 
222
- **キーワード検索**
223
-
224
- ```sh
225
- $ backlog-exporter document --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --keyword 仕様書
226
- ```
227
-
228
- ## ドキュメントの出力方法
229
-
230
- ドキュメントは **ツリー構造を保持** してエクスポートされます:
144
+ | フラグ | 説明 |
145
+ | ----------- | ------------------------------------ |
146
+ | `--keyword` | キーワードに一致するドキュメントのみ取得 |
231
147
 
232
148
  ### ディレクトリ構造の保持
233
149
 
234
- - Backlogのドキュメントツリーの階層構造がそのままローカルディレクトリ構造として再現されます
235
- - フォルダはディレクトリとして作成され、ドキュメントはMarkdownファイルとして保存されます
236
- - 子を持つ親ドキュメント自身が本文を持つ場合は、フォルダ内の `00_index.md` として保存されます(本文が空の親はファイルを作成しません)
237
-
238
- ### 出力例
150
+ Backlog のドキュメントツリーの階層構造が、そのままローカルのディレクトリ構造として再現されます。フォルダはディレクトリに、ドキュメントは Markdown ファイルになります。子を持つ親ドキュメント自身が本文を持つ場合は、フォルダ内の `00_index.md` として保存されます(本文が空の親はファイルを作成しません)。
239
151
 
240
152
  ```
241
153
  documents/
@@ -253,503 +165,121 @@ documents/
253
165
  └── 運用手順書.md
254
166
  ```
255
167
 
256
- ### 特徴
257
-
258
- - **階層構造の完全再現**: Backlogのフォルダ階層がそのまま保持されます
259
- - **親ドキュメント本文の保存**: 子を持つ親ドキュメントの本文もフォルダ内の `00_index.md` として保存されます
260
- - **重複処理の防止**: 同じドキュメントが複数回処理されることを防ぎます
261
- - **ファイル名の自動サニタイズ**: 不正な文字を自動的に除去して安全なファイル名を生成します
262
- - **メタデータの保持**: 作成者、更新者、タグ、添付ファイル情報なども含めて保存されます
168
+ 作成者・更新者・タグ・添付ファイル情報などのメタデータも含めて保存されます。
263
169
 
264
- エクスポートされたドキュメントは、指定したディレクトリ内にツリー構造を保持したMarkdownファイルとして保存されます。
170
+ ## 一括エクスポート (all)
265
171
 
266
- # 課題・Wiki・ドキュメント の一括エクスポート
267
-
268
- `all`コマンドを使用すると、課題・Wiki・ドキュメントを一度に取得できます。
269
-
270
- **基本的な使用方法**
271
-
272
- ```sh
273
- $ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY
274
- ```
275
-
276
- **出力先を指定**
172
+ `all` コマンドは、課題・Wiki・ドキュメントを一度に取得します。課題は `issues`、Wiki は `wiki`、ドキュメントは `documents` サブディレクトリに保存されます。
277
173
 
278
174
  ```sh
279
175
  $ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./backlog-data
280
176
  ```
281
177
 
282
- **特定のデータタイプのみをエクスポート(onlyフラグ)**
178
+ ### エクスポート対象の制御
283
179
 
284
- ```sh
285
- $ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --only issues,wiki
286
- ```
180
+ | フラグ | 説明 |
181
+ | ----------- | ---------------------------------------------------------------- |
182
+ | `--only` | 指定したデータタイプのみエクスポート(例: `--only issues,wiki`) |
183
+ | `--exclude` | 指定したデータタイプを除外(例: `--exclude documents`) |
287
184
 
288
- **特定のデータタイプを除外してエクスポート(excludeフラグ)**
185
+ データタイプは `issues` / `wiki` / `documents` をカンマ区切りで指定します。`--only` と `--exclude` は同時に使用できません。
289
186
 
290
187
  ```sh
291
- $ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --exclude documents
188
+ $ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --only issues,wiki
292
189
  ```
293
190
 
294
- 一括エクスポートでは、課題は`issues`ディレクトリに、Wiki は`wiki`ディレクトリに、ドキュメントは`documents`ディレクトリに保存されます。
295
-
296
- ## エクスポート対象の制御
297
-
298
- `--only` / `--exclude` を指定せずに対話端末で実行した場合は、Wiki・ドキュメントのどちらを取得するかを選択できます(BacklogはWikiからドキュメントへの移行を予定しています):
191
+ `--only` / `--exclude` を指定せずに対話端末で実行した場合は、Wiki・ドキュメントのどちらを取得するかを選択できます(Backlog は Wiki からドキュメントへの移行を予定しています):
299
192
 
300
193
  ```
301
194
  BacklogのWikiとドキュメントのどちらを取得しますか?(BacklogはWikiからドキュメントへの移行を予定しています)
302
195
  [1] 両方(デフォルト) [2] Wikiのみ [3] ドキュメントのみ
303
196
  ```
304
197
 
305
- 非対話環境(CI・パイプ実行)では従来どおり両方を取得します。
306
-
307
- `all`コマンドでは、以下のフラグを使用してエクスポート対象を制御できます:
308
-
309
- ### --only フラグ
310
-
311
- 特定のデータタイプのみをエクスポートします。カンマ区切りで複数指定可能です。
312
-
313
- **課題とWikiのみをエクスポート**
314
-
315
- ```sh
316
- $ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --only issues,wiki
317
- ```
318
-
319
- **ドキュメントのみをエクスポート**
320
-
321
- ```sh
322
- $ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --only documents
323
- ```
324
-
325
- ### --exclude フラグ
326
-
327
- 特定のデータタイプを除外してエクスポートします。カンマ区切りで複数指定可能です。
328
-
329
- **ドキュメント以外(課題とWiki)をエクスポート**
330
-
331
- ```sh
332
- $ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --exclude documents
333
- ```
334
-
335
- **課題以外(WikiとDocuments)をエクスポート**
336
-
337
- ```sh
338
- $ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --exclude issues
339
- ```
340
-
341
- **注意**: `--only`と`--exclude`フラグは同時に使用できません。どちらか一方を使用してください。
198
+ 非対話環境(CI・パイプ実行)では両方を取得します。
342
199
 
343
- # データの更新
200
+ ## データの更新 (update)
344
201
 
345
- `update`コマンドを使用すると、既存のエクスポートデータを最新の状態に更新できます。このコマンドは、ディレクトリ内の`backlog-settings.json`ファイルを探索し、見つかったディレクトリでデータを更新します。
346
-
347
- **カレントディレクトリとそのサブディレクトリのデータを更新**
202
+ `update` コマンドは、既存のエクスポートデータを最新の状態に更新します。ディレクトリ内の `backlog-settings.json` を探索し、見つかったディレクトリごとにデータを更新します。設定ファイルの最終更新日時(`lastUpdated`)以降に更新された項目のみを差分取得します。
348
203
 
349
204
  ```sh
350
205
  $ backlog-exporter update
351
- ```
352
-
353
- **指定したディレクトリとそのサブディレクトリのデータを更新**
354
-
355
- ```sh
356
206
  $ backlog-exporter update ./my-project
357
207
  ```
358
208
 
359
- **確認プロンプトをスキップして更新**
360
-
361
- ```sh
362
- $ backlog-exporter update --force
363
- ```
364
-
365
- **課題のみを更新**
366
-
367
- ```sh
368
- $ backlog-exporter update --issuesOnly
369
- ```
370
-
371
- **Wikiのみを更新**
372
-
373
- ```sh
374
- $ backlog-exporter update --wikisOnly
375
- ```
376
-
377
- **ドキュメントのみを更新**
209
+ | フラグ | 説明 |
210
+ | ----------------- | ---------------------------------------- |
211
+ | `--force` | 確認プロンプトをスキップ |
212
+ | `--issuesOnly` | 課題のみを更新 |
213
+ | `--wikisOnly` | Wiki のみを更新 |
214
+ | `--documentsOnly` | ドキュメントのみを更新 |
215
+ | `--apiKey` | API キーを指定 |
378
216
 
379
- ```sh
380
- $ backlog-exporter update --documentsOnly
381
- ```
382
-
383
- **APIキーを指定して更新**
217
+ ### 特定の項目だけを再取得する
384
218
 
385
- ```sh
386
- $ backlog-exporter update --apiKey YOUR_API_KEY
387
- ```
219
+ 「特定の項目だけを取り直したい」場合は、ID 指定フラグを使います。いずれもカンマ区切りで複数指定できます。
388
220
 
389
- **指定した項目(課題・Wiki・ドキュメント)のみを再取得する**
221
+ | フラグ | 説明 |
222
+ | ---------------- | -------------------------------------------------------- |
223
+ | `--issueIdOrKey` | 課題キー(`PROJECT-1`)または課題 ID(数値)で課題を再取得 |
224
+ | `--wikiId` | Wiki ID(数値)で Wiki を再取得 |
225
+ | `--documentId` | ドキュメント ID でドキュメントを再取得 |
390
226
 
391
227
  ```sh
392
- # 特定の課題だけを再取得(課題キーまたは課題ID)
393
228
  $ backlog-exporter update --issueIdOrKey PROJECT-1,PROJECT-2
394
-
395
- # 特定のWikiだけを再取得(Wiki ID)
396
229
  $ backlog-exporter update --wikiId 12345,12346
397
-
398
- # 特定のドキュメントだけを再取得(ドキュメントID)
399
230
  $ backlog-exporter update --documentId abc123,def456
400
231
  ```
401
232
 
402
- `update` は通常、設定ファイルの最終更新日時(`lastUpdated`)以降に更新された項目を差分取得します。一方で「特定の項目だけを取り直したい」場合は、上記のID指定フラグを使います。
403
-
404
- - `--issueIdOrKey`: 課題キー(`PROJECT-1`)または課題ID(数値)。Wiki・ドキュメントは数値IDのみのため `--wikiId` / `--documentId` を使います
405
- - いずれもカンマ区切りで複数指定できます
406
- - 指定したフラグに対応する項目のみを再取得し、それ以外の種別の更新は行いません(例: `--wikiId` のみ指定時は課題・ドキュメントを更新しません)
233
+ - 指定したフラグに対応する項目のみを再取得し、それ以外の種別は更新しません(例: `--wikiId` のみ指定時は課題・ドキュメントを更新しません)
407
234
  - 指定した項目以外のローカルファイルには影響しません
408
235
 
409
- > **Note**: これらのID指定フラグは全件差分更新ではないため、設定ファイルの最終更新日時(`lastUpdated`)は更新されません。そのため、次回の通常の差分更新に影響を与えません。
236
+ > **Note**: ID 指定フラグは全件差分更新ではないため、設定ファイルの最終更新日時(`lastUpdated`)は更新されません。次回の通常の差分更新に影響を与えません。
410
237
 
411
- 更新コマンドは、各ディレクトリの設定ファイルに基づいて、課題・Wiki・ドキュメントを自動的に更新します。設定ファイルが見つかったディレクトリでは、そのディレクトリ内のファイルが直接更新されます(サブフォルダは作成されません)。
238
+ ## 削除されたデータの整理 (prune)
412
239
 
413
- **Backlog上で削除・移動された課題・ドキュメント・Wikiのローカルファイルを削除する(prune)**
240
+ `update`(および各取得コマンド)は増分更新(追加・上書き)のため、Backlog 上で削除・移動された課題・ドキュメント・Wiki のファイルはローカルに残り続けます。`prune` コマンドは、Backlog に存在しないローカルの `.md` ファイルと空になったディレクトリを削除して、Backlog と同じ状態に揃えます。
414
241
 
415
242
  ```sh
416
- # カレントディレクトリ配下の設定ファイルを探索して実行
417
243
  $ backlog-exporter prune
418
-
419
- # 対象ディレクトリを指定
420
244
  $ backlog-exporter prune ./backlog-documents
421
-
422
- # 確認プロンプトをスキップ
423
245
  $ backlog-exporter prune --force
424
246
  ```
425
247
 
426
- `update`(および各取得コマンド)は増分更新(追加・上書き)のため、Backlog上で削除された課題・ドキュメント・Wikiや別の場所へ移動されたものは、ローカルにファイルが残り続けます。`prune` コマンドは、Backlogに存在しないローカルの `.md` ファイルと、空になったディレクトリを削除してBacklogと同じ状態に揃えます。
427
-
428
- - 対象は**課題・ドキュメント・Wikiフォルダ**です(設定ファイルの `folderType` で判定します)
429
- - ファイルを削除する破壊的な操作のため、`update` とは独立したコマンドとして分離しています(実行時に確認プロンプトを表示。`--force` でスキップ可能)
430
- - 削除対象は `.md` ファイルのみ。`backlog-settings.json`・`backlog-update.log`・`.md` 以外のファイルには触れません。ただし、対象フォルダ内にユーザーが独自に置いた `.md` ファイルや空のディレクトリは、Backlog上に存在しないものとして削除されるため注意してください
431
- - ファイル名は保存時と同じロジックで比較します(ドキュメントは一覧APIの `title` 基準、課題は設定ファイルの `issueKeyFileName`/`issueKeyFolder` を反映)。サニタイズ差異やツリー名との差異による誤削除は起きません。ドキュメント情報の取得に失敗した場合は、誤削除を防ぐため何も削除せずに中止します
248
+ - 対象は **課題・ドキュメント・Wiki フォルダ** です(設定ファイルの `folderType` で判定します)
249
+ - ファイルを削除する破壊的な操作のため、実行時に確認プロンプトを表示します(`--force` でスキップ可能)
250
+ - 削除対象は `.md` ファイルのみ。`backlog-settings.json`・`backlog-update.log`・`.md` 以外のファイルには触れません。ただし、対象フォルダ内にユーザーが独自に置いた `.md` ファイルや空のディレクトリは、Backlog 上に存在しないものとして削除されるため注意してください
251
+ - ファイル名は保存時と同じロジックで比較します(ドキュメントは一覧 API の `title` 基準、課題は設定ファイルの `issueKeyFileName` / `issueKeyFolder` を反映)。サニタイズ差異による誤削除は起きません。ドキュメント情報の取得に失敗した場合は、誤削除を防ぐため何も削除せずに中止します
432
252
  - 削除したファイルは `backlog-update.log` に記録されます
433
253
 
434
- # コマンド
435
-
436
- ## `backlog-exporter help [COMMAND]`
437
-
438
- Display help for backlog-exporter.
439
-
440
- ```
441
- USAGE
442
- $ backlog-exporter help [COMMAND...] [-n]
443
-
444
- ARGUMENTS
445
- COMMAND... Command to show help for.
254
+ ## 添付ファイルのダウンロード
446
255
 
447
- FLAGS
448
- -n, --nested-commands Include all nested commands in the output.
449
-
450
- DESCRIPTION
451
- Display help for backlog-exporter.
452
- ```
453
-
454
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.26/src/commands/help.ts)_
455
-
456
- ## `backlog-exporter plugins`
457
-
458
- List installed plugins.
459
-
460
- ```
461
- USAGE
462
- $ backlog-exporter plugins [--json] [--core]
463
-
464
- FLAGS
465
- --core Show core plugins.
466
-
467
- GLOBAL FLAGS
468
- --json Format output as json.
469
-
470
- DESCRIPTION
471
- List installed plugins.
472
-
473
- EXAMPLES
474
- $ backlog-exporter plugins
475
- ```
476
-
477
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/index.ts)_
478
-
479
- ## `backlog-exporter plugins add PLUGIN`
480
-
481
- Installs a plugin into backlog-exporter.
482
-
483
- ```
484
- USAGE
485
- $ backlog-exporter plugins add PLUGIN... [--json] [-f] [-h] [-s | -v]
486
-
487
- ARGUMENTS
488
- PLUGIN... Plugin to install.
489
-
490
- FLAGS
491
- -f, --force Force npm to fetch remote resources even if a local copy exists on disk.
492
- -h, --help Show CLI help.
493
- -s, --silent Silences npm output.
494
- -v, --verbose Show verbose npm output.
495
-
496
- GLOBAL FLAGS
497
- --json Format output as json.
498
-
499
- DESCRIPTION
500
- Installs a plugin into backlog-exporter.
501
-
502
- Uses npm to install plugins.
503
-
504
- Installation of a user-installed plugin will override a core plugin.
505
-
506
- Use the BACKLOG_EXPORTER_NPM_LOG_LEVEL environment variable to set the npm loglevel.
507
- Use the BACKLOG_EXPORTER_NPM_REGISTRY environment variable to set the npm registry.
508
-
509
- ALIASES
510
- $ backlog-exporter plugins add
511
-
512
- EXAMPLES
513
- Install a plugin from npm registry.
514
-
515
- $ backlog-exporter plugins add myplugin
516
-
517
- Install a plugin from a github url.
518
-
519
- $ backlog-exporter plugins add https://github.com/someuser/someplugin
520
-
521
- Install a plugin from a github slug.
522
-
523
- $ backlog-exporter plugins add someuser/someplugin
524
- ```
525
-
526
- ## `backlog-exporter plugins:inspect PLUGIN...`
527
-
528
- Displays installation properties of a plugin.
529
-
530
- ```
531
- USAGE
532
- $ backlog-exporter plugins inspect PLUGIN...
533
-
534
- ARGUMENTS
535
- PLUGIN... [default: .] Plugin to inspect.
536
-
537
- FLAGS
538
- -h, --help Show CLI help.
539
- -v, --verbose
540
-
541
- GLOBAL FLAGS
542
- --json Format output as json.
543
-
544
- DESCRIPTION
545
- Displays installation properties of a plugin.
546
-
547
- EXAMPLES
548
- $ backlog-exporter plugins inspect myplugin
549
- ```
550
-
551
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/inspect.ts)_
552
-
553
- ## `backlog-exporter plugins install PLUGIN`
554
-
555
- Installs a plugin into backlog-exporter.
556
-
557
- ```
558
- USAGE
559
- $ backlog-exporter plugins install PLUGIN... [--json] [-f] [-h] [-s | -v]
560
-
561
- ARGUMENTS
562
- PLUGIN... Plugin to install.
563
-
564
- FLAGS
565
- -f, --force Force npm to fetch remote resources even if a local copy exists on disk.
566
- -h, --help Show CLI help.
567
- -s, --silent Silences npm output.
568
- -v, --verbose Show verbose npm output.
569
-
570
- GLOBAL FLAGS
571
- --json Format output as json.
572
-
573
- DESCRIPTION
574
- Installs a plugin into backlog-exporter.
575
-
576
- Uses npm to install plugins.
577
-
578
- Installation of a user-installed plugin will override a core plugin.
579
-
580
- Use the BACKLOG_EXPORTER_NPM_LOG_LEVEL environment variable to set the npm loglevel.
581
- Use the BACKLOG_EXPORTER_NPM_REGISTRY environment variable to set the npm registry.
582
-
583
- ALIASES
584
- $ backlog-exporter plugins add
585
-
586
- EXAMPLES
587
- Install a plugin from npm registry.
588
-
589
- $ backlog-exporter plugins install myplugin
590
-
591
- Install a plugin from a github url.
592
-
593
- $ backlog-exporter plugins install https://github.com/someuser/someplugin
594
-
595
- Install a plugin from a github slug.
596
-
597
- $ backlog-exporter plugins install someuser/someplugin
598
- ```
599
-
600
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/install.ts)_
601
-
602
- ## `backlog-exporter plugins link PATH`
603
-
604
- Links a plugin into the CLI for development.
605
-
606
- ```
607
- USAGE
608
- $ backlog-exporter plugins link PATH [-h] [--install] [-v]
609
-
610
- ARGUMENTS
611
- PATH [default: .] path to plugin
612
-
613
- FLAGS
614
- -h, --help Show CLI help.
615
- -v, --verbose
616
- --[no-]install Install dependencies after linking the plugin.
617
-
618
- DESCRIPTION
619
- Links a plugin into the CLI for development.
620
-
621
- Installation of a linked plugin will override a user-installed or core plugin.
622
-
623
- e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
624
- command will override the user-installed or core plugin implementation. This is useful for development work.
625
-
626
-
627
- EXAMPLES
628
- $ backlog-exporter plugins link myplugin
629
- ```
630
-
631
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/link.ts)_
632
-
633
- ## `backlog-exporter plugins remove [PLUGIN]`
634
-
635
- Removes a plugin from the CLI.
636
-
637
- ```
638
- USAGE
639
- $ backlog-exporter plugins remove [PLUGIN...] [-h] [-v]
640
-
641
- ARGUMENTS
642
- PLUGIN... plugin to uninstall
643
-
644
- FLAGS
645
- -h, --help Show CLI help.
646
- -v, --verbose
647
-
648
- DESCRIPTION
649
- Removes a plugin from the CLI.
650
-
651
- ALIASES
652
- $ backlog-exporter plugins unlink
653
- $ backlog-exporter plugins remove
654
-
655
- EXAMPLES
656
- $ backlog-exporter plugins remove myplugin
657
- ```
658
-
659
- ## `backlog-exporter plugins reset`
660
-
661
- Remove all user-installed and linked plugins.
662
-
663
- ```
664
- USAGE
665
- $ backlog-exporter plugins reset [--hard] [--reinstall]
666
-
667
- FLAGS
668
- --hard Delete node_modules and package manager related files in addition to uninstalling plugins.
669
- --reinstall Reinstall all plugins after uninstalling.
670
- ```
671
-
672
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/reset.ts)_
673
-
674
- ## `backlog-exporter plugins uninstall [PLUGIN]`
675
-
676
- Removes a plugin from the CLI.
677
-
678
- ```
679
- USAGE
680
- $ backlog-exporter plugins uninstall [PLUGIN...] [-h] [-v]
681
-
682
- ARGUMENTS
683
- PLUGIN... plugin to uninstall
684
-
685
- FLAGS
686
- -h, --help Show CLI help.
687
- -v, --verbose
688
-
689
- DESCRIPTION
690
- Removes a plugin from the CLI.
691
-
692
- ALIASES
693
- $ backlog-exporter plugins unlink
694
- $ backlog-exporter plugins remove
695
-
696
- EXAMPLES
697
- $ backlog-exporter plugins uninstall myplugin
698
- ```
699
-
700
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/uninstall.ts)_
701
-
702
- ## `backlog-exporter plugins unlink [PLUGIN]`
703
-
704
- Removes a plugin from the CLI.
705
-
706
- ```
707
- USAGE
708
- $ backlog-exporter plugins unlink [PLUGIN...] [-h] [-v]
709
-
710
- ARGUMENTS
711
- PLUGIN... plugin to uninstall
712
-
713
- FLAGS
714
- -h, --help Show CLI help.
715
- -v, --verbose
716
-
717
- DESCRIPTION
718
- Removes a plugin from the CLI.
719
-
720
- ALIASES
721
- $ backlog-exporter plugins unlink
722
- $ backlog-exporter plugins remove
723
-
724
- EXAMPLES
725
- $ backlog-exporter plugins unlink myplugin
726
- ```
727
-
728
- ## `backlog-exporter plugins update`
729
-
730
- Update installed plugins.
256
+ `--downloadAttachments`(短縮形: `-d`)フラグを指定すると、課題・Wiki・ドキュメントの添付ファイルもダウンロードされます(`all` / `issue` / `wiki` / `document` / `update` コマンドで使用可能)。
731
257
 
258
+ ```sh
259
+ $ backlog-exporter issue --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --downloadAttachments
732
260
  ```
733
- USAGE
734
- $ backlog-exporter plugins update [-h] [-v]
735
261
 
736
- FLAGS
737
- -h, --help Show CLI help.
738
- -v, --verbose
739
-
740
- DESCRIPTION
741
- Update installed plugins.
742
- ```
262
+ 保存先:
743
263
 
744
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.34/src/commands/plugins/update.ts)_
264
+ | 種別 | 保存先 |
265
+ | ------------ | -------------------------------------------------------------------------------------------- |
266
+ | 課題 | `{年}/attachments/{課題キー}/`(`--issueKeyFolder` 指定時は課題フォルダ直下の `attachments/`) |
267
+ | Wiki | Markdown と同じディレクトリの `attachments/{Wiki名}/`(階層 Wiki は末尾のページ名) |
268
+ | ドキュメント | Markdown と同じディレクトリの `attachments/{ドキュメント名}/` |
745
269
 
746
- <!-- commandsstop -->
270
+ - ファイル名は同名の衝突を避けるため `{添付ID}_{ファイル名}` になります
271
+ - Markdown の `## 添付ファイル` セクションにローカルファイルへの相対リンクが記載されます(フラグ未指定時はファイル名とサイズのみ記載)
272
+ - 課題の本文・コメント内の添付画像のインライン記法(`![image][ファイル名]` / `#image(ファイル名)`)は、ダウンロード済みファイルへの画像リンクに変換され、Markdown ビューアでそのまま表示できます
273
+ - Wiki・ドキュメントの本文は Backlog の原文のまま維持されます(添付参照記法の書き換えは行いません)。添付ファイルへは `## 添付ファイル` セクションのリンクからアクセスできます
274
+ - ダウンロード済みのファイルは再ダウンロードされないため、`update` コマンドでの差分更新でも効率的に動作します
275
+ - 設定は `backlog-settings.json` に保存され、以降の `update` コマンドで自動的に引き継がれます(`update` コマンド自体でフラグを指定した場合はその実行のみ有効です)
276
+ - Backlog 側で削除された添付ファイルは、誤削除防止のため `prune` コマンドでも削除されず残ります
747
277
 
748
- # 出力形式
278
+ ## 出力形式
749
279
 
750
- ## 本文マーカー
280
+ ### 本文マーカー
751
281
 
752
- 課題の詳細・Wikiの本文・ドキュメントの内容といった「本文」部分は、種別を問わず以下のHTMLコメントマーカーで囲まれて出力されます。
282
+ 課題の詳細・Wiki の本文・ドキュメントの内容といった「本文」部分は、種別を問わず以下の HTML コメントマーカーで囲まれて出力されます。
753
283
 
754
284
  ```markdown
755
285
  <!-- backlog-exporter:body:start -->
@@ -757,18 +287,14 @@ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/
757
287
  <!-- backlog-exporter:body:end -->
758
288
  ```
759
289
 
760
- - マーカーはMarkdownのレンダリング時には表示されません(HTMLコメント)
290
+ - マーカーは Markdown のレンダリング時には表示されません(HTML コメント)
761
291
  - 本文自体が `##` 見出しなどを含んでいても、開始・終了マーカー間を本文として機械的に抽出・差し替えできます
762
- - 本文をBacklogへ書き戻す(API反映する)ツールなどが、どこからどこまでが本文かを一意に判定するために使えます
292
+ - 本文を Backlog へ書き戻す(API 反映する)ツールなどが、どこからどこまでが本文かを一意に判定するために使えます
763
293
  - 子を持つ親ドキュメントの本文(`00_index.md`)にも同じマーカーが付きます
764
294
 
765
- **抽出時の規約**: 本文自体がマーカーと同じ文字列を含む可能性があるため(例: このツールの使い方をBacklog上にメモした場合)、抽出ツールは「ファイル内で**最初に現れる開始マーカー**から**最後に現れる終了マーカー**まで」を本文とみなしてください。
295
+ **抽出時の規約**: 本文自体がマーカーと同じ文字列を含む可能性があるため(例: このツールの使い方を Backlog 上にメモした場合)、抽出ツールは「ファイル内で**最初に現れる開始マーカー**から**最後に現れる終了マーカー**まで」を本文とみなしてください。
766
296
 
767
- 以降の出力例では、この本文マーカーを含めた形を示します。
768
-
769
- ## 課題の出力形式
770
-
771
- 課題は以下の形式で Markdown ファイルとして保存されます:
297
+ ### 課題の出力形式
772
298
 
773
299
  ```markdown
774
300
  # 課題のタイトル
@@ -788,7 +314,6 @@ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/
788
314
  | 属性名 | 値 |
789
315
  | ------------------ | ------------------------------ |
790
316
  | 工数(エンジニア) | 3 |
791
- | 工数(PPO) | なし |
792
317
  | 担当チーム | フロントエンド, バックエンド |
793
318
  | 詳細 | 実装内容<br>- 機能A<br>- 機能B |
794
319
 
@@ -806,20 +331,9 @@ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/
806
331
  - **日時**: 2023/01/01 11:15:30
807
332
 
808
333
  コメントの内容がここに表示されます。
809
-
810
- ---
811
-
812
- ### コメント 2
813
-
814
- - **投稿者**: 鈴木三郎
815
- - **日時**: 2023/01/02 09:45:12
816
-
817
- 返信コメントの内容がここに表示されます。
818
334
  ```
819
335
 
820
- ## Wiki の出力形式
821
-
822
- Wiki は以下の形式で Markdown ファイルとして保存されます:
336
+ ### Wiki の出力形式
823
337
 
824
338
  ```markdown
825
339
  # Wiki のタイトル
@@ -832,9 +346,7 @@ Backlog の書式がそのまま保持されます。
832
346
  <!-- backlog-exporter:body:end -->
833
347
  ```
834
348
 
835
- ## ドキュメント の出力形式
836
-
837
- ドキュメントは以下の形式で Markdown ファイルとして保存されます:
349
+ ### ドキュメントの出力形式
838
350
 
839
351
  ```markdown
840
352
  # ドキュメントのタイトル
@@ -857,7 +369,6 @@ Backlog の書式がそのまま保持されます。
857
369
  ## 添付ファイル
858
370
 
859
371
  - **資料.pdf** (1024.5 KB) - 作成者: 山田太郎, 作成日時: 2023/01/01 10:00:00
860
- - **画像.png** (256.3 KB) - 作成者: 佐藤次郎, 作成日時: 2023/01/01 10:30:00
861
372
 
862
373
  ## タグ
863
374
 
@@ -865,23 +376,19 @@ Backlog の書式がそのまま保持されます。
865
376
  - 設計書
866
377
  ```
867
378
 
868
- # その他の特徴
379
+ ## その他の特徴
869
380
 
870
- - **環境変数サポート**: 環境変数 `BACKLOG_API_KEY` を使用して API キーを設定可能
871
- - **自動ディレクトリ作成**: 出力ディレクトリが存在しない場合は自動的に作成
872
- - **並列処理**: 並列処理による高速なダウンロード
873
- - **ファイル名サニタイズ**: ファイル名の自動サニタイズ(不正な文字の除去)
874
- - **階層構造の保持**: Wiki の階層構造を保持したエクスポート
875
- - **キーワード検索**: ドキュメントの検索キーワード対応
876
- - **差分更新**: 前回の更新以降に変更されたデータのみを更新
877
- - **カスタム属性対応**: 課題のカスタム属性をテーブル形式で表示(配列・オブジェクト・プリミティブ値に対応)
381
+ - **自動ディレクトリ作成**:出力ディレクトリが存在しない場合は自動的に作成
382
+ - **並列処理**:並列処理による高速なダウンロード
383
+ - **レート制限対応**:API のレート制限に達した場合は自動的に待機してリトライ
384
+ - **ファイル名サニタイズ**:不正な文字を自動的に除去して安全なファイル名を生成
878
385
 
879
386
  ## 開発への貢献
880
387
 
881
- backlog-exporterはオープンソースプロジェクトです。バグ報告、機能提案、プルリクエストなど、あらゆる形での貢献を歓迎しています。
388
+ backlog-exporter はオープンソースプロジェクトです。バグ報告、機能提案、プルリクエストなど、あらゆる形での貢献を歓迎しています。
882
389
 
883
390
  詳しくは [CONTRIBUTING.md](docs/CONTRIBUTING.md) をご覧ください。
884
391
 
885
392
  ## ライセンス
886
393
 
887
- このプロジェクトは[MIT License](LICENSE)の下で公開されています。
394
+ このプロジェクトは [MIT License](LICENSE) の下で公開されています。