Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alphabetical listing of subcommands #65

Merged
merged 2 commits into from
May 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

### Ignition Fuel Tools 4.X.X (20xx-xx-xx)


1. Alphabetical listing of subcommands.
* [Pull request 65](https://github.com/ignitionrobotics/ign-fuel-tools/pull/65)

### Ignition Fuel Tools 4.1.0 (2020-02-27)

Expand Down
70 changes: 35 additions & 35 deletions src/cmd/cmdfuel.rb.in
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ COMMANDS = { 'fuel' =>
" ign fuel [action] [options] \n"\
" \n"\
"Available Actions: \n"\
" list List available resources \n"\
" download Download resources \n"\
" upload Upload resources \n"\
" delete Delete resources \n"\
" download Download resources \n"\
" list List available resources \n"\
" meta Read and write resource metadata \n"\
" upload Upload resources \n"\
" \n"\
"Available Options: \n"\
" -v [ --verbose ] [arg] Adjust the level of console output (0~4). \n"\
Expand All @@ -59,18 +59,17 @@ COMMANDS = { 'fuel' =>
}

SUBCOMMANDS = {
'list' =>
"List simulation resources \n"\
'delete' =>
"Delete simulation resources \n"\
" \n"\
" ign fuel list [options] \n"\
" ign fuel delete [options] \n"\
" \n"\
"Available Options: \n"\
" -t [--type] arg Resource type (i.e. model, world). Required. \n"\
" -o [--owner] arg Return only resources for given owner. \n"\
" -u [--url] arg URL of a server the resource comes from, \n"\
" if unspecified, it will be \n"\
" -u [--url] arg URL of the server that should receive \n"\
" the model. If unspecified, the server will be\n"\
" https://fuel.ignitionrobotics.org. \n"\
" -r [--raw] Machine-friendly output. \n" +
" --header arg Set an HTTP header, such as \n"\
" --header 'authorization: Bearer JWT'. \n" +
COMMON_OPTIONS,

'download' =>
Expand All @@ -85,34 +84,18 @@ SUBCOMMANDS = {
" --header 'authorization: Bearer JWT'. \n" +
COMMON_OPTIONS,

'upload' =>
"Upload simulation resources \n"\
" \n"\
" ign fuel upload [options] \n"\
" \n"\
"Available Options: \n"\
" -m [--model] arg Path to directory containing a model, or \n"\
" multiple models each in a subdirectory. \n"\
" -u [--url] arg URL of the server that should receive \n"\
" the model. If unspecified, the server will be\n"\
" https://fuel.ignitionrobotics.org. \n"\
" -p [--private] Use this argument to make the model private. \n"\
" Otherwise, the model will be public. \n"\
" --header arg Set an HTTP header, such as \n"\
" --header 'authorization: Bearer JWT'. \n" +
COMMON_OPTIONS,

'delete' =>
"Delete simulation resources \n"\
'list' =>
"List simulation resources \n"\
" \n"\
" ign fuel delete [options] \n"\
" ign fuel list [options] \n"\
" \n"\
"Available Options: \n"\
" -u [--url] arg URL of the server that should receive \n"\
" the model. If unspecified, the server will be\n"\
" -t [--type] arg Resource type (i.e. model, world). Required. \n"\
" -o [--owner] arg Return only resources for given owner. \n"\
" -u [--url] arg URL of a server the resource comes from, \n"\
" if unspecified, it will be \n"\
" https://fuel.ignitionrobotics.org. \n"\
" --header arg Set an HTTP header, such as \n"\
" --header 'authorization: Bearer JWT'. \n" +
" -r [--raw] Machine-friendly output. \n" +
COMMON_OPTIONS,

'meta' =>
Expand All @@ -127,6 +110,23 @@ SUBCOMMANDS = {
" model.confg. \n"+

COMMON_OPTIONS,

'upload' =>
"Upload simulation resources \n"\
" \n"\
" ign fuel upload [options] \n"\
" \n"\
"Available Options: \n"\
" -m [--model] arg Path to directory containing a model, or \n"\
" multiple models each in a subdirectory. \n"\
" -u [--url] arg URL of the server that should receive \n"\
" the model. If unspecified, the server will be\n"\
" https://fuel.ignitionrobotics.org. \n"\
" -p [--private] Use this argument to make the model private. \n"\
" Otherwise, the model will be public. \n"\
" --header arg Set an HTTP header, such as \n"\
" --header 'authorization: Bearer JWT'. \n" +
COMMON_OPTIONS,
}

#
Expand Down