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

Add command to list items of a given content type #153

Merged
merged 4 commits into from
Aug 5, 2022

Conversation

jacalata
Copy link
Contributor

I created this because I kept having to open up a site to see project/workbook names to call commands on :)

Usage: tabcmd list content_type

content_type currently supports the options projects | workbooks | datasources
Display is modelled on listsites

example:
Creating new session
===== Server: https://cd-near.online.dev.tabint.net/
===== Username: jac.fitzgerald@salesforce.com
Tableau Server Site: cdnearcoresvcsauth
Connecting to the server...
Succeeded
===== Listing projects content for user jac.fitzgerald@salesforce.com...
NAME: default
ID: fb6171a2-acc0-4a3c-8cff-22962d7b45ee
NAME: Samples
ID: cf0e3d2f-82a0-4d9f-b1b5-9b03fff72064
NAME: Admin Insights
ID: de529fef-5c50-4dad-97a1-b31829278012
NAME: test
ID: 330d5e95-7818-48c4-ac92-ac7d79f9040b
NAME: Project1
ID: 5a470aa3-82c5-44f5-add2-44cc835c67ce
NAME: ThatOldOld
ID: d603a82f-b9f4-497e-b00a-b410de7f8e5e

===== Listing workbooks content for user jac.fitzgerald@salesforce.com...
NAME: Superstore
ID: b9d292ff-095e-43df-b8c0-da6462f5a7db
NAME: New Workbook
ID: 793c2d2a-6749-4029-b78c-700189d34a4e
NAME: Admin Insights Starter
ID: ff7bde68-b938-4b44-a96a-d392188adec6

===== Listing datasources content for user jac.fitzgerald@salesforce.com...
NAME: Superstore Datasource
ID: 8b2ddc4f-937c-4ecf-8d5a-6116e0615e07
NAME: TS Users
ID: 947c2570-5fcf-43e7-8617-d8140a5893a2
NAME: TS Events
ID: 9c932639-1e40-4ca7-9b0f-2ba604dbb244
NAME: Site Content

@jacalata jacalata requested a review from smarvin July 29, 2022 19:02
@bcantoni bcantoni changed the base branch from main to development July 29, 2022 19:15
@github-actions
Copy link

github-actions bot commented Aug 5, 2022

Coverage

Coverage Report
FileStmtsMissCoverMissing
tabcmd
   main.py777 0%
   tabcmd.py121212 0%
tabcmd/commands
   commands.py101010 0%
   constants.py401111 72%
   server.py1302727 79%
tabcmd/commands/auth
   session.py2784141 85%
tabcmd/commands/datasources_and_workbooks
   datasources_and_workbooks_command.py3477 79%
   delete_command.py591616 73%
   export_command.py1093737 66%
   get_url_command.py1524545 70%
   publish_command.py571616 72%
   runschedule_command.py2077 65%
tabcmd/commands/extracts
   create_extracts_command.py3955 87%
   decrypt_extracts_command.py2622 92%
   delete_extracts_command.py3666 83%
   encrypt_extracts_command.py2622 92%
   reencrypt_extracts_command.py2622 92%
   refresh_extracts_command.py672626 61%
tabcmd/commands/group
   create_group_command.py2855 82%
   delete_group_command.py2622 92%
tabcmd/commands/help
   help_command.py472626 45%
tabcmd/commands/project
   create_project_command.py4599 80%
   delete_project_command.py3444 88%
   publish_samples_command.py2744 85%
tabcmd/commands/site
   create_site_command.py3577 80%
   delete_site_command.py2422 92%
   edit_site_command.py3722 95%
   list_command.py331818 45%
   list_sites_command.py2922 93%
tabcmd/commands/user
   create_site_users.py4555 89%
   create_users_command.py5144 92%
   delete_site_users_command.py4255 88%
   user_data.py1982121 89%
tabcmd/execution
   _version.py222 0%
   global_options.py1362323 83%
   localize.py5788 86%
   parent_parser.py4633 93%
   tabcmd_controller.py3444 88%
TOTAL222343580% 

Copy link
Contributor

@bcantoni bcantoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - also did a quick test and confirmed it works.

@jacalata jacalata merged commit 7fb7b9c into development Aug 5, 2022
@jacalata jacalata mentioned this pull request Aug 11, 2022
jacalata added a commit that referenced this pull request Aug 11, 2022
* --save-db-password flag thinks it should get an argument
 * updated several other publishing arguments that had the same problem
* change argument from "token" to "token-value" so it is not a substring of "token-name", remove the 2-letter short arguments
*  format a nice help output
* TFS 1428581 publish project (#139)
* groups and users fix
* Update session.py (#141)
* clearly indicate when using the default site
* Jac/tfs 1428582 create edit site (#146)
* Getting workbook works as expected, but appends extra file extensions
* Fix get view, get csv (#143)
* Change install destination (#150)
* Jac/publish to folder gives an error (#145)
* Jac/delete command can't find item (#144)
* filter for items in project
* separate the use of ds/wb as flags vs as argument names
* update publish_samples to call shared project logic
* Add command to list items of a given content type (#153)
Co-authored-by: Brian Cantoni <bcantoni@salesforce.com>
Co-authored-by: Bhuvnesh Singh <bhuvnesh.singh@salesforce.com>
@jacalata jacalata deleted the future/add-list-command branch September 9, 2022 21:00
jacalata added a commit that referenced this pull request Sep 12, 2022
* --save-db-password flag thinks it should get an argument
*updated several other publishing arguments that had the same problem
* change argument from "token" to "token-value" so it is not a substring of "token-name", remove the 2-letter short arguments
* fix reencrypt_extracts help string
* Hand format a nice help output
* Fix exit_with_error handling
* Defect 1426885: [Tabcmd WAM] addusers and removeusers error
* fix deletegroup
* update unlocalized strings
* clearly indicate when using the default site
* Fix export success log message params (#142)
* Jac/tfs 1428582 create edit site (#146)
* Getting workbook works as expected, but appends extra file extensions
* Fix get view, get csv (#143)
* Change install destination (#150)
* Defect 1428581: [Tabcmd WAM] Publishing to projects other than default throws an error
* Jac/delete command (#144)
* filter for items in project
* separate the use of ds/wb as flags vs as argument names
* update publish_samples to call shared project logic
* Add command to list items of a given content type (#153)
* make export use filters, add tests (#164)
* Add trace logging details and error stack
* handle url input more robustly
Co-authored-by: Brian Cantoni <bcantoni@salesforce.com>
Co-authored-by: Bhuvnesh Singh <bhuvnesh.singh@salesforce.com>
jacalata added a commit that referenced this pull request Nov 10, 2022
Dropped support for python < 3.9
Changed argument from "token" to "token-value" so it is not a substring of "token-name", remove the 2-letter short arguments

Release 2.0.6
* add step to list dependencies for licensing
* Defect 1427376: [Tabcmd WAM] --save-db-password flag thinks it should get an argument (#134)
* Fix exit_with_error handling (#137)
* TFS 1428581 publish project (#139)
* Defect 1426885: [Tabcmd WAM] addusers and removeusers error, fix deletegroup (#140)
* clearly indicate when using the default site (#141)
* Fix export success log message params (#142)
* Jac/tfs 1428582 create edit site (#146)
* Fix get view, get csv file extensions (#143)
* Change install destination to /tabcmd instead of /src (#150)
* Defect 1428581: [Tabcmd WAM] Publishing to projects other than default throws an error  (#145)
* Jac/delete command (#144)
* Jac/e2e test workflow (#154)
* Add command to list items of a given content type (#153)
* make export use filters, add tests (#164)
* Fix some e2e tests (#166)
* Trace logging and bug fix (#165)

Release 2.0.7
* Implement command line and url parameters for get/export (#175)
* recognize more values for yes on command line (#173)
* fully port to pyproject.toml (#182)
* implement pdf layout/page type (#184, #169)
* tfs 1427025: Confusing error message related to sign-in (#187), (#190)
* stop duplicate logging in session
* extract encryption defaults to false (#193)
* call sites endpoint correctly (#194)
* publish data source to Tableau Cloud for published live connection with Tableau Bridge (#195)

Co-authored-by: Brian Cantoni <bcantoni@salesforce.com>
Co-authored-by: Bhuvnesh Singh <bhuvnesh.singh@salesforce.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants