From 69acd1727ab6fabb2c60f6e2bf4124a5c6ab5074 Mon Sep 17 00:00:00 2001 From: "Kim, Vinnam" Date: Mon, 22 Jul 2024 18:45:11 +0900 Subject: [PATCH] Update docs Signed-off-by: Kim, Vinnam --- .../docs/command-reference/helper/format.md | 20 +++++++++++++++++++ .../docs/command-reference/helper/index.rst | 9 +++++++++ .../docs/command-reference/overview.rst | 4 ++-- docs/source/docs/explanation/command_line.dot | 7 ++++++- docs/source/docs/index.rst | 1 + 5 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 docs/source/docs/command-reference/helper/format.md create mode 100644 docs/source/docs/command-reference/helper/index.rst diff --git a/docs/source/docs/command-reference/helper/format.md b/docs/source/docs/command-reference/helper/format.md new file mode 100644 index 0000000000..82ed5310cf --- /dev/null +++ b/docs/source/docs/command-reference/helper/format.md @@ -0,0 +1,20 @@ +# Format + +This command shows a list of supported import/export data formats in Datumaro. +It is useful on a quick reference of data format name used for other CLI command such as [convert](../context_free/convert.md), [import](../context/sources.md#import-dataset), or [export](../context/export.md#export-datasets). For more detailed guides on each data format, please visit [our Data Formats section](../../data-formats). + +Usage: + +```console +usage: datum format [-h] [-li | -le] [-d DELIMITER] +``` + +Parameters: +- `-h, --help` - Print the help message and exit. +- `-d DELIMITER, --delimiter DELIMITER` - Seperator used to list data format names (default: `\n`). For example, `datum format -d ','` command displays + ```console + Supported import formats: + ade20k2017,ade20k2020,align_celeba,... + ``` +- `-li, --list-import` - List all supported import data format names +- `-le, --list-export` - List all supported export data format names diff --git a/docs/source/docs/command-reference/helper/index.rst b/docs/source/docs/command-reference/helper/index.rst new file mode 100644 index 0000000000..863212e092 --- /dev/null +++ b/docs/source/docs/command-reference/helper/index.rst @@ -0,0 +1,9 @@ +=============== +Helper Commands +=============== + +.. toctree:: + :maxdepth: 1 + :glob: + + * diff --git a/docs/source/docs/command-reference/overview.rst b/docs/source/docs/command-reference/overview.rst index a6c2cf2558..2e5d3ef801 100644 --- a/docs/source/docs/command-reference/overview.rst +++ b/docs/source/docs/command-reference/overview.rst @@ -2,8 +2,8 @@ Overview ======== -The command line is split into the separate ``commands`` (:ref:`Context Commands`) -and command ``contexts`` (:ref:`Context-free Commands`). +The command line is split into three groups: +``commands`` (:ref:`Context Commands`), command ``contexts`` (:ref:`Context-free Commands`), and ``helpers`` (:ref:`Helper Commands`). Contexts group multiple commands related to a specific topic, e.g. project operations, data source operations etc. Almost all the commands operate on projects, so the ``project`` context and commands without a context diff --git a/docs/source/docs/explanation/command_line.dot b/docs/source/docs/explanation/command_line.dot index 75ab8edc20..c909e9440a 100644 --- a/docs/source/docs/explanation/command_line.dot +++ b/docs/source/docs/explanation/command_line.dot @@ -32,6 +32,11 @@ digraph command_line { "util"; } + subgraph helper { + label = "Helper"; + "format"; + } + subgraph cluster_model { label = "Model"; "madd" [label = "add";]; @@ -70,7 +75,7 @@ digraph command_line { "split_video"; } - "datum" -> {"convert" "detect" "compare" "dinfo" "download" "explain" "filter" "generate" "merge" "patch" "search" "stats" "transform" "validate"}; + "datum" -> {"convert" "detect" "compare" "dinfo" "download" "explain" "filter" "generate" "merge" "patch" "search" "stats" "transform" "validate" "format"}; "datum" -> {"model" "project" "source" "util"}; "model" -> {"madd" "mremove" "run" "minfo"}; "project" -> {"add" "create" "export" "import" "remove"}; diff --git a/docs/source/docs/index.rst b/docs/source/docs/index.rst index e23ee3dbdb..c8d3dfedbe 100644 --- a/docs/source/docs/index.rst +++ b/docs/source/docs/index.rst @@ -48,6 +48,7 @@ Docs command-reference/overview command-reference/context_free/index command-reference/context/index + command-reference/helper/index .. toctree:: :maxdepth: 1