Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
ta-Hirose committed Sep 27, 2022
1 parent 1ffc526 commit ac6d8a7
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 95 deletions.
7 changes: 5 additions & 2 deletions doc/en/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ Displays information on the commands available in the dim.

## Argument

**optional** Specify the command for dim. Information on each command is displayed. If no arguments are specified, a
list of available commands is displayed.
**optional**\
Specify the command for dim.\
Information on each command is displayed.\
If no arguments are specified,\
a list of available commands is displayed.

```bash
dim help [command]
Expand Down
3 changes: 2 additions & 1 deletion doc/en/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## Overview

Initialise the contents of `dim.json` and `dim-lock.json`. Files under `data_files` are not initialized.
Initialise the contents of `dim.json` and `dim-lock.json`.\
Files under `data_files` are not initialized.

```bash
dim init
Expand Down
50 changes: 26 additions & 24 deletions doc/en/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Overview

Download file from specified URL or from URL recorded in `dim.json`.
Download file from specified URL or from URL recorded in `dim.json`.\
Downloaded files are stored under `data_files`.

## Run dim install with URL
Expand All @@ -17,35 +17,37 @@ dim install [options] <URL>

#### -n, --name \<name\>

**required**
Specify a unique name to identify data. The specified name will be used in update and uninstall commands to specify the data to be processed. Also used as name of a subdirectory when storing data under the data_files directory.
**required**\
Specify a unique name to identify data.\
The specified name will be used in update and uninstall commands to specify the data to be processed\
Also used as name of a subdirectory when storing data under the data_files directory.

In dim, if the name specified by the -n option duplicates an existing name,
In dim, if the name specified by the -n option duplicates an existing name,\
it is regarded as the same data and data re-downloading is restricted.

#### -p, --postProcesses \<process name\>

**optional**
Specify post-processing for downloaded files.
**optional**\
Specify post-processing for downloaded files.\
(Multiple designations possible)

| process name | description |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| unzip | Unzip the downloaded zip file in the current directory. |
| process name | description |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| unzip | Unzip the downloaded zip file in the current directory. |
| encode \<code\> | Change the character encoding of the downloaded file.<br>Corresponding code:UTF-16, UTF-16BE, UTF-16LE, UTF-8, ISO-2022-JP, Shift_JIS, EUC-JP, UNICODE |
| xlsx-to-csv | Generate downloaded xlsx files converted to csv files under the data_files distribution. |
| cmd \<command\> | Execute the command with the path of the downloaded file as an argument. |
| xlsx-to-csv | Generate downloaded xlsx files converted to csv files under the data_files distribution. |
| cmd \<command\> | Execute the command with the path of the downloaded file as an argument. |

#### -H, --headers \<header\>

**optional**
Specify request headers for downloads.
**optional**\
Specify request headers for downloads.\
(Multiple designations possible)

#### -F, --force

**optional**
Specify `-F` if you want to ignore the re-download restriction and force the data to be downloaded.
**optional**\
Specify `-F` if you want to ignore the re-download restriction and force the data to be downloaded.\
Re-downloading with `-F` will overwrite the original data.

### Examples
Expand Down Expand Up @@ -82,7 +84,7 @@ dim install -n example -p "unzip" -H "Authorization: 1234567890abc" -F https://e

## Run dim install without URL

Download file from URL recorded in `dim.json`.
Download file from URL recorded in `dim.json`.\
If `-f` is not specified, it refers to `dim.json` in the current directory.

```bash
Expand All @@ -93,22 +95,22 @@ dim install [options]

#### -f, --file \<path or URL\>

**optional**
Download based on the contents of the specified dim.json.
Specify `path` to specify a local file.
**optional**\
Download based on the contents of the specified dim.json.\
Specify `path` to specify a local file.\
Specify `URL` to specify a file on the Internet.

#### -A, --asyncInstall

**optional**
When downloading multiple files, the default download is a synchronous process.
**optional**\
When downloading multiple files, the default download is a synchronous process.\
`-A` to change to an asynchronous process.

#### -F, --force

**optional**
By default, dim.json and dim-lock.json are compared and the data present only in dim.json is downloaded.
Specify `-F` if you want to force downloading of all data contained in dim.json.
**optional**\
By default, dim.json and dim-lock.json are compared and the data present only in dim.json is downloaded.\
Specify `-F` if you want to force downloading of all data contained in dim.json.\
In this case, installed data with matching names are overwritten.

### Examples
Expand Down
2 changes: 1 addition & 1 deletion doc/en/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dim list [option]

### -s, --simple

**optional**
**optional**\
Specify `-s` if only data is to be output.

## Examples
Expand Down
42 changes: 21 additions & 21 deletions doc/en/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Overview

Search for data using specified keywords.
The search uses the [Data catalogue cross search website](https://search.ckan.jp) API.
Search for data using specified keywords.\
The search uses the [Data catalogue cross search website](https://search.ckan.jp) API.\
If multiple keywords are used, specify space-separated strings.

```bash
Expand All @@ -14,47 +14,47 @@ dim search [options] <keyword>

### -n, --number \<num\>

**optional**
Specifies the maximum data set to be retrieved during a search.
A number between 1 and 100 can be specified.
**optional**\
Specifies the maximum data set to be retrieved during a search.\
A number between 1 and 100 can be specified.\
The default value is set at 10.

### -i, --install

**optional**
Interactive data download from search results.
In interactive installations, data retrieval,
**optional**\
Interactive data download from search results.\
In interactive installations, data retrieval,\
acquisition and post-processing are specified interactively.

#### Selecting the data to be installed

Select the data you want to download from the search results.
The data selection uses a number allocated to each search result data.
Select the data you want to download from the search results.\
The data selection uses a number allocated to each search result data.\
The numbers are in the form `1.[Data name]`.

#### Specify name

Specify a unique name to identify the data.
Used in `update`, `uninstall` commands, etc., to specify the data to be processed.
Also used as the name of a subdirectory when storing data under the `data_files` directory.
If unspecified, it is automatically generated from the `xckan_title` of the search result and the `name` in the `resources`.
Specify a unique name to identify the data.\
Used in `update`, `uninstall` commands, etc., to specify the data to be processed.\
Also used as the name of a subdirectory when storing data under the `data_files` directory.\
If unspecified, it is automatically generated from the `xckan_title` of the search result\
and the `name` in the `resources`.

#### Specify post-processing

Specify post-processing for downloaded files.
Specify post-processing for downloaded files.\
(Multiple designations possible)

| process name | description |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| unzip | Unzip the downloaded zip file in the current directory. |
| process name | description |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| unzip | Unzip the downloaded zip file in the current directory. |
| encode \<code\> | Change the character encoding of the downloaded file.<br>Corresponding code:UTF-16, UTF-16BE, UTF-16LE, UTF-8, ISO-2022-JP, Shift_JIS, EUC-JP, UNICODE |
| xlsx-to-csv | Generate downloaded xlsx files converted to csv files under the data_files distribution. |
| cmd \<command\> | Execute the command with the path of the downloaded file as an argument. |
| xlsx-to-csv | Generate downloaded xlsx files converted to csv files under the data_files distribution. |
| cmd \<command\> | Execute the command with the path of the downloaded file as an argument. |

### Examples

```
# Search by specifying one keyword.
dim search "Tokyo"
# Search by specifying two keywords.
Expand Down
2 changes: 1 addition & 1 deletion doc/en/uninstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dim uninstall [name]

## Argument

**required**
**required**\
Specify the `name` of the data to be deleted.

## Examples
Expand Down
6 changes: 3 additions & 3 deletions doc/en/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Update specified data.

## Run dim update with URL

Search `dim-lock.json` for data matching the name given in the argument.
Search `dim-lock.json` for data matching the name given in the argument.\
If the above data is found, re-download the data and update `dim.json` and `dim-lock.json`.

```bush
Expand All @@ -32,8 +32,8 @@ dim update [option]

#### -A, --asyncInstall

**optional**
When downloading multiple files, the default download is a synchronous process.
**optional**\
When downloading multiple files, the default download is a synchronous process.\
`-A` to change to an asynchronous process.

### Example
Expand Down
50 changes: 25 additions & 25 deletions doc/ja/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 概要

指定したURL、もしくは`dim.json`に記録されているURLからファイルをダウンロードする。
指定したURL、もしくは`dim.json`に記録されているURLからファイルをダウンロードする。\
ダウンロードされたファイルは`data_files`配下に保存される。

## URLを指定して実行
Expand All @@ -17,38 +17,38 @@ dim install [options] <URL>

#### -n, --name \<name\>

**必須項目**
データを識別するための一意な名前を指定する。
`update`, `uninstall`コマンドで、処理対象のデータを指定する際に使用する。
**必須項目**\
データを識別するための一意な名前を指定する。\
`update`, `uninstall`コマンドで、処理対象のデータを指定する際に使用する。\
`data_files`ディレクトリ配下にデータを保存する際、サブディレクトリの名称としても使われる。

dim では -n オプションで指定された名称が、既存の名称と重複した場合、
dim では -n オプションで指定された名称が、既存の名称と重複した場合、\
同一データとみなしデータの再ダウンロードを制限している。

#### -p, --postProcesses \<process name\>

**任意項目**
ダウンロードしたファイルに対する後処理を指定する。
**任意項目**\
ダウンロードしたファイルに対する後処理を指定する。\
複数指定可能

| 後処理の種類 | 概要 |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| 後処理の種類 | 概要 |
| --------------- | ------------------------------------------------------------------------------------------------------------ |
| unzip | ダウンロードしたzipファイルをカレントディレクトリ内に解凍する。 |
| encode \<code\> | ダウンロードしたファイルの文字コードを変更する。<br>対応コード:UTF-16, UTF-16BE, UTF-16LE, UTF-8, ISO-2022-JP, Shift_JIS, EUC-JP, UNICODE |
| xlsx-to-csv | ダウンロードしたxlsxファイルをcsvファイルに変換したファイルを、data_files配下に生成する。 |
| cmd \<command\> | ダウンロードしたファイルのパスを引数としてコマンドを実行する。 |
| xlsx-to-csv | ダウンロードしたxlsxファイルをcsvファイルに変換したファイルを、data_files配下に生成する。 |
| cmd \<command\> | ダウンロードしたファイルのパスを引数としてコマンドを実行する。 |

#### -H, --headers \<header\>

**任意項目**
ダウンロード時のリクエストヘッダーを指定する。
**任意項目**\
ダウンロード時のリクエストヘッダーを指定する。\
複数指定可能

#### -F, --force

**任意項目**
再ダウンロードの制限を無視して、
データを強制的にダウンロードしたい場合は`-F`を指定する。
**任意項目**\
再ダウンロードの制限を無視して、\
データを強制的にダウンロードしたい場合は`-F`を指定する。\
`-F`を指定して再ダウンロードすると、元のデータは上書きされる。

### 実行例
Expand Down Expand Up @@ -84,7 +84,7 @@ dim install -n example -p "unzip" -H "Authorization: 1234567890abc" -F https://e

## URLを指定せずに実行

`dim.json`に記録されているURLからファイルのダウンロードを行う。
`dim.json`に記録されているURLからファイルのダウンロードを行う。\
`-f`を指定していない場合は、カレントディレクトリに存在する`dim.json`を参照する。

```bash
Expand All @@ -95,22 +95,22 @@ dim install [options]

#### -f, --file \<path or URL\>

**任意項目**
指定したdim.jsonの内容を元にダウンロードを行う。
ローカルファイルを指定する場合は`path`を指定する。
**任意項目**\
指定したdim.jsonの内容を元にダウンロードを行う。\
ローカルファイルを指定する場合は`path`を指定する。\
インターネット上のファイルを指定する場合は`URL`を指定する。

#### -A, asyncInstall

**任意項目**
複数ファイルをダウンロードする場合、デフォルトでは同期処理でダウンロードを行う。
**任意項目**\
複数ファイルをダウンロードする場合、デフォルトでは同期処理でダウンロードを行う。\
`-A`を指定することで非同期処理に変更される。

#### -F, --force

**任意項目**
デフォルトでは、dim.jsonとdim-lock.jsonを比較し、dim.jsonにのみ存在するデータのダウンロードを行う。
dim.json に含まれる全てのデータを強制的にダウンロードしたい場合は`-F`を指定する。
**任意項目**\
デフォルトでは、dim.jsonとdim-lock.jsonを比較し、dim.jsonにのみ存在するデータのダウンロードを行う。\
dim.json に含まれる全てのデータを強制的にダウンロードしたい場合は`-F`を指定する。\
この場合、名称が一致するインストール済みのデータは上書きされる。

### Examples
Expand Down
Loading

0 comments on commit ac6d8a7

Please sign in to comment.