Implement command line and url parameters for get/export - #175
Conversation
jacalata
commented
Sep 9, 2022
- refresh parameter is used to set maxAge
- filters can be set either with --filter option or in url parameters
- Height/width parameters are not yet implemented, b/c they are not available in the underlying REST API
- orientation can be set in get command
| return matching_workbooks[0] | ||
|
|
||
| @staticmethod | ||
| def apply_values_from_url_params(request_options: TSC.PDFRequestOptions, url, logger) -> None: |
There was a problem hiding this comment.
I am assuming that the url type is a string. If yes, can we be sure that the url will always be decoded at this point in the code. Also, is there a url library in python that can abstract getting params from urls that we could use instead?
There was a problem hiding this comment.
it is a string, yes. It's not a full url, it's the representation of the workbook/view as it would be in a url (tabcmd get "/views/Sales_Analysis/Sales_Report.png") - I'm actually not quite sure how we handle encoding yet and have to do some comparison with behaviors in the original tabcmd, but it's possible a proper library will be better.
| # ExportCommand.log_stack(logger) # type: ignore | ||
|
|
||
| @staticmethod | ||
| def apply_filter_value(request_options: TSC.PDFRequestOptions, value: str, logger) -> None: |
There was a problem hiding this comment.
Can the apply_filter_value and apply_option_value methods be moved to a class that is more relevant ?
| def apply_option_value(request_options: TSC.PDFRequestOptions, value: str, logger) -> None: | ||
| logger.trace("handling url option {}".format(value)) | ||
| setting = value.split("=") | ||
| if ":iid" == setting[0]: |
There was a problem hiding this comment.
Suggestion: this block might read better inside a switch case
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>