pygitweb 0.2.2__tar.gz → 0.3.0__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 (179) hide show
  1. {pygitweb-0.2.2 → pygitweb-0.3.0}/PKG-INFO +17 -5
  2. pygitweb-0.2.2/pygitweb.egg-info/PKG-INFO → pygitweb-0.3.0/README.md +13 -21
  3. pygitweb-0.3.0/pyproject.toml +35 -0
  4. pygitweb-0.2.2/pyproject.toml → pygitweb-0.3.0/pyproject.toml.orig +6 -11
  5. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/__meta__.py +1 -1
  6. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/actions.py +408 -338
  7. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/api/action.py +5 -4
  8. pygitweb-0.3.0/src/pygitweb/api/subpage.py +62 -0
  9. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/auth.py +415 -27
  10. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/auth_config.py +62 -7
  11. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/auth_oauth.py +2 -2
  12. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/auth_test.py +135 -1
  13. pygitweb-0.3.0/src/pygitweb/blog_routes_test.py +155 -0
  14. pygitweb-0.3.0/src/pygitweb/capacity_config.py +79 -0
  15. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/change_queue.py +24 -4
  16. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/change_queue_test.py +35 -0
  17. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/config.py +12 -4
  18. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/conftest.py +1 -1
  19. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/hooks_install.py +1 -1
  20. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/main.py +226 -114
  21. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/merge_requests.py +6 -9
  22. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/merge_requests_test.py +19 -1
  23. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/password_hash.py +15 -0
  24. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/password_hash_test.py +8 -1
  25. pygitweb-0.3.0/src/pygitweb/plugin_loader.py +156 -0
  26. pygitweb-0.3.0/src/pygitweb/plugin_loader_test.py +154 -0
  27. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/project_list_routes_test.py +4 -2
  28. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/settings.py +60 -27
  29. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/settings_config.py +2 -2
  30. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/settings_config_test.py +10 -0
  31. pygitweb-0.3.0/src/pygitweb/settings_plugins_test.py +58 -0
  32. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/shutdown.py +5 -3
  33. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/smart_http.py +86 -25
  34. pygitweb-0.3.0/src/pygitweb/smart_http_test.py +881 -0
  35. pygitweb-0.2.2/templates/addproject.html → pygitweb-0.3.0/src/pygitweb/static/addproject.js +4 -59
  36. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/static/blob-view.js +1 -7
  37. pygitweb-0.3.0/src/pygitweb/static/blog.js +377 -0
  38. pygitweb-0.3.0/src/pygitweb/static/board-cards.js +268 -0
  39. pygitweb-0.3.0/src/pygitweb/static/board-comments.js +164 -0
  40. pygitweb-0.3.0/src/pygitweb/static/board-context.js +121 -0
  41. pygitweb-0.3.0/src/pygitweb/static/board-dnd.js +154 -0
  42. pygitweb-0.3.0/src/pygitweb/static/board-markdown.js +75 -0
  43. pygitweb-0.3.0/src/pygitweb/static/board-popout.js +431 -0
  44. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/static/board-refs.js +5 -24
  45. pygitweb-0.3.0/src/pygitweb/static/board.js +157 -0
  46. pygitweb-0.3.0/src/pygitweb/static/diff-view.js +43 -0
  47. pygitweb-0.3.0/src/pygitweb/static/dom.js +5 -0
  48. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/static/main.css +317 -3
  49. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/static/navbar-auth.js +32 -2
  50. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/static/readme-render.js +6 -8
  51. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/static/search-page.js +2 -6
  52. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/static/summary-ref-switcher.js +3 -13
  53. pygitweb-0.3.0/src/pygitweb/static/theme.js +10 -0
  54. pygitweb-0.3.0/src/pygitweb/static/user-keys.js +109 -0
  55. pygitweb-0.3.0/src/pygitweb/static/vendor/diff2html-3.4.56-ui.min.js +1 -0
  56. pygitweb-0.3.0/src/pygitweb/static/vendor/diff2html-3.4.56.min.css +1 -0
  57. pygitweb-0.3.0/src/pygitweb/static/vendor/highlight-11.9.0.min.js +1213 -0
  58. pygitweb-0.3.0/src/pygitweb/static/vendor/showdown-2.1.0.min.js +3 -0
  59. pygitweb-0.3.0/src/pygitweb/static/vendor/tabler-1.0.0-beta17.min.css +9 -0
  60. pygitweb-0.3.0/src/pygitweb/static/vendor/tabler-1.0.0-beta17.min.js +15 -0
  61. pygitweb-0.3.0/src/pygitweb/static_tests/conftest.py +68 -0
  62. pygitweb-0.3.0/src/pygitweb/static_tests/harness.js +322 -0
  63. pygitweb-0.3.0/src/pygitweb/static_tests/js_runtime.py +277 -0
  64. pygitweb-0.3.0/src/pygitweb/static_tests/pages.py +114 -0
  65. pygitweb-0.3.0/src/pygitweb/static_tests/test_addproject.py +167 -0
  66. pygitweb-0.3.0/src/pygitweb/static_tests/test_blob-view.py +83 -0
  67. pygitweb-0.3.0/src/pygitweb/static_tests/test_board-cards.py +195 -0
  68. pygitweb-0.3.0/src/pygitweb/static_tests/test_board-comments.py +132 -0
  69. pygitweb-0.3.0/src/pygitweb/static_tests/test_board-context.py +143 -0
  70. pygitweb-0.3.0/src/pygitweb/static_tests/test_board-dnd.py +115 -0
  71. pygitweb-0.3.0/src/pygitweb/static_tests/test_board-markdown.py +76 -0
  72. pygitweb-0.3.0/src/pygitweb/static_tests/test_board-popout.py +172 -0
  73. pygitweb-0.3.0/src/pygitweb/static_tests/test_board-refs.py +142 -0
  74. pygitweb-0.3.0/src/pygitweb/static_tests/test_board.py +156 -0
  75. pygitweb-0.3.0/src/pygitweb/static_tests/test_diff-view.py +77 -0
  76. pygitweb-0.3.0/src/pygitweb/static_tests/test_dom.py +14 -0
  77. pygitweb-0.3.0/src/pygitweb/static_tests/test_hook-install.py +89 -0
  78. pygitweb-0.3.0/src/pygitweb/static_tests/test_navbar-auth.py +131 -0
  79. pygitweb-0.3.0/src/pygitweb/static_tests/test_readme-render.py +119 -0
  80. pygitweb-0.3.0/src/pygitweb/static_tests/test_search-page.py +153 -0
  81. pygitweb-0.3.0/src/pygitweb/static_tests/test_summary-ref-switcher.py +160 -0
  82. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/tasks.py +192 -24
  83. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/tasks_routes_test.py +168 -1
  84. pygitweb-0.3.0/src/pygitweb/team.py +183 -0
  85. pygitweb-0.3.0/src/pygitweb/team_routes_test.py +143 -0
  86. pygitweb-0.3.0/src/pygitweb/templates/activity.html +44 -0
  87. pygitweb-0.3.0/src/pygitweb/templates/addproject.html +62 -0
  88. pygitweb-0.2.2/templates/preamble.html → pygitweb-0.3.0/src/pygitweb/templates/base.html +36 -18
  89. pygitweb-0.3.0/src/pygitweb/templates/blob.html +19 -0
  90. pygitweb-0.3.0/src/pygitweb/templates/blobdiff.html +16 -0
  91. pygitweb-0.3.0/src/pygitweb/templates/blog.html +79 -0
  92. pygitweb-0.3.0/src/pygitweb/templates/board.html +52 -0
  93. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/templates/board_card.html +22 -4
  94. pygitweb-0.3.0/src/pygitweb/templates/commitdiff.html +16 -0
  95. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/templates/login.html +10 -2
  96. pygitweb-0.3.0/src/pygitweb/templates/macros.html +31 -0
  97. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/templates/merge_request_tag.html +3 -0
  98. pygitweb-0.3.0/src/pygitweb/templates/message.html +6 -0
  99. pygitweb-0.3.0/src/pygitweb/templates/project_list.html +87 -0
  100. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/templates/project_settings.html +4 -1
  101. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/templates/pygit2_settings.html +5 -1
  102. pygitweb-0.3.0/src/pygitweb/templates/pygitweb_settings.html +50 -0
  103. pygitweb-0.3.0/src/pygitweb/templates/readme_card.html +9 -0
  104. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/templates/search.html +6 -2
  105. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/templates/shutdown_ack.html +3 -0
  106. pygitweb-0.3.0/src/pygitweb/templates/subpage.html +9 -0
  107. pygitweb-0.3.0/src/pygitweb/templates/summary.html +87 -0
  108. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/templates/table.html +1 -1
  109. pygitweb-0.3.0/src/pygitweb/templates/table_page.html +35 -0
  110. pygitweb-0.3.0/src/pygitweb/templates/tasks.html +27 -0
  111. pygitweb-0.3.0/src/pygitweb/templates/team.html +50 -0
  112. pygitweb-0.3.0/src/pygitweb/templates/team_capacity_form.html +29 -0
  113. pygitweb-0.3.0/src/pygitweb/templates/tree.html +13 -0
  114. pygitweb-0.3.0/src/pygitweb/templates/user_profile.html +85 -0
  115. pygitweb-0.3.0/src/pygitweb/templates_env.py +107 -0
  116. pygitweb-0.3.0/src/pygitweb/templates_env_test.py +116 -0
  117. pygitweb-0.2.2/README.md +0 -119
  118. pygitweb-0.2.2/api/subpage.py +0 -22
  119. pygitweb-0.2.2/auth.schema.json +0 -110
  120. pygitweb-0.2.2/plugin_loader.py +0 -83
  121. pygitweb-0.2.2/pygitweb.egg-info/SOURCES.txt +0 -205
  122. pygitweb-0.2.2/pygitweb.egg-info/dependency_links.txt +0 -1
  123. pygitweb-0.2.2/pygitweb.egg-info/requires.txt +0 -10
  124. pygitweb-0.2.2/pygitweb.egg-info/top_level.txt +0 -1
  125. pygitweb-0.2.2/settings.schema.json +0 -73
  126. pygitweb-0.2.2/setup.cfg +0 -4
  127. pygitweb-0.2.2/smart_http_test.py +0 -232
  128. pygitweb-0.2.2/static/board.js +0 -939
  129. pygitweb-0.2.2/templates/blobdiff.html +0 -57
  130. pygitweb-0.2.2/templates/board.html +0 -32
  131. pygitweb-0.2.2/templates/commitdiff.html +0 -57
  132. pygitweb-0.2.2/templates/pygitweb_settings.html +0 -21
  133. pygitweb-0.2.2/templates/user_profile.html +0 -10
  134. pygitweb-0.2.2/templates_env.py +0 -21
  135. {pygitweb-0.2.2 → pygitweb-0.3.0}/LICENSE +0 -0
  136. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/__init__.py +0 -0
  137. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/addproject_permissions_test.py +0 -0
  138. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/api/__init__.py +0 -0
  139. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/api/plugins/__init__.py +0 -0
  140. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/api/plugins/project_zip.py +0 -0
  141. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/api/project.py +0 -0
  142. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/board_refs.py +1 -1
  143. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/board_refs_test.py +1 -1
  144. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/boards_permissions_test.py +0 -0
  145. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/change_queue_routes_test.py +0 -0
  146. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/comments_permissions_test.py +1 -1
  147. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/dependencies.py +0 -0
  148. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/formatting.py +0 -0
  149. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/formatting_test.py +0 -0
  150. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/git_helpers.py +0 -0
  151. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/git_helpers_test.py +0 -0
  152. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/gravatar.py +0 -0
  153. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/gravatar_test.py +0 -0
  154. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/hooks_install_test.py +0 -0
  155. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/hooks_permissions_test.py +0 -0
  156. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/mr_permissions_test.py +1 -1
  157. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/permissions.py +0 -0
  158. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/permissions_test.py +0 -0
  159. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/projects.py +0 -0
  160. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/projects_test.py +0 -0
  161. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/sessions.py +0 -0
  162. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/settings_permissions_test.py +0 -0
  163. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/static/hook-install.js +0 -0
  164. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/static/icons/cloud-down.svg +0 -0
  165. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/static/icons/cloud-exclamation.svg +0 -0
  166. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/static/icons/cloud-filled.svg +0 -0
  167. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/static/icons/cloud-storm.svg +0 -0
  168. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/static/icons/cloud-up.svg +0 -0
  169. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/static/icons/cloud.svg +0 -0
  170. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/static/logo.svg +0 -0
  171. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/static/themes/solarized.css +0 -0
  172. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/tasks_permissions_test.py +1 -1
  173. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/templates/hooks_summary_cell.html +0 -0
  174. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/templates/merge_request_summary_cell.html +0 -0
  175. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/templates/pagination.html +0 -0
  176. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/templates/settings_form_field.html +0 -0
  177. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/timeline_cache.py +0 -0
  178. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/validation.py +0 -0
  179. {pygitweb-0.2.2 → pygitweb-0.3.0/src/pygitweb}/validation_test.py +0 -0
@@ -1,10 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pygitweb
3
- Version: 0.2.2
3
+ Version: 0.3.0
4
4
  Summary: Gitweb reimplementation with FastAPI and Pygit2
5
5
  License-Expression: MIT
6
- Requires-Python: >=3.11
7
- Description-Content-Type: text/markdown
8
6
  License-File: LICENSE
9
7
  Requires-Dist: pygittools>=0.2.0
10
8
  Requires-Dist: fastapi[standard-no-fastapi-cloud-cli]>=0.104.0
@@ -16,7 +14,9 @@ Requires-Dist: pygit2>=1.12.0
16
14
  Requires-Dist: pydantic-settings>=2.13.0
17
15
  Requires-Dist: httpx>=0.27.0
18
16
  Requires-Dist: python-ripgrep==0.0.9
19
- Dynamic: license-file
17
+ Requires-Dist: abcreg>=0.2.0
18
+ Requires-Python: >=3.11
19
+ Description-Content-Type: text/markdown
20
20
 
21
21
  # Pygitweb
22
22
 
@@ -26,7 +26,7 @@ Gitweb reimplementation using **Python**, **FastAPI**, and **Pygit2**, ported fr
26
26
 
27
27
  Settings load from `~/.pygitweb/settings.json` (or `PYGITWEB_SETTINGS_CONFIG`), `PYGITWEB_*`
28
28
  environment variables, and optionally a `.env` file in the working directory via
29
- `pydantic-settings`. See `pygitweb/config.py` and `pygitweb/settings.schema.json` for the full schema. Common ones:
29
+ `pydantic-settings`. See `src/pygitweb/config.py` and `settings.schema.json` for the full schema. Common ones:
30
30
 
31
31
  - `PYGITWEB_PROJECTROOT` — absolute path to directory containing git repositories (default: `$HOME`)
32
32
  - `PYGITWEB_PROJECTS_LIST` — directory to scan, or path to a project-list file (default: `PROJECTROOT`)
@@ -36,7 +36,11 @@ environment variables, and optionally a `.env` file in the working directory via
36
36
  - `PYGITWEB_AUTH` — `0` / `false` / `off` disables auth; `1` / `true` / `on` enables it. If **unset or empty**, auth defaults to **on**.
37
37
  - `PYGITWEB_AUTH_CONFIG` — path to the auth JSON file (default: `~/.pygitweb/auth.json`). Generated to a reasonable default if not present.
38
38
  - `PYGITWEB_SETTINGS_CONFIG` — path to the settings JSON file (default: `~/.pygitweb/settings.json`). Created from the environment on first run if missing.
39
+ - `PYGITWEB_ENABLED_PLUGINS` — installed plugins to load. The settings page can change this list and reload plugins immediately (`POST /settings/pygitweb/plugins`).
40
+ - `PYGITWEB_API_KEY_MAX_COUNT` — maximum Smart HTTP API keys each local user may hold (default: `2`).
41
+ - `PYGITWEB_API_KEY_EXPIRY_DAYS` — lifetime of a newly issued API key, in days. `0` means the key does not expire (the default).
39
42
  - Browser login: `GET /login` (optional `?next=/path`), `POST /login` with form fields `username`, `password`, `next`; sets an HttpOnly cookie with an opaque in-process session id (also accepted by protected routes via `Authorization: Bearer`). Sessions are wiped when the process exits. `GET /logout?next=/` revokes the session and clears the cookie.
43
+ - Account and Smart HTTP keys (auth required): `GET /user` is the account page. `POST /user/keys` with JSON `{"id": "...", "readonly": false}` issues a key and returns the plaintext secret once; only its scrypt hash is stored. `readonly: true` allows fetch but not push. `DELETE /user/keys?id=<id>` revokes one key. Clone and push attempts are appended to `~/.pygitweb/smart_http.log`.
40
44
 
41
45
  ## Routes
42
46
 
@@ -86,6 +90,14 @@ Load the `/docs` page for a detailed view of routes (below the readme).
86
90
  | search (page) | — | `GET /project/{project}/search` | Per-project search UI page. |
87
91
  | search_help | — | | TODO |
88
92
 
93
+ **Blog, boards, and tasks**
94
+
95
+ - `GET /project/{project}/blog/`: markdown blog page when `articles/manifest.json` exists at `HEAD`. Otherwise the summary link stays disabled.
96
+ - `GET /project/{project}/blog/raw/{path}`: raw blob from `HEAD` for the blog viewer (markdown, manifest, and assets). Paths that escape the tree return `404`.
97
+ - `POST /tasks/move?project=<name>&board=<source>&task=<ref>&target=<board>`: move a task onto another board, such as a sprint board. Column headers on the board page show a running points total. `points` on create and update accepts `0`, `1`, `2`, `3`, `5`, `8`, `13`, or `21`; any other value is stored as unestimated.
98
+ - `POST /tasks/archive?project=<name>&board=<source>&task=<ref>`: move a task to the archive board.
99
+ - `POST /tasks/delete?project=<name>&board=<source>&task=<ref>`: delete a task.
100
+
89
101
  ## Query parameter short names (CGI mapping)
90
102
 
91
103
  - `p` → project
@@ -1,23 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: pygitweb
3
- Version: 0.2.2
4
- Summary: Gitweb reimplementation with FastAPI and Pygit2
5
- License-Expression: MIT
6
- Requires-Python: >=3.11
7
- Description-Content-Type: text/markdown
8
- License-File: LICENSE
9
- Requires-Dist: pygittools>=0.2.0
10
- Requires-Dist: fastapi[standard-no-fastapi-cloud-cli]>=0.104.0
11
- Requires-Dist: uvicorn[standard]>=0.24.0
12
- Requires-Dist: python-multipart>=0.0.6
13
- Requires-Dist: jinja2>=3.1.0
14
- Requires-Dist: orjson>=0.19.0
15
- Requires-Dist: pygit2>=1.12.0
16
- Requires-Dist: pydantic-settings>=2.13.0
17
- Requires-Dist: httpx>=0.27.0
18
- Requires-Dist: python-ripgrep==0.0.9
19
- Dynamic: license-file
20
-
21
1
  # Pygitweb
22
2
 
23
3
  Gitweb reimplementation using **Python**, **FastAPI**, and **Pygit2**, ported from `git/gitweb/gitweb.perl`.
@@ -26,7 +6,7 @@ Gitweb reimplementation using **Python**, **FastAPI**, and **Pygit2**, ported fr
26
6
 
27
7
  Settings load from `~/.pygitweb/settings.json` (or `PYGITWEB_SETTINGS_CONFIG`), `PYGITWEB_*`
28
8
  environment variables, and optionally a `.env` file in the working directory via
29
- `pydantic-settings`. See `pygitweb/config.py` and `pygitweb/settings.schema.json` for the full schema. Common ones:
9
+ `pydantic-settings`. See `src/pygitweb/config.py` and `settings.schema.json` for the full schema. Common ones:
30
10
 
31
11
  - `PYGITWEB_PROJECTROOT` — absolute path to directory containing git repositories (default: `$HOME`)
32
12
  - `PYGITWEB_PROJECTS_LIST` — directory to scan, or path to a project-list file (default: `PROJECTROOT`)
@@ -36,7 +16,11 @@ environment variables, and optionally a `.env` file in the working directory via
36
16
  - `PYGITWEB_AUTH` — `0` / `false` / `off` disables auth; `1` / `true` / `on` enables it. If **unset or empty**, auth defaults to **on**.
37
17
  - `PYGITWEB_AUTH_CONFIG` — path to the auth JSON file (default: `~/.pygitweb/auth.json`). Generated to a reasonable default if not present.
38
18
  - `PYGITWEB_SETTINGS_CONFIG` — path to the settings JSON file (default: `~/.pygitweb/settings.json`). Created from the environment on first run if missing.
19
+ - `PYGITWEB_ENABLED_PLUGINS` — installed plugins to load. The settings page can change this list and reload plugins immediately (`POST /settings/pygitweb/plugins`).
20
+ - `PYGITWEB_API_KEY_MAX_COUNT` — maximum Smart HTTP API keys each local user may hold (default: `2`).
21
+ - `PYGITWEB_API_KEY_EXPIRY_DAYS` — lifetime of a newly issued API key, in days. `0` means the key does not expire (the default).
39
22
  - Browser login: `GET /login` (optional `?next=/path`), `POST /login` with form fields `username`, `password`, `next`; sets an HttpOnly cookie with an opaque in-process session id (also accepted by protected routes via `Authorization: Bearer`). Sessions are wiped when the process exits. `GET /logout?next=/` revokes the session and clears the cookie.
23
+ - Account and Smart HTTP keys (auth required): `GET /user` is the account page. `POST /user/keys` with JSON `{"id": "...", "readonly": false}` issues a key and returns the plaintext secret once; only its scrypt hash is stored. `readonly: true` allows fetch but not push. `DELETE /user/keys?id=<id>` revokes one key. Clone and push attempts are appended to `~/.pygitweb/smart_http.log`.
40
24
 
41
25
  ## Routes
42
26
 
@@ -86,6 +70,14 @@ Load the `/docs` page for a detailed view of routes (below the readme).
86
70
  | search (page) | — | `GET /project/{project}/search` | Per-project search UI page. |
87
71
  | search_help | — | | TODO |
88
72
 
73
+ **Blog, boards, and tasks**
74
+
75
+ - `GET /project/{project}/blog/`: markdown blog page when `articles/manifest.json` exists at `HEAD`. Otherwise the summary link stays disabled.
76
+ - `GET /project/{project}/blog/raw/{path}`: raw blob from `HEAD` for the blog viewer (markdown, manifest, and assets). Paths that escape the tree return `404`.
77
+ - `POST /tasks/move?project=<name>&board=<source>&task=<ref>&target=<board>`: move a task onto another board, such as a sprint board. Column headers on the board page show a running points total. `points` on create and update accepts `0`, `1`, `2`, `3`, `5`, `8`, `13`, or `21`; any other value is stored as unestimated.
78
+ - `POST /tasks/archive?project=<name>&board=<source>&task=<ref>`: move a task to the archive board.
79
+ - `POST /tasks/delete?project=<name>&board=<source>&task=<ref>`: delete a task.
80
+
89
81
  ## Query parameter short names (CGI mapping)
90
82
 
91
83
  - `p` → project
@@ -0,0 +1,35 @@
1
+ [project]
2
+ name = "pygitweb"
3
+ version = "0.3.0"
4
+ description = "Gitweb reimplementation with FastAPI and Pygit2"
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ license-files = ["LICENSE"]
8
+ requires-python = ">=3.11"
9
+ dependencies = [
10
+ "pygittools>=0.2.0",
11
+ "fastapi[standard-no-fastapi-cloud-cli]>=0.104.0",
12
+ "uvicorn[standard]>=0.24.0",
13
+ "python-multipart>=0.0.6",
14
+ "jinja2>=3.1.0",
15
+ "orjson>=0.19.0",
16
+ "pygit2>=1.12.0",
17
+ "pydantic-settings>=2.13.0",
18
+ "httpx>=0.27.0",
19
+ "python-ripgrep==0.0.9",
20
+ "abcreg>=0.2.0",
21
+ ]
22
+
23
+ [tool.setuptools]
24
+ packages = [
25
+ "pygitweb",
26
+ "pygitweb.api",
27
+ "pygitweb.api.plugins",
28
+ ]
29
+
30
+ [tool.uv.sources.pygittools]
31
+ workspace = true
32
+
33
+ [build-system]
34
+ requires = ["uv_build>=0.12.23,<0.13"]
35
+ build-backend = "uv_build"
@@ -1,10 +1,6 @@
1
- [build-system]
2
- requires = ["setuptools>=61", "wheel"]
3
- build-backend = "setuptools.build_meta"
4
-
5
1
  [project]
6
2
  name = "pygitweb"
7
- version = "0.2.2"
3
+ version = "0.3.0"
8
4
  description = "Gitweb reimplementation with FastAPI and Pygit2"
9
5
  readme = "README.md"
10
6
  license = "MIT"
@@ -21,16 +17,15 @@ dependencies = [
21
17
  "pydantic-settings>=2.13.0",
22
18
  "httpx>=0.27.0",
23
19
  "python-ripgrep==0.0.9",
20
+ "abcreg>=0.2.0",
24
21
  ]
25
22
 
26
23
  [tool.setuptools]
27
24
  packages = ["pygitweb", "pygitweb.api", "pygitweb.api.plugins"]
28
25
 
29
- [tool.setuptools.package-dir]
30
- pygitweb = "."
31
-
32
- [tool.setuptools.package-data]
33
- pygitweb = ["README.md", "templates/**/*", "static/**/*", "*.schema.json"]
34
-
35
26
  [tool.uv.sources]
36
27
  pygittools = { workspace = true }
28
+
29
+ [build-system]
30
+ requires = ["uv_build>=0.12.23,<0.13"]
31
+ build-backend = "uv_build"
@@ -2,7 +2,7 @@
2
2
  Metadata for PyGitWeb - this is the canonical source of all information below.
3
3
  """
4
4
 
5
- __version__ = "0.2.0"
5
+ __version__ = "0.2.3"
6
6
  __author__ = "Will Bowers"
7
7
  __license__ = "MIT"
8
8
  __description__ = "FastAPI + Pygit2 Repo Browser"