Skip to content

Commit

Permalink
docs(csv-to-json): add csv-to-json postprocess to documents
Browse files Browse the repository at this point in the history
  • Loading branch information
osoken committed Jan 28, 2023
1 parent 6534edb commit d4735a0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/en/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Specify post-processing for downloaded files.\
| unzip | Unzip the zip file downloaded on `data_files/<name>`. |
| encode \<encoding\> | Change the character encoding of the downloaded file.<br>Supported encoding:UTF-16, UTF-16BE, UTF-16LE, UTF-8, ISO-2022-JP, Shift_JIS, EUC-JP, UNICODE |
| xlsx-to-csv | Convert the downloaded xlsx file to a csv file, and store in `data_files/<name>`. |
| csv-to-json | Convert the downloaded csv file to a json file, and store in `data_files/<name>`. |
| cmd \<command\> | Execute the command with the path of the downloaded file as an argument. |

#### -H, --headers \<header\>
Expand Down Expand Up @@ -66,6 +67,9 @@ dim install -n example -p "encode Shift_JIS" https://example.com/example.txt
# Convert the downloaded xlsx file to a csv file.
dim install -n example -p "xlsx-to-csv" https://example.com/example.xlsx

# Convert the downloaded csv file to a json file.
dim install -n example -p "csv-to-json" https://example.com/example.csv

# After downloading the file, run your python program.
dim install -n example -p "cmd python ./tests/test_custom_command.py" https://example.com/example.xlsx

Expand Down
1 change: 1 addition & 0 deletions doc/en/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Specify post-processing for downloaded files.\
| unzip | Unzip the zip file downloaded on `data_files/<name>`. |
| encode \<encoding\> | Change the character encoding of the downloaded file.<br>Supported encoding:UTF-16, UTF-16BE, UTF-16LE, UTF-8, ISO-2022-JP, Shift_JIS, EUC-JP, UNICODE |
| xlsx-to-csv | Convert the downloaded xlsx file to a csv file, and store in `data_files/<name>`. |
| csv-to-json | Convert the downloaded csv file to a json file, and store in `data_files/<name>`. |
| cmd \<command\> | Execute the command with the path of the downloaded file as an argument. |

### Examples
Expand Down
4 changes: 4 additions & 0 deletions doc/ja/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dim では -n オプションで指定された名称が、既存の名称と重
| unzip | ダウンロードしたzipファイルを`data_files/<name>`配下に解凍する。 エエン |
| encode \<encoding\> | ダウンロードしたファイルの文字コードを変更する。<br>対応エンコーディング:UTF-16, UTF-16BE, UTF-16LE, UTF-8, ISO-2022-JP, Shift_JIS, EUC-JP, UNICODE |
| xlsx-to-csv | ダウンロードしたxlsxファイルをcsvファイルに変換したファイルを、`data_files/<name>`配下に生成する。 |
| csv-to-json | ダウンロードしたcsvファイルをjsonファイルに変換したファイルを、`data_files/<name>`配下に生成する。 |
| cmd \<command\> | ダウンロードしたファイルのパスを引数としてコマンドを実行する。 |

#### -H, --headers \<header\>
Expand Down Expand Up @@ -64,6 +65,9 @@ dim install -n example -p "encode Shift_JIS" https://example.com/example.txt
# ダウンロードしたxlsxファイルをcsvファイルに変換する。
dim install -n example -p "xlsx-to-csv" https://example.com/example.xlsx

# ダウンロードしたcsvファイルをjsonファイルに変換する。
dim install -n example -p "csv-to-json" https://example.com/example.csv

# ファイルをダウンロード後に、独自のpythonプログラムを実行する。
dim install -n example -p "cmd python ./tests/test_custom_command.py" https://example.com/example.xlsx

Expand Down
1 change: 1 addition & 0 deletions doc/ja/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ dim search [options] <keyword>
| unzip | ダウンロードしたzipファイルを`data_files/<name>`配下に解凍する。 |
| encode \<encoding\> | ダウンロードしたファイルの文字コードを変更する。<br>対応エンコーディング:UTF-16, UTF-16BE, UTF-16LE, UTF-8, ISO-2022-JP, Shift_JIS, EUC-JP, UNICODE |
| xlsx-to-csv | ダウンロードしたxlsxファイルをcsvファイルに変換したファイルを、`data_files/<name>`配下に生成する。 |
| csv-to-json | ダウンロードしたcsvファイルをjsonファイルに変換したファイルを、`data_files/<name>`配下に生成する。 |
| cmd \<command\> | ダウンロードしたファイルのパスを引数としてコマンドを実行する。 |

### 実行例
Expand Down

0 comments on commit d4735a0

Please sign in to comment.