format command-specific help - #203
Merged
Merged
Conversation
Shouldn't be relevant except during development, but it's always nice to be accurate
- Delete help command - Move command registration into parent_parser - Move help output into parent_parser - Refactor parent_parser to present args in groups for help - Add long explanatory comment - Extract all user facing text in parent_parser to enable translation
So that arguments for the command show up when you run tabcmd command -h
e.g
behavioral arguments:
...
listsites:
--get-extract-encryption-mode
Include the extract encryption mode for each site.
Contributor
Author
|
@dzucker-tab what do you think of the category names I made up 'global connection arguments' and 'global behavioral arguments'? Feels like there might be better ones available. |
ashwinar
approved these changes
Dec 7, 2022
jacalata
added a commit
that referenced
this pull request
Dec 8, 2022
* Add Datasources to the Get Command (#162) * format command-specific help (#203) * hide token-value like we do password * Tfs 1482014 publishing (#205) * make db-auth/oauth mutually exclusive * Create a db credentials item for publishing with --db-username, etc arguments Co-authored-by: Brian Cantoni <bcantoni@salesforce.com> Co-authored-by: Bhuvnesh Singh <bhuvnesh.singh@salesforce.com> Co-authored-by: andyoneal <andyoneal@me.com>
jacalata
added a commit
that referenced
this pull request
Dec 16, 2022
* different output based on switch used * hide token-value like we do password * refactoring: help command and parent_parser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
command specific help:
c:\dev\tabcmd2>python -m tabcmd createsite -h
usage: tabcmd createsite [-h] [-s ] [-t SITEID] [--token-name | -u ]
[--token-value | -p | --password-file | --token-file ]
[--no-prompt] [-c | --no-certcheck] [--no-cookie] [-x HOST:PORT | --no-proxy]
[--timeout ] [--continue-if-exists] [--country {de,en,es,fr,it,ja,ko,pt,sv,zh}]
[--language {de,en,es,fr,it,ja,ko,pt,sv,zh}] [-l {TRACE,DEBUG,INFO,ERROR}] [-v]
[--site-id SITE_ID | -r URL] [--user-quota USER_QUOTA] [--site-mode | --no-site-mode]
[--storage-quota STORAGE_QUOTA] [--extract-encryption-mode {enforced,enabled,disabled}]
[--run-now-enabled {True,False}]
site-name
global connection arguments:
-h, --help show this help message and exit
-s , --server
Use the specified Tableau Server URL. If no protocol is specified, http:// is assumed
-t SITEID, --site SITEID
Use the specified Tableau Server site. Specify an empty string () to force use of the default site
--token-name
The name of the Tableau Server Personal Access Token. If using a token to sign in, this is required at
least once to begin session.
-u , --username
Use the specified Tableau Server user name
--token-value
Use the specified Tableau Server Personal Access Token. Requires --token-name to be set.
-p , --password
Use the specified Tableau Server password
--password-file
Read the Tableau Server password from FILE
--token-file Read the Personal Access Token from a file.
--no-prompt Do not prompt for a password
-c , --use-certificate
Use client certificate to sign in
--no-certcheck Do not validate the SSL certificate
--no-cookie Do not save the session ID when signing in. Subsequent commands will need to sign in again. If
unspecified, default is to save the session ID
-x HOST:PORT, --proxy HOST:PORT
Use the specified HTTP proxy
--no-proxy Do not use a HTTP proxy
--timeout How long to wait, in seconds, for the server to complete processing the command. The default is to
wait until the server responds
global behavioral arguments:
--continue-if-exists Treat resource conflicts as item creation success e.g project already exists
--country {de,en,es,fr,it,ja,ko,pt,sv,zh}
If not using user''s default locale, the country abbreviation for locale (find in IANA Language Subtag
Registry). Must use with --language
--language {de,en,es,fr,it,ja,ko,pt,sv,zh}
Set the language to use. Exported data will be returned in this lang/locale. If not set, the client
will use your computer locale, and the server will use your user account locale
-l {TRACE,DEBUG,INFO,ERROR}, --logging-level {TRACE,DEBUG,INFO,ERROR}
Use the specified logging level. The default level is INFO.
-v, --version Show version information and exit.
createsite:
site-name Display name of the site
--site-id SITE_ID Used in the URL to uniquely identify the site.
-r URL, --url URL Used in URLs to specify the site. Different from the site name.
--user-quota USER_QUOTA
Maximum number of users that can be added to the site.
--site-mode Allows or denies site administrators the ability to add users to or remove users from the site.
--no-site-mode Allows or denies site administrators the ability to add users to or remove users from the site.
--storage-quota STORAGE_QUOTA
In MB, the amount of data that can be stored on the site.
--extract-encryption-mode {enforced,enabled,disabled}
The extract encryption mode for the site can be enforced, enabled or disabled.
--run-now-enabled {True,False}
Allow or deny users from running extract refreshes, flows, or schedules manually.