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.
Files changed (280) hide show
  1. {tabcmd-2.0.14 → tabcmd-2.0.17}/.github/workflows/generate-metadata.yml +1 -1
  2. {tabcmd-2.0.14 → tabcmd-2.0.17}/.github/workflows/package.yml +24 -20
  3. {tabcmd-2.0.14 → tabcmd-2.0.17}/.github/workflows/publish-pypi.yml +1 -1
  4. {tabcmd-2.0.14 → tabcmd-2.0.17}/.github/workflows/run-e2-tests.yml +1 -1
  5. {tabcmd-2.0.14 → tabcmd-2.0.17}/.github/workflows/run-tests.yml +1 -1
  6. {tabcmd-2.0.14 → tabcmd-2.0.17}/.gitignore +4 -0
  7. {tabcmd-2.0.14/tabcmd.egg-info → tabcmd-2.0.17}/PKG-INFO +3 -3
  8. {tabcmd-2.0.14 → tabcmd-2.0.17}/bin/i18n/msgfmt.py +5 -4
  9. {tabcmd-2.0.14 → tabcmd-2.0.17}/bin/i18n/prop2po.py +18 -11
  10. {tabcmd-2.0.14 → tabcmd-2.0.17}/contributing.md +14 -5
  11. tabcmd-2.0.17/dodo.py +348 -0
  12. {tabcmd-2.0.14 → tabcmd-2.0.17}/pyproject.toml +1 -1
  13. tabcmd-2.0.17/res/metadata.yml +7 -0
  14. tabcmd-2.0.17/tabcmd/__main__.py +17 -0
  15. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/constants.py +6 -1
  16. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/datasources_and_workbooks/datasources_and_workbooks_command.py +43 -14
  17. tabcmd-2.0.17/tabcmd/commands/datasources_and_workbooks/datasources_workbooks_views_url_parser.py +198 -0
  18. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/datasources_and_workbooks/export_command.py +33 -41
  19. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/datasources_and_workbooks/get_url_command.py +39 -110
  20. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/datasources_and_workbooks/publish_command.py +16 -7
  21. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/datasources_and_workbooks/runschedule_command.py +1 -1
  22. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/extracts/create_extracts_command.py +1 -1
  23. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/extracts/refresh_extracts_command.py +2 -5
  24. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/group/create_group_command.py +1 -1
  25. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/group/delete_group_command.py +1 -1
  26. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/project/create_project_command.py +2 -2
  27. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/project/publish_samples_command.py +4 -2
  28. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/server.py +49 -26
  29. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/site/list_sites_command.py +2 -3
  30. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/user/add_users_command.py +1 -1
  31. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/user/create_site_users.py +2 -2
  32. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/user/create_users_command.py +3 -3
  33. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/user/delete_site_users_command.py +1 -1
  34. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/user/remove_users_command.py +1 -1
  35. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/user/user_data.py +16 -10
  36. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/execution/global_options.py +9 -6
  37. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/execution/localize.py +10 -9
  38. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/execution/parent_parser.py +10 -1
  39. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/execution/tabcmd_controller.py +13 -9
  40. tabcmd-2.0.17/tabcmd/locales/de/LC_MESSAGES/tabcmd.mo +0 -0
  41. tabcmd-2.0.17/tabcmd/locales/de/extra.properties +23 -0
  42. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/de/shared_wg_de.properties +219 -171
  43. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/de/tabcmd_messages_de.properties +169 -133
  44. tabcmd-2.0.17/tabcmd/locales/en/LC_MESSAGES/tabcmd.mo +0 -0
  45. tabcmd-2.0.17/tabcmd/locales/en/extra.properties +22 -0
  46. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/en/shared_wg_en.properties +91 -35
  47. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/en/tabcmd_messages_en.properties +39 -5
  48. tabcmd-2.0.17/tabcmd/locales/es/LC_MESSAGES/tabcmd.mo +0 -0
  49. tabcmd-2.0.17/tabcmd/locales/es/extra.properties +23 -0
  50. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/es/shared_wg_es.properties +186 -138
  51. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/es/tabcmd_messages_es.properties +143 -107
  52. tabcmd-2.0.17/tabcmd/locales/fr/LC_MESSAGES/tabcmd.mo +0 -0
  53. tabcmd-2.0.17/tabcmd/locales/fr/extra.properties +22 -0
  54. tabcmd-2.0.17/tabcmd/locales/fr/shared_wg_fr.properties +529 -0
  55. tabcmd-2.0.17/tabcmd/locales/fr/tabcmd_messages_fr.properties +438 -0
  56. tabcmd-2.0.17/tabcmd/locales/ga/LC_MESSAGES/tabcmd.mo +0 -0
  57. tabcmd-2.0.17/tabcmd/locales/ga/extra.properties +23 -0
  58. tabcmd-2.0.17/tabcmd/locales/ga/shared_wg_ga.properties +529 -0
  59. tabcmd-2.0.17/tabcmd/locales/ga/tabcmd_messages_ga.properties +438 -0
  60. tabcmd-2.0.17/tabcmd/locales/it/LC_MESSAGES/tabcmd.mo +0 -0
  61. tabcmd-2.0.17/tabcmd/locales/it/extra.properties +22 -0
  62. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/it/shared_wg_it.properties +248 -200
  63. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/it/tabcmd_messages_it.properties +211 -175
  64. tabcmd-2.0.17/tabcmd/locales/ja/LC_MESSAGES/tabcmd.mo +0 -0
  65. tabcmd-2.0.17/tabcmd/locales/ja/extra.properties +22 -0
  66. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/ja/shared_wg_ja.properties +205 -157
  67. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/ja/tabcmd_messages_ja.properties +152 -116
  68. tabcmd-2.0.17/tabcmd/locales/ko/LC_MESSAGES/tabcmd.mo +0 -0
  69. tabcmd-2.0.17/tabcmd/locales/ko/extra.properties +23 -0
  70. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/ko/shared_wg_ko.properties +181 -133
  71. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/ko/tabcmd_messages_ko.properties +135 -99
  72. tabcmd-2.0.17/tabcmd/locales/pt/LC_MESSAGES/tabcmd.mo +0 -0
  73. tabcmd-2.0.17/tabcmd/locales/pt/extra.properties +23 -0
  74. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/pt/shared_wg_pt.properties +187 -139
  75. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/pt/tabcmd_messages_pt.properties +136 -100
  76. tabcmd-2.0.17/tabcmd/locales/sv/LC_MESSAGES/tabcmd.mo +0 -0
  77. tabcmd-2.0.17/tabcmd/locales/sv/extra.properties +22 -0
  78. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/sv/shared_wg_sv.properties +201 -153
  79. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/sv/tabcmd_messages_sv.properties +190 -154
  80. tabcmd-2.0.17/tabcmd/locales/zh/LC_MESSAGES/tabcmd.mo +0 -0
  81. tabcmd-2.0.17/tabcmd/locales/zh/extra.properties +23 -0
  82. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/zh/shared_wg_zh.properties +113 -65
  83. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/zh/tabcmd_messages_zh.properties +98 -62
  84. tabcmd-2.0.17/tabcmd-linux.spec +61 -0
  85. tabcmd-2.0.17/tabcmd-mac.spec +60 -0
  86. tabcmd-2.0.17/tabcmd-windows.spec +60 -0
  87. {tabcmd-2.0.14 → tabcmd-2.0.17/tabcmd.egg-info}/PKG-INFO +3 -3
  88. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd.egg-info/SOURCES.txt +13 -44
  89. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd.egg-info/requires.txt +1 -1
  90. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_datasources_and_workbooks_command.py +18 -3
  91. tabcmd-2.0.17/tests/commands/test_geturl_utils.py +447 -0
  92. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_localize.py +0 -7
  93. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_projects_utils.py +5 -1
  94. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_publish_command.py +6 -1
  95. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_run_commands.py +7 -2
  96. tabcmd-2.0.17/tests/commands/test_server.py +113 -0
  97. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/e2e/online_tests.py +96 -52
  98. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_create_site_users.py +20 -0
  99. tabcmd-2.0.14/dodo.py +0 -200
  100. tabcmd-2.0.14/res/metadata.yml +0 -7
  101. tabcmd-2.0.14/tabcmd/__main__.py +0 -11
  102. tabcmd-2.0.14/tabcmd/locales/de/LC_MESSAGES/de.po +0 -68
  103. tabcmd-2.0.14/tabcmd/locales/de/LC_MESSAGES/shared_wg_de.po +0 -1789
  104. tabcmd-2.0.14/tabcmd/locales/de/LC_MESSAGES/tabcmd.mo +0 -0
  105. tabcmd-2.0.14/tabcmd/locales/de/LC_MESSAGES/tabcmd.po +0 -3275
  106. tabcmd-2.0.14/tabcmd/locales/de/LC_MESSAGES/tabcmd_messages_de.po +0 -1416
  107. tabcmd-2.0.14/tabcmd/locales/en/LC_MESSAGES/en-US.po +0 -83
  108. tabcmd-2.0.14/tabcmd/locales/en/LC_MESSAGES/shared_wg_en.po +0 -1789
  109. tabcmd-2.0.14/tabcmd/locales/en/LC_MESSAGES/tabcmd.mo +0 -0
  110. tabcmd-2.0.14/tabcmd/locales/en/LC_MESSAGES/tabcmd.po +0 -3278
  111. tabcmd-2.0.14/tabcmd/locales/en/LC_MESSAGES/tabcmd_messages_en.po +0 -1416
  112. tabcmd-2.0.14/tabcmd/locales/es/LC_MESSAGES/es.po +0 -68
  113. tabcmd-2.0.14/tabcmd/locales/es/LC_MESSAGES/shared_wg_es.po +0 -1789
  114. tabcmd-2.0.14/tabcmd/locales/es/LC_MESSAGES/tabcmd.mo +0 -0
  115. tabcmd-2.0.14/tabcmd/locales/es/LC_MESSAGES/tabcmd.po +0 -3276
  116. tabcmd-2.0.14/tabcmd/locales/es/LC_MESSAGES/tabcmd_messages_es.po +0 -1416
  117. tabcmd-2.0.14/tabcmd/locales/fr/LC_MESSAGES/fr.po +0 -68
  118. tabcmd-2.0.14/tabcmd/locales/fr/LC_MESSAGES/shared_wg_fr.po +0 -1789
  119. tabcmd-2.0.14/tabcmd/locales/fr/LC_MESSAGES/tabcmd.mo +0 -0
  120. tabcmd-2.0.14/tabcmd/locales/fr/LC_MESSAGES/tabcmd.po +0 -3275
  121. tabcmd-2.0.14/tabcmd/locales/fr/LC_MESSAGES/tabcmd_messages_fr.po +0 -1416
  122. tabcmd-2.0.14/tabcmd/locales/fr/shared_wg_fr.properties +0 -481
  123. tabcmd-2.0.14/tabcmd/locales/fr/tabcmd_messages_fr.properties +0 -402
  124. tabcmd-2.0.14/tabcmd/locales/ga/LC_MESSAGES/ga.po +0 -68
  125. tabcmd-2.0.14/tabcmd/locales/ga/LC_MESSAGES/shared_wg_ga.po +0 -1792
  126. tabcmd-2.0.14/tabcmd/locales/ga/LC_MESSAGES/tabcmd.mo +0 -0
  127. tabcmd-2.0.14/tabcmd/locales/ga/LC_MESSAGES/tabcmd.po +0 -3278
  128. tabcmd-2.0.14/tabcmd/locales/ga/LC_MESSAGES/tabcmd_messages_ga.po +0 -1416
  129. tabcmd-2.0.14/tabcmd/locales/ga/shared_wg_ga.properties +0 -481
  130. tabcmd-2.0.14/tabcmd/locales/ga/tabcmd_messages_ga.properties +0 -402
  131. tabcmd-2.0.14/tabcmd/locales/it/LC_MESSAGES/it.po +0 -68
  132. tabcmd-2.0.14/tabcmd/locales/it/LC_MESSAGES/shared_wg_it.po +0 -1789
  133. tabcmd-2.0.14/tabcmd/locales/it/LC_MESSAGES/tabcmd.mo +0 -0
  134. tabcmd-2.0.14/tabcmd/locales/it/LC_MESSAGES/tabcmd.po +0 -3275
  135. tabcmd-2.0.14/tabcmd/locales/it/LC_MESSAGES/tabcmd_messages_it.po +0 -1416
  136. tabcmd-2.0.14/tabcmd/locales/ja/LC_MESSAGES/ja.po +0 -68
  137. tabcmd-2.0.14/tabcmd/locales/ja/LC_MESSAGES/shared_wg_ja.po +0 -1789
  138. tabcmd-2.0.14/tabcmd/locales/ja/LC_MESSAGES/tabcmd.mo +0 -0
  139. tabcmd-2.0.14/tabcmd/locales/ja/LC_MESSAGES/tabcmd.po +0 -3275
  140. tabcmd-2.0.14/tabcmd/locales/ja/LC_MESSAGES/tabcmd_messages_ja.po +0 -1416
  141. tabcmd-2.0.14/tabcmd/locales/ko/LC_MESSAGES/ko.po +0 -70
  142. tabcmd-2.0.14/tabcmd/locales/ko/LC_MESSAGES/shared_wg_ko.po +0 -1789
  143. tabcmd-2.0.14/tabcmd/locales/ko/LC_MESSAGES/tabcmd.mo +0 -0
  144. tabcmd-2.0.14/tabcmd/locales/ko/LC_MESSAGES/tabcmd.po +0 -3277
  145. tabcmd-2.0.14/tabcmd/locales/ko/LC_MESSAGES/tabcmd_messages_ko.po +0 -1416
  146. tabcmd-2.0.14/tabcmd/locales/pt/LC_MESSAGES/pt.po +0 -68
  147. tabcmd-2.0.14/tabcmd/locales/pt/LC_MESSAGES/shared_wg_pt.po +0 -1789
  148. tabcmd-2.0.14/tabcmd/locales/pt/LC_MESSAGES/tabcmd.mo +0 -0
  149. tabcmd-2.0.14/tabcmd/locales/pt/LC_MESSAGES/tabcmd.po +0 -3275
  150. tabcmd-2.0.14/tabcmd/locales/pt/LC_MESSAGES/tabcmd_messages_pt.po +0 -1416
  151. tabcmd-2.0.14/tabcmd/locales/sv/LC_MESSAGES/shared_wg_sv.po +0 -1789
  152. tabcmd-2.0.14/tabcmd/locales/sv/LC_MESSAGES/sv.po +0 -68
  153. tabcmd-2.0.14/tabcmd/locales/sv/LC_MESSAGES/tabcmd.mo +0 -0
  154. tabcmd-2.0.14/tabcmd/locales/sv/LC_MESSAGES/tabcmd.po +0 -3275
  155. tabcmd-2.0.14/tabcmd/locales/sv/LC_MESSAGES/tabcmd_messages_sv.po +0 -1416
  156. tabcmd-2.0.14/tabcmd/locales/zh/LC_MESSAGES/shared_wg_zh.po +0 -1789
  157. tabcmd-2.0.14/tabcmd/locales/zh/LC_MESSAGES/tabcmd.mo +0 -0
  158. tabcmd-2.0.14/tabcmd/locales/zh/LC_MESSAGES/tabcmd.po +0 -3275
  159. tabcmd-2.0.14/tabcmd/locales/zh/LC_MESSAGES/tabcmd_messages_zh.po +0 -1416
  160. tabcmd-2.0.14/tabcmd/locales/zh/LC_MESSAGES/zh.po +0 -68
  161. tabcmd-2.0.14/tabcmd-linux.spec +0 -49
  162. tabcmd-2.0.14/tabcmd-mac.spec +0 -51
  163. tabcmd-2.0.14/tabcmd-windows.spec +0 -54
  164. tabcmd-2.0.14/tests/commands/test_geturl_utils.py +0 -216
  165. {tabcmd-2.0.14 → tabcmd-2.0.17}/.coverage +0 -0
  166. {tabcmd-2.0.14 → tabcmd-2.0.17}/.coveragerc +0 -0
  167. {tabcmd-2.0.14 → tabcmd-2.0.17}/.github/dependabot.yml +0 -0
  168. {tabcmd-2.0.14 → tabcmd-2.0.17}/.github/workflows/check-coverage.yml +0 -0
  169. {tabcmd-2.0.14 → tabcmd-2.0.17}/.github/workflows/codeql-analysis.yml +0 -0
  170. {tabcmd-2.0.14 → tabcmd-2.0.17}/.github/workflows/python-app.yml +0 -0
  171. {tabcmd-2.0.14 → tabcmd-2.0.17}/LICENSE +0 -0
  172. {tabcmd-2.0.14 → tabcmd-2.0.17}/README.md +0 -0
  173. {tabcmd-2.0.14 → tabcmd-2.0.17}/SECURITY.md +0 -0
  174. {tabcmd-2.0.14 → tabcmd-2.0.17}/bin/coverage.sh +0 -0
  175. {tabcmd-2.0.14 → tabcmd-2.0.17}/bin/i18n/makelocalealias.py +0 -0
  176. {tabcmd-2.0.14 → tabcmd-2.0.17}/bin/i18n/pygettext.py +0 -0
  177. {tabcmd-2.0.14 → tabcmd-2.0.17}/bin/license-checker.py +0 -0
  178. {tabcmd-2.0.14 → tabcmd-2.0.17}/bin/pyinstaller.sh +0 -0
  179. {tabcmd-2.0.14 → tabcmd-2.0.17}/res/README.md +0 -0
  180. {tabcmd-2.0.14 → tabcmd-2.0.17}/res/tabcmd.icns +0 -0
  181. {tabcmd-2.0.14 → tabcmd-2.0.17}/res/tabcmd.ico +0 -0
  182. {tabcmd-2.0.14 → tabcmd-2.0.17}/res/tabcmd.png +0 -0
  183. {tabcmd-2.0.14 → tabcmd-2.0.17}/setup.cfg +0 -0
  184. {tabcmd-2.0.14 → tabcmd-2.0.17}/setup.py +0 -0
  185. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/__init__.py +0 -0
  186. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/__init__.py +0 -0
  187. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/auth/__init__.py +0 -0
  188. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/auth/login_command.py +0 -0
  189. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/auth/logout_command.py +0 -0
  190. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/auth/session.py +0 -0
  191. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/commands.py +0 -0
  192. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/datasources_and_workbooks/__init__.py +0 -0
  193. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/datasources_and_workbooks/delete_command.py +0 -0
  194. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/extracts/__init__.py +0 -0
  195. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/extracts/decrypt_extracts_command.py +0 -0
  196. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/extracts/delete_extracts_command.py +0 -0
  197. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/extracts/encrypt_extracts_command.py +0 -0
  198. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/extracts/extracts.py +0 -0
  199. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/extracts/reencrypt_extracts_command.py +0 -0
  200. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/group/__init__.py +0 -0
  201. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/project/__init__.py +0 -0
  202. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/project/delete_project_command.py +0 -0
  203. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/site/__init__.py +0 -0
  204. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/site/create_site_command.py +0 -0
  205. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/site/delete_site_command.py +0 -0
  206. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/site/edit_site_command.py +0 -0
  207. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/site/list_command.py +0 -0
  208. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/commands/user/__init__.py +0 -0
  209. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/execution/__init__.py +0 -0
  210. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/execution/_version.py +0 -0
  211. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/execution/logger_config.py +0 -0
  212. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/execution/map_of_commands.py +0 -0
  213. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/de/LC_MESSAGES/.gitkeep +0 -0
  214. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/es/LC_MESSAGES/.gitkeep +0 -0
  215. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/fr/LC_MESSAGES/.gitkeep +0 -0
  216. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/ga/LC_MESSAGES/.gitkeep +0 -0
  217. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/it/LC_MESSAGES/.gitkeep +0 -0
  218. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/ja/LC_MESSAGES/.gitkeep +0 -0
  219. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/ko/LC_MESSAGES/.gitkeep +0 -0
  220. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/pt/LC_MESSAGES/.gitkeep +0 -0
  221. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/sv/LC_MESSAGES/.gitkeep +0 -0
  222. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/locales/zh/LC_MESSAGES/.gitkeep +0 -0
  223. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/tabcmd.py +0 -0
  224. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd/version.py +0 -0
  225. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd.egg-info/dependency_links.txt +0 -0
  226. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd.egg-info/entry_points.txt +0 -0
  227. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd.egg-info/top_level.txt +0 -0
  228. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd.py +0 -0
  229. {tabcmd-2.0.14 → tabcmd-2.0.17}/tabcmd.spec +0 -0
  230. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/__init__.py +0 -0
  231. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/assets/EmbeddedCredentials.twb +0 -0
  232. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/assets/SampleDS.tds +0 -0
  233. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/assets/WorkbookWithExtract.twbx +0 -0
  234. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/assets/WorkbookWithoutExtract.twbx +0 -0
  235. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/assets/World Indicators.tds +0 -0
  236. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/assets/World Indicators.tdsx +0 -0
  237. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/assets/detailed_users.csv +0 -0
  238. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/assets/simple-data.twbx +0 -0
  239. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/assets/usernames.csv +0 -0
  240. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/__init__.py +0 -0
  241. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_credential_file.txt +0 -0
  242. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_execution.py +0 -0
  243. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_listing_commands.py +0 -0
  244. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_server_handler.py +0 -0
  245. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_session.py +0 -0
  246. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/commands/test_user_utils.py +0 -0
  247. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/e2e/__init__.py +0 -0
  248. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/e2e/language_tests.py +0 -0
  249. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/e2e/setup_e2e.py +0 -0
  250. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/e2e/tests.py +0 -0
  251. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/e2e/tests_integration.py +0 -0
  252. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/__init__.py +0 -0
  253. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/common_setup.py +0 -0
  254. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_login_parser.py +0 -0
  255. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_logout_parser.py +0 -0
  256. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_add_user.py +0 -0
  257. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_create_extracts.py +0 -0
  258. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_create_group.py +0 -0
  259. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_create_project.py +0 -0
  260. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_create_site.py +0 -0
  261. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_create_user.py +0 -0
  262. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_decrypt_extracts.py +0 -0
  263. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_delete.py +0 -0
  264. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_delete_extracts.py +0 -0
  265. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_delete_group.py +0 -0
  266. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_delete_project.py +0 -0
  267. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_delete_site.py +0 -0
  268. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_delete_site_user.py +0 -0
  269. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_edit_site.py +0 -0
  270. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_encrypt_extracts.py +0 -0
  271. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_export.py +0 -0
  272. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_get_url.py +0 -0
  273. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_list_sites.py +0 -0
  274. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_login.py +0 -0
  275. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_publish.py +0 -0
  276. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_publish_samples.py +0 -0
  277. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_reencrypt_extracts.py +0 -0
  278. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_refresh_extracts.py +0 -0
  279. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_remove_user.py +0 -0
  280. {tabcmd-2.0.14 → tabcmd-2.0.17}/tests/parsers/test_parser_runschedule.py +0 -0
@@ -16,7 +16,7 @@ jobs:
16
16
  - name: Set up Python
17
17
  uses: actions/setup-python@v5
18
18
  with:
19
- python-version: '3.7'
19
+ python-version: '3.9'
20
20
 
21
21
  - name: Install App and Extras
22
22
  run: |
@@ -1,16 +1,17 @@
1
- name: Release-Executable
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 three files to a new release
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
- release:
13
- types: [published]
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
- BUNDLE_NAME: tabcmd.app
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
- BUNDLE_NAME: tabcmd_arm64.app
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.8
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.BUNDLE_NAME }}.tar ${{ matrix.OUT_FILE_NAME }}
95
+ tar -cvf ${{ matrix.UPLOAD_FILE_NAME }} ${{ matrix.OUT_FILE_NAME }}
90
96
 
91
- - name: Upload artifact
92
- if: matrix.TARGET != 'macos'
93
- uses: actions/upload-artifact@v4
97
+
98
+ - name: Upload binaries to release for ${{ matrix.TARGET }}
99
+ uses: svenstaro/upload-release-action@v2
94
100
  with:
95
- name: ${{ matrix.OUT_FILE_NAME }}
96
- path: ./dist/${{ matrix.TARGET }}/${{ matrix.OUT_FILE_NAME }}
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
@@ -20,7 +20,7 @@ jobs:
20
20
  fetch-depth: 0
21
21
  - uses: actions/setup-python@v5
22
22
  with:
23
- python-version: 3.8
23
+ python-version: 3.9
24
24
  - name: Build dist files
25
25
  run: |
26
26
  python --version
@@ -18,7 +18,7 @@ jobs:
18
18
  fail-fast: true
19
19
  matrix:
20
20
  os: [ubuntu-latest, macos-latest, windows-latest]
21
- python-version: ['3.9', '3.10', '3']
21
+ python-version: ['3.9', '3.10', '3.11', '3.12', '3']
22
22
 
23
23
  runs-on: ${{ matrix.os }}
24
24
 
@@ -15,7 +15,7 @@ jobs:
15
15
  fail-fast: true
16
16
  matrix:
17
17
  os: [ubuntu-latest, macos-latest, windows-latest]
18
- python-version: ['3.8', '3.9', '3.10', '3']
18
+ python-version: ['3.9', '3.10', '3.11', '3.12', '3']
19
19
 
20
20
  runs-on: ${{ matrix.os }}
21
21
 
@@ -41,6 +41,9 @@ pytest.xml
41
41
  # doit
42
42
  .doit.*
43
43
 
44
+ # localization intermediate files
45
+ *.po
46
+
44
47
  # venv
45
48
  site-packages
46
49
 
@@ -48,3 +51,4 @@ site-packages
48
51
  tabcmd-dev
49
52
  workon
50
53
  test.junit.xml
54
+ *.out
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: tabcmd
3
- Version: 2.0.14
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.31
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
- """ Updated to handle utf-8 files and give better error messages
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("ERROR (skipped)", lno, msgid)
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
- def to_po(source, destination, encoding, language, project):
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
- # Copyright (C) YEAR Tableau Software
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
- parts = line.split('=')
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
- destination.write('#:\n' + 'msgid "' + parts[0] + '"\n' 'msgstr "' + parts[1][:-1] + '"\n\n')
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 --noconfirm --distpath ./dist/windows
116
+ > pyinstaller tabcmd-windows.spec --clean --distpath .\dist\windows
117
117
 
118
- produces dist/tabcmd.exe
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/tabcmd/tabcmd.exe --help
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. (Beware! of what the file type is, github does something weird with zipping it if you download with curl etc. TODO: automate workflow with a github action)
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))
@@ -52,7 +52,7 @@ dependencies = [
52
52
  "types-mock",
53
53
  "types-requests",
54
54
  "types-setuptools",
55
- "tableauserverclient==0.31",
55
+ "tableauserverclient==0.35",
56
56
  "urllib3",
57
57
  ]
58
58
  [project.optional-dependencies]
@@ -0,0 +1,7 @@
1
+ Version: 2.0.0.16
2
+ CompanyName: Salesforce, Inc.
3
+ FileDescription: Tabcmd - CLI for Tableau
4
+ InternalName: Tabcmd
5
+ LegalCopyright: Salesforce, Inc.
6
+ OriginalFilename: tabcmd.exe
7
+ ProductName: Tabcmd