tabcmd 2.0.14__tar.gz → 2.0.17__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tabcmd-2.0.14 → tabcmd-2.0.17}/.github/workflows/generate-metadata.yml +1 -1
- {tabcmd-2.0.14 → tabcmd-2.0.17}/.github/workflows/package.yml +24 -20
- {tabcmd-2.0.14 → tabcmd-2.0.17}/.github/workflows/publish-pypi.yml +1 -1
- {tabcmd-2.0.14 → tabcmd-2.0.17}/.github/workflows/run-e2-tests.yml +1 -1
- {tabcmd-2.0.14 → tabcmd-2.0.17}/.github/workflows/run-tests.yml +1 -1
- {tabcmd-2.0.14 → tabcmd-2.0.17}/.gitignore +4 -0
- {tabcmd-2.0.14/tabcmd.egg-info → tabcmd-2.0.17}/PKG-INFO +3 -3
- {tabcmd-2.0.14 → tabcmd-2.0.17}/bin/i18n/msgfmt.py +5 -4
- {tabcmd-2.0.14 → tabcmd-2.0.17}/bin/i18n/prop2po.py +18 -11
- {tabcmd-2.0.14 → tabcmd-2.0.17}/contributing.md +14 -5
- tabcmd-2.0.17/dodo.py +348 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/pyproject.toml +1 -1
- tabcmd-2.0.17/res/metadata.yml +7 -0
- tabcmd-2.0.17/tabcmd/__main__.py +17 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/constants.py +6 -1
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/datasources_and_workbooks/datasources_and_workbooks_command.py +43 -14
- tabcmd-2.0.17/tabcmd/commands/datasources_and_workbooks/datasources_workbooks_views_url_parser.py +198 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/datasources_and_workbooks/export_command.py +33 -41
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/datasources_and_workbooks/get_url_command.py +39 -110
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/datasources_and_workbooks/publish_command.py +16 -7
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/datasources_and_workbooks/runschedule_command.py +1 -1
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/extracts/create_extracts_command.py +1 -1
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/extracts/refresh_extracts_command.py +2 -5
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/group/create_group_command.py +1 -1
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/group/delete_group_command.py +1 -1
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/project/create_project_command.py +2 -2
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/project/publish_samples_command.py +4 -2
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/server.py +49 -26
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/site/list_sites_command.py +2 -3
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/user/add_users_command.py +1 -1
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/user/create_site_users.py +2 -2
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/user/create_users_command.py +3 -3
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/user/delete_site_users_command.py +1 -1
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/user/remove_users_command.py +1 -1
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/user/user_data.py +16 -10
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/execution/global_options.py +9 -6
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/execution/localize.py +10 -9
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/execution/parent_parser.py +10 -1
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/execution/tabcmd_controller.py +13 -9
- tabcmd-2.0.17/tabcmd/locales/de/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.17/tabcmd/locales/de/extra.properties +23 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/de/shared_wg_de.properties +219 -171
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/de/tabcmd_messages_de.properties +169 -133
- tabcmd-2.0.17/tabcmd/locales/en/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.17/tabcmd/locales/en/extra.properties +22 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/en/shared_wg_en.properties +91 -35
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/en/tabcmd_messages_en.properties +39 -5
- tabcmd-2.0.17/tabcmd/locales/es/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.17/tabcmd/locales/es/extra.properties +23 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/es/shared_wg_es.properties +186 -138
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/es/tabcmd_messages_es.properties +143 -107
- tabcmd-2.0.17/tabcmd/locales/fr/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.17/tabcmd/locales/fr/extra.properties +22 -0
- tabcmd-2.0.17/tabcmd/locales/fr/shared_wg_fr.properties +529 -0
- tabcmd-2.0.17/tabcmd/locales/fr/tabcmd_messages_fr.properties +438 -0
- tabcmd-2.0.17/tabcmd/locales/ga/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.17/tabcmd/locales/ga/extra.properties +23 -0
- tabcmd-2.0.17/tabcmd/locales/ga/shared_wg_ga.properties +529 -0
- tabcmd-2.0.17/tabcmd/locales/ga/tabcmd_messages_ga.properties +438 -0
- tabcmd-2.0.17/tabcmd/locales/it/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.17/tabcmd/locales/it/extra.properties +22 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/it/shared_wg_it.properties +248 -200
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/it/tabcmd_messages_it.properties +211 -175
- tabcmd-2.0.17/tabcmd/locales/ja/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.17/tabcmd/locales/ja/extra.properties +22 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/ja/shared_wg_ja.properties +205 -157
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/ja/tabcmd_messages_ja.properties +152 -116
- tabcmd-2.0.17/tabcmd/locales/ko/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.17/tabcmd/locales/ko/extra.properties +23 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/ko/shared_wg_ko.properties +181 -133
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/ko/tabcmd_messages_ko.properties +135 -99
- tabcmd-2.0.17/tabcmd/locales/pt/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.17/tabcmd/locales/pt/extra.properties +23 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/pt/shared_wg_pt.properties +187 -139
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/pt/tabcmd_messages_pt.properties +136 -100
- tabcmd-2.0.17/tabcmd/locales/sv/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.17/tabcmd/locales/sv/extra.properties +22 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/sv/shared_wg_sv.properties +201 -153
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/sv/tabcmd_messages_sv.properties +190 -154
- tabcmd-2.0.17/tabcmd/locales/zh/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.17/tabcmd/locales/zh/extra.properties +23 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/zh/shared_wg_zh.properties +113 -65
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/zh/tabcmd_messages_zh.properties +98 -62
- tabcmd-2.0.17/tabcmd-linux.spec +61 -0
- tabcmd-2.0.17/tabcmd-mac.spec +60 -0
- tabcmd-2.0.17/tabcmd-windows.spec +60 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17/tabcmd.egg-info}/PKG-INFO +3 -3
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd.egg-info/SOURCES.txt +13 -44
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd.egg-info/requires.txt +1 -1
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_datasources_and_workbooks_command.py +18 -3
- tabcmd-2.0.17/tests/commands/test_geturl_utils.py +447 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_localize.py +0 -7
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_projects_utils.py +5 -1
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_publish_command.py +6 -1
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_run_commands.py +7 -2
- tabcmd-2.0.17/tests/commands/test_server.py +113 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/e2e/online_tests.py +96 -52
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_create_site_users.py +20 -0
- tabcmd-2.0.14/dodo.py +0 -200
- tabcmd-2.0.14/res/metadata.yml +0 -7
- tabcmd-2.0.14/tabcmd/__main__.py +0 -11
- tabcmd-2.0.14/tabcmd/locales/de/LC_MESSAGES/de.po +0 -68
- tabcmd-2.0.14/tabcmd/locales/de/LC_MESSAGES/shared_wg_de.po +0 -1789
- tabcmd-2.0.14/tabcmd/locales/de/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.14/tabcmd/locales/de/LC_MESSAGES/tabcmd.po +0 -3275
- tabcmd-2.0.14/tabcmd/locales/de/LC_MESSAGES/tabcmd_messages_de.po +0 -1416
- tabcmd-2.0.14/tabcmd/locales/en/LC_MESSAGES/en-US.po +0 -83
- tabcmd-2.0.14/tabcmd/locales/en/LC_MESSAGES/shared_wg_en.po +0 -1789
- tabcmd-2.0.14/tabcmd/locales/en/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.14/tabcmd/locales/en/LC_MESSAGES/tabcmd.po +0 -3278
- tabcmd-2.0.14/tabcmd/locales/en/LC_MESSAGES/tabcmd_messages_en.po +0 -1416
- tabcmd-2.0.14/tabcmd/locales/es/LC_MESSAGES/es.po +0 -68
- tabcmd-2.0.14/tabcmd/locales/es/LC_MESSAGES/shared_wg_es.po +0 -1789
- tabcmd-2.0.14/tabcmd/locales/es/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.14/tabcmd/locales/es/LC_MESSAGES/tabcmd.po +0 -3276
- tabcmd-2.0.14/tabcmd/locales/es/LC_MESSAGES/tabcmd_messages_es.po +0 -1416
- tabcmd-2.0.14/tabcmd/locales/fr/LC_MESSAGES/fr.po +0 -68
- tabcmd-2.0.14/tabcmd/locales/fr/LC_MESSAGES/shared_wg_fr.po +0 -1789
- tabcmd-2.0.14/tabcmd/locales/fr/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.14/tabcmd/locales/fr/LC_MESSAGES/tabcmd.po +0 -3275
- tabcmd-2.0.14/tabcmd/locales/fr/LC_MESSAGES/tabcmd_messages_fr.po +0 -1416
- tabcmd-2.0.14/tabcmd/locales/fr/shared_wg_fr.properties +0 -481
- tabcmd-2.0.14/tabcmd/locales/fr/tabcmd_messages_fr.properties +0 -402
- tabcmd-2.0.14/tabcmd/locales/ga/LC_MESSAGES/ga.po +0 -68
- tabcmd-2.0.14/tabcmd/locales/ga/LC_MESSAGES/shared_wg_ga.po +0 -1792
- tabcmd-2.0.14/tabcmd/locales/ga/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.14/tabcmd/locales/ga/LC_MESSAGES/tabcmd.po +0 -3278
- tabcmd-2.0.14/tabcmd/locales/ga/LC_MESSAGES/tabcmd_messages_ga.po +0 -1416
- tabcmd-2.0.14/tabcmd/locales/ga/shared_wg_ga.properties +0 -481
- tabcmd-2.0.14/tabcmd/locales/ga/tabcmd_messages_ga.properties +0 -402
- tabcmd-2.0.14/tabcmd/locales/it/LC_MESSAGES/it.po +0 -68
- tabcmd-2.0.14/tabcmd/locales/it/LC_MESSAGES/shared_wg_it.po +0 -1789
- tabcmd-2.0.14/tabcmd/locales/it/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.14/tabcmd/locales/it/LC_MESSAGES/tabcmd.po +0 -3275
- tabcmd-2.0.14/tabcmd/locales/it/LC_MESSAGES/tabcmd_messages_it.po +0 -1416
- tabcmd-2.0.14/tabcmd/locales/ja/LC_MESSAGES/ja.po +0 -68
- tabcmd-2.0.14/tabcmd/locales/ja/LC_MESSAGES/shared_wg_ja.po +0 -1789
- tabcmd-2.0.14/tabcmd/locales/ja/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.14/tabcmd/locales/ja/LC_MESSAGES/tabcmd.po +0 -3275
- tabcmd-2.0.14/tabcmd/locales/ja/LC_MESSAGES/tabcmd_messages_ja.po +0 -1416
- tabcmd-2.0.14/tabcmd/locales/ko/LC_MESSAGES/ko.po +0 -70
- tabcmd-2.0.14/tabcmd/locales/ko/LC_MESSAGES/shared_wg_ko.po +0 -1789
- tabcmd-2.0.14/tabcmd/locales/ko/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.14/tabcmd/locales/ko/LC_MESSAGES/tabcmd.po +0 -3277
- tabcmd-2.0.14/tabcmd/locales/ko/LC_MESSAGES/tabcmd_messages_ko.po +0 -1416
- tabcmd-2.0.14/tabcmd/locales/pt/LC_MESSAGES/pt.po +0 -68
- tabcmd-2.0.14/tabcmd/locales/pt/LC_MESSAGES/shared_wg_pt.po +0 -1789
- tabcmd-2.0.14/tabcmd/locales/pt/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.14/tabcmd/locales/pt/LC_MESSAGES/tabcmd.po +0 -3275
- tabcmd-2.0.14/tabcmd/locales/pt/LC_MESSAGES/tabcmd_messages_pt.po +0 -1416
- tabcmd-2.0.14/tabcmd/locales/sv/LC_MESSAGES/shared_wg_sv.po +0 -1789
- tabcmd-2.0.14/tabcmd/locales/sv/LC_MESSAGES/sv.po +0 -68
- tabcmd-2.0.14/tabcmd/locales/sv/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.14/tabcmd/locales/sv/LC_MESSAGES/tabcmd.po +0 -3275
- tabcmd-2.0.14/tabcmd/locales/sv/LC_MESSAGES/tabcmd_messages_sv.po +0 -1416
- tabcmd-2.0.14/tabcmd/locales/zh/LC_MESSAGES/shared_wg_zh.po +0 -1789
- tabcmd-2.0.14/tabcmd/locales/zh/LC_MESSAGES/tabcmd.mo +0 -0
- tabcmd-2.0.14/tabcmd/locales/zh/LC_MESSAGES/tabcmd.po +0 -3275
- tabcmd-2.0.14/tabcmd/locales/zh/LC_MESSAGES/tabcmd_messages_zh.po +0 -1416
- tabcmd-2.0.14/tabcmd/locales/zh/LC_MESSAGES/zh.po +0 -68
- tabcmd-2.0.14/tabcmd-linux.spec +0 -49
- tabcmd-2.0.14/tabcmd-mac.spec +0 -51
- tabcmd-2.0.14/tabcmd-windows.spec +0 -54
- tabcmd-2.0.14/tests/commands/test_geturl_utils.py +0 -216
- {tabcmd-2.0.14 → tabcmd-2.0.17}/.coverage +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/.coveragerc +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/.github/dependabot.yml +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/.github/workflows/check-coverage.yml +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/.github/workflows/codeql-analysis.yml +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/.github/workflows/python-app.yml +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/LICENSE +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/README.md +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/SECURITY.md +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/bin/coverage.sh +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/bin/i18n/makelocalealias.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/bin/i18n/pygettext.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/bin/license-checker.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/bin/pyinstaller.sh +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/res/README.md +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/res/tabcmd.icns +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/res/tabcmd.ico +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/res/tabcmd.png +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/setup.cfg +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/setup.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/__init__.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/__init__.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/auth/__init__.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/auth/login_command.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/auth/logout_command.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/auth/session.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/commands.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/datasources_and_workbooks/__init__.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/datasources_and_workbooks/delete_command.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/extracts/__init__.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/extracts/decrypt_extracts_command.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/extracts/delete_extracts_command.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/extracts/encrypt_extracts_command.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/extracts/extracts.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/extracts/reencrypt_extracts_command.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/group/__init__.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/project/__init__.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/project/delete_project_command.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/site/__init__.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/site/create_site_command.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/site/delete_site_command.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/site/edit_site_command.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/site/list_command.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/user/__init__.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/execution/__init__.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/execution/_version.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/execution/logger_config.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/execution/map_of_commands.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/de/LC_MESSAGES/.gitkeep +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/es/LC_MESSAGES/.gitkeep +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/fr/LC_MESSAGES/.gitkeep +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/ga/LC_MESSAGES/.gitkeep +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/it/LC_MESSAGES/.gitkeep +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/ja/LC_MESSAGES/.gitkeep +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/ko/LC_MESSAGES/.gitkeep +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/pt/LC_MESSAGES/.gitkeep +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/sv/LC_MESSAGES/.gitkeep +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/zh/LC_MESSAGES/.gitkeep +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/tabcmd.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/version.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd.egg-info/dependency_links.txt +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd.egg-info/entry_points.txt +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd.egg-info/top_level.txt +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd.spec +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/__init__.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/assets/EmbeddedCredentials.twb +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/assets/SampleDS.tds +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/assets/WorkbookWithExtract.twbx +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/assets/WorkbookWithoutExtract.twbx +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/assets/World Indicators.tds +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/assets/World Indicators.tdsx +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/assets/detailed_users.csv +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/assets/simple-data.twbx +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/assets/usernames.csv +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/__init__.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_credential_file.txt +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_execution.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_listing_commands.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_server_handler.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_session.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_user_utils.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/e2e/__init__.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/e2e/language_tests.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/e2e/setup_e2e.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/e2e/tests.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/e2e/tests_integration.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/__init__.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/common_setup.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_login_parser.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_logout_parser.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_add_user.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_create_extracts.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_create_group.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_create_project.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_create_site.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_create_user.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_decrypt_extracts.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_delete.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_delete_extracts.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_delete_group.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_delete_project.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_delete_site.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_delete_site_user.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_edit_site.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_encrypt_extracts.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_export.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_get_url.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_list_sites.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_login.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_publish.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_publish_samples.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_reencrypt_extracts.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_refresh_extracts.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_remove_user.py +0 -0
- {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_runschedule.py +0 -0
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: Package-and-Upload
|
|
2
2
|
|
|
3
3
|
# Pyinstaller requires that executables for each OS are built on that OS
|
|
4
|
-
# This action is intended to build on each of the supported OS's: mac, windows, linux.
|
|
5
|
-
# and then upload all
|
|
4
|
+
# This action is intended to build on each of the supported OS's: mac (x86 and arm), windows, linux.
|
|
5
|
+
# and then upload all four files to a new release
|
|
6
6
|
|
|
7
7
|
# reference material:
|
|
8
8
|
# https://data-dive.com/multi-os-deployment-in-cloud-using-pyinstaller-and-github-actions
|
|
9
9
|
# https://anshumanfauzdar.medium.com/using-github-actions-to-bundle-python-application-into-a-single-package-and-automatic-release-834bd42e0670
|
|
10
10
|
|
|
11
11
|
on:
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
push:
|
|
13
|
+
tags:
|
|
14
|
+
- '*'
|
|
14
15
|
workflow_dispatch:
|
|
15
16
|
|
|
16
17
|
jobs:
|
|
@@ -26,21 +27,25 @@ jobs:
|
|
|
26
27
|
TARGET: windows
|
|
27
28
|
CMD_BUILD: >
|
|
28
29
|
pyinstaller tabcmd-windows.spec --clean --noconfirm --distpath ./dist/windows
|
|
30
|
+
UPLOAD_FILE_NAME: tabcmd.exe
|
|
29
31
|
OUT_FILE_NAME: tabcmd.exe
|
|
30
32
|
ASSET_MIME: application/vnd.microsoft.portable-executable
|
|
31
33
|
- os: macos-13
|
|
32
34
|
TARGET: macos
|
|
33
35
|
CMD_BUILD: >
|
|
34
36
|
pyinstaller tabcmd-mac.spec --clean --noconfirm --distpath ./dist/macos/
|
|
35
|
-
|
|
37
|
+
# the extension .app is not allowed as an upload by github
|
|
38
|
+
UPLOAD_FILE_NAME: tabcmd-x86.app.tar
|
|
39
|
+
# these two names must match the output defined in tabcmd-mac.spec
|
|
36
40
|
OUT_FILE_NAME: tabcmd.app
|
|
37
41
|
APP_BINARY_FILE_NAME: tabcmd
|
|
38
42
|
ASSET_MIME: application/zip
|
|
39
43
|
- os: macos-latest
|
|
44
|
+
# This must match the value set in tabcmd-mac.spec for the output folder
|
|
40
45
|
TARGET: macos
|
|
41
46
|
CMD_BUILD: >
|
|
42
47
|
pyinstaller tabcmd-mac.spec --clean --noconfirm --distpath ./dist/macos/
|
|
43
|
-
|
|
48
|
+
UPLOAD_FILE_NAME: tabcmd_arm64.app.tar
|
|
44
49
|
OUT_FILE_NAME: tabcmd.app
|
|
45
50
|
APP_BINARY_FILE_NAME: tabcmd
|
|
46
51
|
ASSET_MIME: application/zip
|
|
@@ -52,13 +57,14 @@ jobs:
|
|
|
52
57
|
pyinstaller --clean -y --distpath ./dist/ubuntu tabcmd-linux.spec &&
|
|
53
58
|
chown -R --reference=. ./dist/ubuntu
|
|
54
59
|
OUT_FILE_NAME: tabcmd
|
|
60
|
+
UPLOAD_FILE_NAME: tabcmd
|
|
55
61
|
|
|
56
62
|
steps:
|
|
57
63
|
- uses: actions/checkout@v4
|
|
58
64
|
|
|
59
65
|
- uses: actions/setup-python@v5
|
|
60
66
|
with:
|
|
61
|
-
python-version: 3.
|
|
67
|
+
python-version: 3.9
|
|
62
68
|
|
|
63
69
|
- name: Install dependencies and build
|
|
64
70
|
run: |
|
|
@@ -86,18 +92,16 @@ jobs:
|
|
|
86
92
|
run: |
|
|
87
93
|
rm -f dist/${{ matrix.TARGET }}/${{ matrix.APP_BINARY_FILE_NAME }}
|
|
88
94
|
cd dist/${{ matrix.TARGET }}
|
|
89
|
-
tar -cvf ${{ matrix.
|
|
95
|
+
tar -cvf ${{ matrix.UPLOAD_FILE_NAME }} ${{ matrix.OUT_FILE_NAME }}
|
|
90
96
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
uses:
|
|
97
|
+
|
|
98
|
+
- name: Upload binaries to release for ${{ matrix.TARGET }}
|
|
99
|
+
uses: svenstaro/upload-release-action@v2
|
|
94
100
|
with:
|
|
95
|
-
|
|
96
|
-
|
|
101
|
+
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
102
|
+
asset_name: ${{ matrix.UPLOAD_FILE_NAME }}
|
|
103
|
+
file: ./dist/${{ matrix.TARGET }}/${{ matrix.UPLOAD_FILE_NAME }}
|
|
104
|
+
tag: ${{ github.ref_name }}
|
|
105
|
+
overwrite: true
|
|
106
|
+
promote: true
|
|
97
107
|
|
|
98
|
-
- name: Upload artifact for Mac
|
|
99
|
-
if: matrix.TARGET == 'macos'
|
|
100
|
-
uses: actions/upload-artifact@v4
|
|
101
|
-
with:
|
|
102
|
-
name: ${{ matrix.BUNDLE_NAME }}
|
|
103
|
-
path: ./dist/${{ matrix.TARGET }}/${{ matrix.BUNDLE_NAME }}.tar
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: tabcmd
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.17
|
|
4
4
|
Summary: A command line client for working with Tableau Server.
|
|
5
5
|
Author-email: Tableau <github@tableau.com>
|
|
6
6
|
License: The MIT License (MIT)
|
|
@@ -47,7 +47,7 @@ Requires-Dist: types-appdirs
|
|
|
47
47
|
Requires-Dist: types-mock
|
|
48
48
|
Requires-Dist: types-requests
|
|
49
49
|
Requires-Dist: types-setuptools
|
|
50
|
-
Requires-Dist: tableauserverclient==0.
|
|
50
|
+
Requires-Dist: tableauserverclient==0.35
|
|
51
51
|
Requires-Dist: urllib3
|
|
52
52
|
Provides-Extra: test
|
|
53
53
|
Requires-Dist: black<23,>=22; extra == "test"
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#! /usr/bin/env python3
|
|
2
2
|
# Written by Martin v. Löwis <loewis@informatik.hu-berlin.de>
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
"""
|
|
4
|
+
Fetched from https://github.com/python/cpython/blob/main/Tools/i18n/msgfmt.py
|
|
5
|
+
Updated to handle utf-8 files and give better error messages
|
|
5
6
|
TODO contribute back?
|
|
6
7
|
"""
|
|
7
8
|
|
|
@@ -107,7 +108,7 @@ def make(filename, outfile):
|
|
|
107
108
|
CTXT = 3
|
|
108
109
|
|
|
109
110
|
encoding = 'utf-8'
|
|
110
|
-
print("Assumed encoding", encoding)
|
|
111
|
+
print("msgfmt::Assumed encoding", encoding)
|
|
111
112
|
|
|
112
113
|
# Compute .mo name from .po name and arguments
|
|
113
114
|
if filename.endswith('.po'):
|
|
@@ -195,7 +196,7 @@ def make(filename, outfile):
|
|
|
195
196
|
try:
|
|
196
197
|
l = ast.literal_eval(l)
|
|
197
198
|
except:
|
|
198
|
-
print("
|
|
199
|
+
print("\tERROR (skipped)", lno, msgid)
|
|
199
200
|
pass
|
|
200
201
|
if section == CTXT:
|
|
201
202
|
msgctxt += l.encode(encoding)
|
|
@@ -5,7 +5,7 @@ TO DO: contribute changes back and go back to installing from pypi
|
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
import click
|
|
8
|
-
|
|
8
|
+
from datetime import datetime
|
|
9
9
|
|
|
10
10
|
@click.command()
|
|
11
11
|
@click.argument('source', type=click.File('rt', encoding='utf-8'))
|
|
@@ -13,36 +13,43 @@ import click
|
|
|
13
13
|
@click.option('-l', '--language', type=click.STRING, help='The translation language')
|
|
14
14
|
@click.option('-p', '--project', type=click.STRING, help='The name of the project')
|
|
15
15
|
@click.option('-e', '--encoding', type=click.STRING, help='The encoding wanted')
|
|
16
|
-
|
|
16
|
+
@click.option('-c', '--copyright', type=click.STRING, help='The person/organization holding copyright')
|
|
17
|
+
def to_po(source, destination, encoding, language, project, copyright):
|
|
17
18
|
"""Converts a property file to a Gettext PO file.
|
|
18
19
|
|
|
19
20
|
SOURCE is the path of the property file to convert.
|
|
20
21
|
|
|
21
22
|
DESTINATION is the path of the Gettext PO file to create
|
|
22
23
|
"""
|
|
23
|
-
|
|
24
|
+
year = datetime.now().strftime('%Y')
|
|
24
25
|
header = """msgid ""
|
|
25
26
|
msgstr ""
|
|
26
|
-
"MIME-Version: 1.0\\n"
|
|
27
|
-
"Content-Type: text/plain; charset={encoding}\\n"
|
|
27
|
+
"MIME-Version: 1.0\\n\\n"
|
|
28
|
+
"Content-Type: text/plain; charset={encoding}\\n\\n"
|
|
28
29
|
"Content-Transfer-Encoding: 8bit\\n"
|
|
29
30
|
"X-Generator: prop2po\\n"
|
|
30
31
|
"Project-Id-Version: {project}\\n"
|
|
31
32
|
"Language: {language}\\n"
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
# Copyright (C) {year} {copyright}
|
|
34
|
+
"""
|
|
35
|
+
|
|
34
36
|
lines = source.readlines()
|
|
35
|
-
print(lines)
|
|
36
37
|
destination.write(header.format(
|
|
37
38
|
language=language,
|
|
38
39
|
project=project,
|
|
39
|
-
encoding=encoding
|
|
40
|
+
encoding=encoding,
|
|
41
|
+
year=year,
|
|
42
|
+
copyright=copyright
|
|
40
43
|
))
|
|
41
44
|
for line in lines:
|
|
42
45
|
if not line.isspace():
|
|
43
|
-
|
|
46
|
+
# Split only on the first instance of '=' so that the character can also appear in the string
|
|
47
|
+
parts = line.split('=', 1)
|
|
44
48
|
# TODO it fails on comments/lines with less than two parts after splitting
|
|
45
|
-
|
|
49
|
+
try:
|
|
50
|
+
destination.write('#:\n' + 'msgid "' + parts[0] + '"\n' 'msgstr "' + parts[1][:-1] + '"\n\n')
|
|
51
|
+
except IndexError as e:
|
|
52
|
+
print("FAILED on line{}".format(line))
|
|
46
53
|
|
|
47
54
|
|
|
48
55
|
if __name__ == '__main__':
|
|
@@ -113,12 +113,15 @@ _(note that running mypy and black with no errors is required before code will b
|
|
|
113
113
|
> You can only build an executable for the platform you are running pyinstaller on. The spec for each platform is stored in tabcmd-*platform*.spec and the exact build commands for each platform can be checked in [our packaging script](.github/workflows//package.yml).
|
|
114
114
|
|
|
115
115
|
e.g for Windows
|
|
116
|
-
> pyinstaller tabcmd-windows.spec --clean --
|
|
116
|
+
> pyinstaller tabcmd-windows.spec --clean --distpath .\dist\windows
|
|
117
117
|
|
|
118
|
-
produces dist
|
|
118
|
+
produces dist\windows\tabcmd.exe
|
|
119
119
|
To run the newly created executable, from a console window in the same directory as the file tabcmd.py:
|
|
120
120
|
|
|
121
|
-
> dist
|
|
121
|
+
> dist\windows\tabcmd.exe --help
|
|
122
|
+
> dist\windows\tabcmd.exe publish --country FR --language FR cookie.twbx
|
|
123
|
+
|
|
124
|
+
To investigate what's packaged in the executable, use https://pyinstxtractor-web.netlify.app/
|
|
122
125
|
|
|
123
126
|
|
|
124
127
|
|
|
@@ -128,7 +131,9 @@ Strings are stored in /tabcmd/locales/[language]/*.properties by id and referred
|
|
|
128
131
|
> string = _("string.id")
|
|
129
132
|
|
|
130
133
|
For runtime execution these files must be converted from .properties -> .po -> .mo files. These .mo files will be bundled in the the package by pyinstaller. The entire conversion action is done by a .doit script:
|
|
131
|
-
> doit mo
|
|
134
|
+
> doit properties po mo
|
|
135
|
+
You can also check that there are no malformed/forgotten message keys in the code with
|
|
136
|
+
> doit strings
|
|
132
137
|
|
|
133
138
|
### Versioning
|
|
134
139
|
|
|
@@ -149,7 +154,11 @@ The version reflected in the executable (tabcmd -v) is stored in a metadata file
|
|
|
149
154
|
- run pyinstaller to create executables
|
|
150
155
|
- save the executable as an artifact on that job.
|
|
151
156
|
|
|
152
|
-
1. Find the artifacts created by this job and manually copy them to the new release.
|
|
157
|
+
1. Find the artifacts created by this job and manually copy them to the new release.
|
|
158
|
+
- manually download. They will all be returned as zips
|
|
159
|
+
- unzip the windows.exe and mac.app.tar files and upload those
|
|
160
|
+
- do not unzip the linux app, github doesn't like it. upload as tabcmd.zip
|
|
161
|
+
(Pay attention to what the file type is, github also sends it as a zip if you download with curl etc. TODO: automate workflow with a github action)
|
|
153
162
|
|
|
154
163
|
1. To trigger publishing to pypi run the manual workflow on main with 'pypi'. (TODO: automate trigger)
|
|
155
164
|
|
tabcmd-2.0.17/dodo.py
ADDED
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import glob
|
|
2
|
+
import os
|
|
3
|
+
import subprocess
|
|
4
|
+
import setuptools_scm
|
|
5
|
+
|
|
6
|
+
LOCALES = ["en", "de", "es", "fr", "ga", "it", "pt", "sv", "ja", "ko", "zh"]
|
|
7
|
+
|
|
8
|
+
"""
|
|
9
|
+
https://pydoit.org/
|
|
10
|
+
Usage:
|
|
11
|
+
pip install -e .[prep_work]
|
|
12
|
+
doit list # see available tasks
|
|
13
|
+
|
|
14
|
+
FYI: to read mo and po files use https://poedit.net/download
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def task_properties():
|
|
19
|
+
|
|
20
|
+
"""
|
|
21
|
+
For all languages: a) Combines all existing properties files for a language into a single file called 'combined.properties'
|
|
22
|
+
and b) sorts that into an alphabetical list of unique properties in combined.properties.sorted
|
|
23
|
+
I've also included tasks that find all strings in code so we can skip bundling messages that aren't ever used
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""Searches product code for all localization string keys"""
|
|
27
|
+
|
|
28
|
+
def process_code():
|
|
29
|
+
print("\n***** Collect all string keys used in code")
|
|
30
|
+
|
|
31
|
+
CODE_PATH = "tabcmd/**/*.py"
|
|
32
|
+
STRINGS_FILE = "tabcmd/locales/codestrings.properties"
|
|
33
|
+
STRING_FLAG = '_("'
|
|
34
|
+
STRING_END = '")'
|
|
35
|
+
|
|
36
|
+
lines = set([])
|
|
37
|
+
with open(STRINGS_FILE, "w+", encoding="utf-8") as stringfile:
|
|
38
|
+
for codefile in glob.glob(CODE_PATH, recursive=True):
|
|
39
|
+
print("\t" + codefile)
|
|
40
|
+
with open(codefile, encoding="utf-8") as infile:
|
|
41
|
+
# find lines that contain a loc string in the form _("string goes here")
|
|
42
|
+
for line in infile:
|
|
43
|
+
i = line.find(STRING_FLAG)
|
|
44
|
+
# include only the string itself and the quote symbols around it
|
|
45
|
+
if i >= 0:
|
|
46
|
+
# print(line)
|
|
47
|
+
j = line.find(STRING_END)
|
|
48
|
+
lines.add(line[i + 3 : j] + "\n")
|
|
49
|
+
|
|
50
|
+
sorted_lines = sorted(lines)
|
|
51
|
+
stringfile.writelines(sorted_lines)
|
|
52
|
+
|
|
53
|
+
print("{} strings collected from code and saved to {}".format(len(lines), STRINGS_FILE))
|
|
54
|
+
|
|
55
|
+
def merge():
|
|
56
|
+
print("\n***** Combine our multiple input properties files into one .properties file per locale")
|
|
57
|
+
for current_locale in LOCALES:
|
|
58
|
+
|
|
59
|
+
LOCALE_PATH = os.path.join("tabcmd", "locales", current_locale)
|
|
60
|
+
INPUT_FILES = os.path.join(LOCALE_PATH, "*.properties")
|
|
61
|
+
OUTPUT_FILE = os.path.join(LOCALE_PATH, "LC_MESSAGES", "combined.properties")
|
|
62
|
+
|
|
63
|
+
with open(OUTPUT_FILE, "w+", encoding="utf-8") as outfile:
|
|
64
|
+
for file in glob.glob(INPUT_FILES):
|
|
65
|
+
with open(file, encoding="utf-8") as infile:
|
|
66
|
+
input = infile.read()
|
|
67
|
+
# remove curly quotes that are not expected in command line text/may not work for some users
|
|
68
|
+
# U201C, U201D and U201E - opening quotes, German opening quotes, and closing quotes
|
|
69
|
+
import re
|
|
70
|
+
|
|
71
|
+
changed_input = re.sub("[\u201c\u201d\u201e]", "'", input)
|
|
72
|
+
# some strings for some reason use two single quotes as a double quote. Reduce to one single quote.
|
|
73
|
+
re_changed_input = re.sub("''", "'", changed_input)
|
|
74
|
+
outfile.write(re_changed_input)
|
|
75
|
+
outfile.write("\n")
|
|
76
|
+
print("Combined strings for {} to {}".format(current_locale, OUTPUT_FILE))
|
|
77
|
+
uniquify_file(OUTPUT_FILE)
|
|
78
|
+
|
|
79
|
+
"""
|
|
80
|
+
Delete strings that aren't used in the code, to keep size down and not waste time fixing unused strings
|
|
81
|
+
Input: combined.properties.sorted
|
|
82
|
+
Output: filtered.properties
|
|
83
|
+
"""
|
|
84
|
+
|
|
85
|
+
def filter():
|
|
86
|
+
print("\n***** Remove strings in properties that are never used in code")
|
|
87
|
+
REF_FILE = os.path.join("tabcmd", "locales", "codestrings.properties")
|
|
88
|
+
for current_locale in LOCALES:
|
|
89
|
+
LOCALE_PATH = os.path.join("tabcmd", "locales", current_locale)
|
|
90
|
+
IN_FILE = os.path.join(LOCALE_PATH, "LC_MESSAGES", "combined.properties")
|
|
91
|
+
OUT_FILE = os.path.join(LOCALE_PATH, "LC_MESSAGES", "filtered.properties")
|
|
92
|
+
|
|
93
|
+
with open(REF_FILE, "r+", encoding="utf-8") as ref:
|
|
94
|
+
required = ref.read()
|
|
95
|
+
|
|
96
|
+
with open(IN_FILE, "r+", encoding="utf-8") as infile, open(OUT_FILE, "w+", encoding="utf-8") as outfile:
|
|
97
|
+
for line in infile.readlines():
|
|
98
|
+
key = line.split("=")[0]
|
|
99
|
+
if key in required:
|
|
100
|
+
outfile.writelines(line)
|
|
101
|
+
else:
|
|
102
|
+
print("\tExcluding {}".format(key))
|
|
103
|
+
|
|
104
|
+
print("Filtered strings for {}".format(current_locale))
|
|
105
|
+
|
|
106
|
+
"""Remove """
|
|
107
|
+
|
|
108
|
+
"""Search loc files for each string used in code - print an error if not found.
|
|
109
|
+
Input: codestrings.properties file created by task_collect_strings
|
|
110
|
+
Output: console listing missing keys
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
def enforce_strings_present():
|
|
114
|
+
|
|
115
|
+
print("\n***** Verify that all string keys used in code are present in string properties")
|
|
116
|
+
STRINGS_FILE = "tabcmd/locales/codestrings.properties"
|
|
117
|
+
uniquify_file(STRINGS_FILE)
|
|
118
|
+
with open(STRINGS_FILE, "r+", encoding="utf-8") as stringfile:
|
|
119
|
+
codestrings = stringfile.readlines()
|
|
120
|
+
for locale in LOCALES:
|
|
121
|
+
LOC_FILE = os.path.join("tabcmd", "locales", locale, "LC_MESSAGES", "filtered.properties")
|
|
122
|
+
print("checking language {}".format(locale))
|
|
123
|
+
with open(LOC_FILE, "r+", encoding="utf-8") as propsfile:
|
|
124
|
+
translated_strings = propsfile.read()
|
|
125
|
+
for message_key in codestrings:
|
|
126
|
+
message_key = message_key.strip("\n")
|
|
127
|
+
message_key = message_key.strip('"')
|
|
128
|
+
if message_key not in translated_strings:
|
|
129
|
+
print("ERROR: product string not in strings files [{}]".format(message_key))
|
|
130
|
+
print("Done")
|
|
131
|
+
|
|
132
|
+
return {
|
|
133
|
+
"actions": [process_code, merge, filter, enforce_strings_present],
|
|
134
|
+
"verbosity": 2,
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
def task_po():
|
|
139
|
+
"""
|
|
140
|
+
For all languages: generate a .po file from each LC_MESSAGES/filtered.properties file (these are utf-8)
|
|
141
|
+
This is idempotent and can be re-run safely
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
"""
|
|
145
|
+
There are two versions of prop2po:
|
|
146
|
+
- 1.0, available through pip install prop2po, from https://github.com/mivek/prop2po
|
|
147
|
+
it doesn't have any way to control which encoding it uses so I'm patching it
|
|
148
|
+
- 3.x, from pip install translate-toolkit:
|
|
149
|
+
it copies key->comment, value-> msgid, ""->msgstr which is not at all what we want
|
|
150
|
+
"""
|
|
151
|
+
|
|
152
|
+
def process_locales():
|
|
153
|
+
print("\n***** Validate all .po files from filtered.properties")
|
|
154
|
+
subprocess.run(["python", "bin/i18n/prop2po.py", "--help"])
|
|
155
|
+
for current_locale in LOCALES:
|
|
156
|
+
|
|
157
|
+
LOC_PATH = os.path.join("tabcmd", "locales", current_locale, "LC_MESSAGES")
|
|
158
|
+
PROPS_FILE = os.path.join(LOC_PATH, "filtered.properties")
|
|
159
|
+
PO_FILE = os.path.join(LOC_PATH, "tabcmd.po")
|
|
160
|
+
LOG_FILE = os.path.join(LOC_PATH, "prop2po.out")
|
|
161
|
+
with open(LOG_FILE, "w+", encoding="utf-8") as logfile:
|
|
162
|
+
try:
|
|
163
|
+
result = subprocess.run(
|
|
164
|
+
[
|
|
165
|
+
"python",
|
|
166
|
+
"bin/i18n/prop2po.py",
|
|
167
|
+
"--encoding",
|
|
168
|
+
"utf-8", # for the .po header
|
|
169
|
+
"--language",
|
|
170
|
+
current_locale, # for the .po header
|
|
171
|
+
"--project",
|
|
172
|
+
"Tabcmd 2",
|
|
173
|
+
"--copyright",
|
|
174
|
+
"©2024 Salesforce, Inc.",
|
|
175
|
+
PROPS_FILE,
|
|
176
|
+
PO_FILE,
|
|
177
|
+
],
|
|
178
|
+
stdout=logfile,
|
|
179
|
+
stderr=logfile,
|
|
180
|
+
)
|
|
181
|
+
print("Written from {} to {}".format(PROPS_FILE, PO_FILE))
|
|
182
|
+
except Exception as e:
|
|
183
|
+
print("run for {} failed with exception".format(current_locale))
|
|
184
|
+
print("see log file {}".format(LOG_FILE))
|
|
185
|
+
exit(1)
|
|
186
|
+
|
|
187
|
+
if not result.returncode == 0:
|
|
188
|
+
print("FAILED")
|
|
189
|
+
print("see log file {}".format(LOG_FILE))
|
|
190
|
+
exit(1)
|
|
191
|
+
print("Done")
|
|
192
|
+
|
|
193
|
+
return {
|
|
194
|
+
"actions": [process_locales],
|
|
195
|
+
"verbosity": 2,
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
def task_clean_all():
|
|
200
|
+
|
|
201
|
+
"""remove all generated files such as .po, .out, and pdf, csv etc that are not in the assets folder"""
|
|
202
|
+
|
|
203
|
+
def clean_output_files():
|
|
204
|
+
print("todo - delete pdf, csv, .twbx, .hyper etc that have been produced in tests")
|
|
205
|
+
|
|
206
|
+
"""For all languages: removes all generated intermediate files (properties, po) from the loc build.
|
|
207
|
+
all we need to keep are the provided translation.properties files from the monolith, at locales/[current_locale]
|
|
208
|
+
and the final tabcmd.mo files in LC_MESSAGES generated by
|
|
209
|
+
>doit properties po mo
|
|
210
|
+
"""
|
|
211
|
+
|
|
212
|
+
def clean_string_files():
|
|
213
|
+
for current_locale in LOCALES:
|
|
214
|
+
FILESETS = [
|
|
215
|
+
os.path.join("tabcmd", "locales", current_locale, "LC_MESSAGES", "*.properties"),
|
|
216
|
+
os.path.join("tabcmd", "locales", current_locale, "LC_MESSAGES", "*.po"),
|
|
217
|
+
os.path.join("tabcmd", "locales", current_locale, "LC_MESSAGES", "*.out"),
|
|
218
|
+
]
|
|
219
|
+
for PATH in FILESETS:
|
|
220
|
+
for file in glob.glob(PATH):
|
|
221
|
+
print("deleting {}".format(os.path.abspath(file)))
|
|
222
|
+
try:
|
|
223
|
+
os.remove(file)
|
|
224
|
+
except OSError:
|
|
225
|
+
pass
|
|
226
|
+
|
|
227
|
+
STRING_FILES = os.path.join("tabcmd", "locales", "codestrings.*")
|
|
228
|
+
for file in glob.glob(STRING_FILES):
|
|
229
|
+
print("deleting {}".format(os.path.abspath(file)))
|
|
230
|
+
try:
|
|
231
|
+
os.remove(file)
|
|
232
|
+
except OSError:
|
|
233
|
+
pass
|
|
234
|
+
|
|
235
|
+
return {
|
|
236
|
+
"actions": [clean_string_files, clean_output_files],
|
|
237
|
+
"verbosity": 2,
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def task_mo():
|
|
242
|
+
"""
|
|
243
|
+
For all languages: Processes the tabcmd.po file to produce a final tabcmd.mo file for each language
|
|
244
|
+
Uses msgfmt.py from gettext, which is copied locally into the repo
|
|
245
|
+
"""
|
|
246
|
+
|
|
247
|
+
def generate_mo():
|
|
248
|
+
print("\n***** Generate all .mo files from tabcmd.po")
|
|
249
|
+
for current_locale in LOCALES:
|
|
250
|
+
|
|
251
|
+
LOC_PATH = "tabcmd/locales/" + current_locale + "/LC_MESSAGES"
|
|
252
|
+
|
|
253
|
+
print("\nBegin writing final {}/tabcmd.mo file".format(current_locale))
|
|
254
|
+
# build the single binary file from the .po file
|
|
255
|
+
# a number of keys are failing at the write-to-mo step. We don't use any of them so that's fine for now.
|
|
256
|
+
result = subprocess.run(["python", "bin/i18n/msgfmt.py", LOC_PATH + "/tabcmd"])
|
|
257
|
+
print(result)
|
|
258
|
+
print("\n")
|
|
259
|
+
|
|
260
|
+
import gettext
|
|
261
|
+
|
|
262
|
+
"""
|
|
263
|
+
This calls gettext directly to imitate what we do when the program actually starts up
|
|
264
|
+
It's the most reliable way to actually verify that the .mo file works
|
|
265
|
+
e.g typical error: charset value is not set in .mo header
|
|
266
|
+
BUT it still doesn't guarantee that the packaging is right, so you still have to
|
|
267
|
+
actually package and then run the app
|
|
268
|
+
"""
|
|
269
|
+
|
|
270
|
+
def check_mo():
|
|
271
|
+
print("\n****** Validate all generated .mo files")
|
|
272
|
+
for current_locale in LOCALES:
|
|
273
|
+
LANG_DIR = os.path.join("tabcmd", "locales")
|
|
274
|
+
LOC_DIR = os.path.join(LANG_DIR, current_locale, "LC_MESSAGES")
|
|
275
|
+
MO_FILE = os.path.join(LOC_DIR, "tabcmd.mo")
|
|
276
|
+
domain = "tabcmd"
|
|
277
|
+
print("Loading {} file to validate".format(MO_FILE))
|
|
278
|
+
try:
|
|
279
|
+
with open(MO_FILE, "rb") as fp:
|
|
280
|
+
print("File open - now calling translate ({})".format(current_locale))
|
|
281
|
+
language: gettext.NullTranslations = gettext.translation(
|
|
282
|
+
domain, LANG_DIR, languages=[current_locale]
|
|
283
|
+
)
|
|
284
|
+
language.install()
|
|
285
|
+
_ = language.gettext
|
|
286
|
+
print("\t" + _("common.output.succeeded"))
|
|
287
|
+
print("\t" + _("session.options.server"))
|
|
288
|
+
except Exception as e:
|
|
289
|
+
print(e)
|
|
290
|
+
|
|
291
|
+
return {
|
|
292
|
+
"actions": [generate_mo, check_mo],
|
|
293
|
+
"verbosity": 2,
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
def task_version():
|
|
298
|
+
|
|
299
|
+
"""Generates a metadata info file with current version to be bundled by pyinstaller"""
|
|
300
|
+
|
|
301
|
+
def write_for_pyinstaller():
|
|
302
|
+
import pyinstaller_versionfile
|
|
303
|
+
import os
|
|
304
|
+
|
|
305
|
+
version = setuptools_scm.get_version(local_scheme="no-local-version")
|
|
306
|
+
numeric_version = version.replace("dev", "")
|
|
307
|
+
print("----\n", numeric_version)
|
|
308
|
+
|
|
309
|
+
output_file = os.path.join(".", "program_metadata.txt")
|
|
310
|
+
input_file = os.path.join("res", "metadata.yml")
|
|
311
|
+
pyinstaller_versionfile.create_versionfile_from_input_file(
|
|
312
|
+
output_file,
|
|
313
|
+
input_file,
|
|
314
|
+
# optional, can be set to overwrite version information (equivalent to --version when using the CLI)
|
|
315
|
+
version=numeric_version,
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
return {
|
|
319
|
+
"actions": [write_for_pyinstaller],
|
|
320
|
+
"verbosity": 2,
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
# local method, not exposed as a task
|
|
325
|
+
def uniquify_file(filename):
|
|
326
|
+
uniques = set([])
|
|
327
|
+
|
|
328
|
+
with open(filename, "r", encoding="utf-8") as my_file:
|
|
329
|
+
my_file.seek(0)
|
|
330
|
+
lines = my_file.readlines()
|
|
331
|
+
for line in lines:
|
|
332
|
+
line = line.strip()
|
|
333
|
+
# lines cannot extend over two lines.
|
|
334
|
+
line = line.replace("\\n", " ")
|
|
335
|
+
if line == "":
|
|
336
|
+
continue
|
|
337
|
+
elif "=" not in line and "codestrings" not in filename:
|
|
338
|
+
print("\tprop2po will not like this line. Discarding [{}]".format(line))
|
|
339
|
+
continue
|
|
340
|
+
else:
|
|
341
|
+
uniques.add(line + "\n")
|
|
342
|
+
|
|
343
|
+
with open(filename, "w", encoding="utf-8") as my_file:
|
|
344
|
+
my_file.truncate()
|
|
345
|
+
for line in uniques:
|
|
346
|
+
my_file.write(line)
|
|
347
|
+
|
|
348
|
+
print("Saved {} sorted unique lines to {}".format(len(uniques), filename))
|