sphinxnotes-recentupdate 1.0b2__tar.gz → 2.0a0__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 (104) hide show
  1. sphinxnotes_recentupdate-2.0a0/.cruft.json +29 -0
  2. sphinxnotes_recentupdate-2.0a0/.github/workflows/lint.yml +9 -0
  3. sphinxnotes_recentupdate-2.0a0/.github/workflows/pages.yml +30 -0
  4. sphinxnotes_recentupdate-2.0a0/.github/workflows/pypi.yml +22 -0
  5. sphinxnotes_recentupdate-2.0a0/.github/workflows/release.yml +18 -0
  6. sphinxnotes_recentupdate-2.0a0/.gitignore +141 -0
  7. sphinxnotes_recentupdate-2.0a0/.pre-commit-config.yaml +9 -0
  8. sphinxnotes_recentupdate-2.0a0/AGENTS.md +40 -0
  9. {sphinxnotes-recentupdate-1.0b2 → sphinxnotes_recentupdate-2.0a0}/LICENSE +2 -2
  10. sphinxnotes_recentupdate-2.0a0/MANIFEST.in +10 -0
  11. sphinxnotes_recentupdate-2.0a0/Makefile +96 -0
  12. sphinxnotes_recentupdate-2.0a0/PKG-INFO +69 -0
  13. sphinxnotes_recentupdate-2.0a0/README.rst +31 -0
  14. {sphinxnotes-recentupdate-1.0b2/doc → sphinxnotes_recentupdate-2.0a0/docs}/Makefile +5 -5
  15. sphinxnotes_recentupdate-2.0a0/docs/_images/.gitkeep +1 -0
  16. sphinxnotes_recentupdate-2.0a0/docs/_static/.gitkeep +1 -0
  17. sphinxnotes_recentupdate-2.0a0/docs/_static/custom.css +10 -0
  18. sphinxnotes_recentupdate-2.0a0/docs/changelog.rst +57 -0
  19. {sphinxnotes-recentupdate-1.0b2/doc → sphinxnotes_recentupdate-2.0a0/docs}/conf.py +85 -45
  20. sphinxnotes_recentupdate-2.0a0/docs/conf.rst +14 -0
  21. sphinxnotes_recentupdate-2.0a0/docs/index.rst +117 -0
  22. sphinxnotes_recentupdate-2.0a0/docs/make.bat +38 -0
  23. sphinxnotes_recentupdate-2.0a0/docs/requirements.txt +16 -0
  24. sphinxnotes_recentupdate-2.0a0/docs/usage.rst +104 -0
  25. sphinxnotes_recentupdate-2.0a0/pyproject.toml +85 -0
  26. sphinxnotes_recentupdate-2.0a0/ruff.toml +13 -0
  27. sphinxnotes_recentupdate-2.0a0/src/sphinxnotes/recentupdate/__init__.py +199 -0
  28. sphinxnotes_recentupdate-2.0a0/src/sphinxnotes/recentupdate/meta.py +39 -0
  29. sphinxnotes_recentupdate-2.0a0/src/sphinxnotes/recentupdate/py.typed +0 -0
  30. sphinxnotes_recentupdate-2.0a0/src/sphinxnotes_recentupdate.egg-info/PKG-INFO +69 -0
  31. sphinxnotes_recentupdate-2.0a0/src/sphinxnotes_recentupdate.egg-info/SOURCES.txt +85 -0
  32. sphinxnotes_recentupdate-2.0a0/src/sphinxnotes_recentupdate.egg-info/requires.txt +13 -0
  33. sphinxnotes_recentupdate-2.0a0/tests/__init__.py +1 -0
  34. sphinxnotes_recentupdate-2.0a0/tests/conftest.py +28 -0
  35. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/HEAD +1 -0
  36. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/config +8 -0
  37. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/index +0 -0
  38. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/objects/26/c00b1dd5cd359d8382b2c6246294ba231eaf92 +0 -0
  39. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/objects/b4/a82ac0751e8d909d8670aa0fe02dba3a11bdc5 +0 -0
  40. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/objects/b7/7dd9ea96d34a54ef2cf7b9bd59e14f63ceef7d +0 -0
  41. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/objects/cd/1ba0f8ba01eea82d97fa16b1b456475223021a +0 -0
  42. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/objects/e4/4d8b53484c14d71d04634227cf3056702fedba +0 -0
  43. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/objects/ee/c732375bfef2b30f4c0e4ffaf3f199d7ebb0ba +0 -0
  44. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/refs/heads/master +1 -0
  45. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/conf.py +6 -0
  46. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/index.rst +9 -0
  47. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/HEAD +1 -0
  48. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/config +8 -0
  49. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/index +0 -0
  50. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/objects/15/a4e25051f662390b66207b69833a94634a0bfa +0 -0
  51. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/objects/27/e53c961766c5041a140df1ddaa3183e242e33c +0 -0
  52. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/objects/4f/b0f4b09d543a7b1e0b354e5e5a6e41321571e1 +0 -0
  53. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/objects/56/7c8f9d76bb5413f145125669003cf9b180dd3f +0 -0
  54. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/objects/b5/f7ed01b3a40d20334eb87224272bc81afbaf08 +0 -0
  55. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/objects/b7/7dd9ea96d34a54ef2cf7b9bd59e14f63ceef7d +0 -0
  56. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/objects/d7/049ba58051d12dd2af975c67c647f68c78914f +0 -0
  57. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/objects/ee/c732375bfef2b30f4c0e4ffaf3f199d7ebb0ba +0 -0
  58. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/objects/fa/070a00b6d14b0a04058758a59ec5b8b58de778 +0 -0
  59. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/refs/heads/master +1 -0
  60. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/conf.py +6 -0
  61. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/index.rst +11 -0
  62. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/other.rst +2 -0
  63. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/HEAD +1 -0
  64. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/config +8 -0
  65. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/index +0 -0
  66. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/19/d82f92368b7a52ad5e72276af9cb24890fc373 +0 -0
  67. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/27/e53c961766c5041a140df1ddaa3183e242e33c +0 -0
  68. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/2c/2a251c2bef177436e16be0fda970aab89f8c56 +0 -0
  69. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/3b/54729640c355750dfe1e24bbdf6821c7d01221 +0 -0
  70. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/49/25b645377c0558f6d4913f3430f1391f4005a7 +0 -0
  71. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/5f/b4f79896fd76af2d17c630447fcaf650aa6e1c +0 -0
  72. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/8e/19dfa64d98848299c52bbab92e687a3b9d660a +0 -0
  73. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/9d/3e74f1cb019cb379b2f3faf5331173127fc783 +0 -0
  74. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/b1/62b1e17c275288464ffbe285aad358b99c912a +0 -0
  75. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/b7/7dd9ea96d34a54ef2cf7b9bd59e14f63ceef7d +0 -0
  76. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/c1/ac64c024d69c348a1ad6b742ff57cc62193406 +0 -0
  77. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/refs/heads/master +1 -0
  78. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/conf.py +6 -0
  79. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/index.rst +9 -0
  80. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/other.rst +2 -0
  81. sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/subdir/doc.rst +2 -0
  82. sphinxnotes_recentupdate-2.0a0/tests/test_always_pass.py +9 -0
  83. sphinxnotes_recentupdate-2.0a0/tests/test_e2e.py +40 -0
  84. sphinxnotes-recentupdate-1.0b2/MANIFEST.in +0 -4
  85. sphinxnotes-recentupdate-1.0b2/PKG-INFO +0 -31
  86. sphinxnotes-recentupdate-1.0b2/README.rst +0 -5
  87. sphinxnotes-recentupdate-1.0b2/doc/__pycache__/confval.cpython-310.pyc +0 -0
  88. sphinxnotes-recentupdate-1.0b2/doc/__pycache__/confval.cpython-39.pyc +0 -0
  89. sphinxnotes-recentupdate-1.0b2/doc/confval.py +0 -17
  90. sphinxnotes-recentupdate-1.0b2/doc/index.rst +0 -180
  91. sphinxnotes-recentupdate-1.0b2/doc/make.bat +0 -35
  92. sphinxnotes-recentupdate-1.0b2/doc/requirements.txt +0 -7
  93. sphinxnotes-recentupdate-1.0b2/setup.py +0 -43
  94. sphinxnotes-recentupdate-1.0b2/sphinxnotes/__init__.py +0 -13
  95. sphinxnotes-recentupdate-1.0b2/sphinxnotes/recentupdate/__init__.py +0 -266
  96. sphinxnotes-recentupdate-1.0b2/sphinxnotes_recentupdate.egg-info/PKG-INFO +0 -31
  97. sphinxnotes-recentupdate-1.0b2/sphinxnotes_recentupdate.egg-info/SOURCES.txt +0 -22
  98. sphinxnotes-recentupdate-1.0b2/sphinxnotes_recentupdate.egg-info/namespace_packages.txt +0 -1
  99. sphinxnotes-recentupdate-1.0b2/sphinxnotes_recentupdate.egg-info/not-zip-safe +0 -1
  100. sphinxnotes-recentupdate-1.0b2/sphinxnotes_recentupdate.egg-info/requires.txt +0 -3
  101. {sphinxnotes-recentupdate-1.0b2/doc/_images → sphinxnotes_recentupdate-2.0a0/docs/_static}/sphinx-notes.png +0 -0
  102. {sphinxnotes-recentupdate-1.0b2 → sphinxnotes_recentupdate-2.0a0}/setup.cfg +0 -0
  103. {sphinxnotes-recentupdate-1.0b2 → sphinxnotes_recentupdate-2.0a0/src}/sphinxnotes_recentupdate.egg-info/dependency_links.txt +0 -0
  104. {sphinxnotes-recentupdate-1.0b2 → sphinxnotes_recentupdate-2.0a0/src}/sphinxnotes_recentupdate.egg-info/top_level.txt +0 -0
@@ -0,0 +1,29 @@
1
+ {
2
+ "template": "https://github.com/sphinx-notes/cookiecutter",
3
+ "commit": "233a8daa4e276a9559975a51178f29e7079dcafd",
4
+ "checkout": null,
5
+ "context": {
6
+ "cookiecutter": {
7
+ "namespace": "sphinxnotes",
8
+ "name": "recentupdate",
9
+ "full_name": "sphinxnotes-recentupdate",
10
+ "author": "Shengyu Zhang",
11
+ "description": "Get the document update information from git and display it in Sphinx documentation",
12
+ "version": "1.1",
13
+ "github_owner": "sphinx-notes",
14
+ "github_repo": "recentupdate",
15
+ "generated_file_header": "This file is generated from sphinx-notes/cookiecutter.",
16
+ "dont_edit_header": "DO NOT EDIT.",
17
+ "pypi_name": "sphinxnotes-recentupdate",
18
+ "pypi_owner": "SilverRainZ",
19
+ "is_python_project": true,
20
+ "python_version": "3.12",
21
+ "is_sphinx_extension": true,
22
+ "sphinx_version": "7.0",
23
+ "development_status": "3 - Alpha",
24
+ "_template": "https://github.com/sphinx-notes/cookiecutter",
25
+ "_commit": "233a8daa4e276a9559975a51178f29e7079dcafd"
26
+ }
27
+ },
28
+ "directory": null
29
+ }
@@ -0,0 +1,9 @@
1
+ name: Ruff
2
+ on: [ push, pull_request ]
3
+
4
+ jobs:
5
+ ruff:
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v4
9
+ - uses: chartboost/ruff-action@v1
@@ -0,0 +1,30 @@
1
+ name: Deploy Sphinx documentation to Pages
2
+
3
+ # Runs on pushes targeting the default branch
4
+ on:
5
+ push:
6
+ branches: [master]
7
+
8
+ # Cancel any in-progress job or run
9
+ # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
10
+ concurrency:
11
+ group: ${{ github.ref }}
12
+ cancel-in-progress: true
13
+
14
+ jobs:
15
+ pages:
16
+ runs-on: ubuntu-latest
17
+ environment:
18
+ name: github-pages
19
+ url: ${{ steps.deployment.outputs.page_url }}
20
+ permissions:
21
+ pages: write
22
+ id-token: write
23
+ steps:
24
+ - uses: actions/checkout@v4
25
+ with:
26
+ fetch-depth: 0
27
+ - id: deployment
28
+ uses: sphinx-notes/pages@v3
29
+ with:
30
+ checkout: false
@@ -0,0 +1,22 @@
1
+ name: Publish package distributions to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "*"
7
+
8
+ jobs:
9
+ pypi:
10
+ runs-on: ubuntu-latest
11
+ environment:
12
+ name: pypi
13
+ url: https://pypi.org/p/sphinxnotes-recentupdate
14
+ permissions:
15
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: actions/setup-python@v5
19
+ - run: pip install build twine && make dist
20
+ - uses: pypa/gh-action-pypi-publish@release/v1
21
+ with:
22
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,18 @@
1
+ name: Publish Github Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "[0-9]+.[0-9]+" # MAJOR.MINOR (1.0: y, 1.0a0: n, 1.0.1: n)
7
+
8
+ jobs:
9
+ release:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: write
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: ncipollo/release-action@v1
16
+ with:
17
+ body: |
18
+ Changelog: https://sphinx.silverrainz.me/recentupdate/changelog.html
@@ -0,0 +1,141 @@
1
+ # This file is generated from sphinx-notes/cookiecutter.
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ *.py[cod]
6
+ *$py.class
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ build/
14
+ develop-eggs/
15
+ dist/
16
+ downloads/
17
+ eggs/
18
+ .eggs/
19
+ lib/
20
+ lib64/
21
+ parts/
22
+ sdist/
23
+ var/
24
+ wheels/
25
+ pip-wheel-metadata/
26
+ share/python-wheels/
27
+ *.egg-info/
28
+ .installed.cfg
29
+ *.egg
30
+ MANIFEST
31
+
32
+ # PyInstaller
33
+ # Usually these files are written by a python script from a template
34
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
35
+ *.manifest
36
+ *.spec
37
+
38
+ # Installer logs
39
+ pip-log.txt
40
+ pip-delete-this-directory.txt
41
+
42
+ # Unit test / coverage reports
43
+ htmlcov/
44
+ .tox/
45
+ .nox/
46
+ .coverage
47
+ .coverage.*
48
+ .cache
49
+ nosetests.xml
50
+ coverage.xml
51
+ *.cover
52
+ *.py,cover
53
+ .hypothesis/
54
+ .pytest_cache/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+ db.sqlite3
64
+ db.sqlite3-journal
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+
76
+ # PyBuilder
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ .python-version
88
+
89
+ # pipenv
90
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
91
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
92
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
93
+ # install all needed dependencies.
94
+ #Pipfile.lock
95
+
96
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
97
+ __pypackages__/
98
+
99
+ # Celery stuff
100
+ celerybeat-schedule
101
+ celerybeat.pid
102
+
103
+ # SageMath parsed files
104
+ *.sage.py
105
+
106
+ # Environments
107
+ .env
108
+ .venv
109
+ env/
110
+ venv/
111
+ ENV/
112
+ env.bak/
113
+ venv.bak/
114
+
115
+ # Spyder project settings
116
+ .spyderproject
117
+ .spyproject
118
+
119
+ # Rope project settings
120
+ .ropeproject
121
+
122
+ # mkdocs documentation
123
+ /site
124
+
125
+ # mypy
126
+ .mypy_cache/
127
+ .dmypy.json
128
+ dmypy.json
129
+
130
+ # Pyre type checker
131
+ .pyre/
132
+
133
+ # Poetry
134
+ poetry.lock
135
+
136
+ # Sphinx
137
+ docs/_build/
138
+ # sphinxnotes-any >= 2.5
139
+ docs/.any*
140
+
141
+ .worktrees/
@@ -0,0 +1,9 @@
1
+ # This file is generated from sphinx-notes/cookiecutter.
2
+
3
+ repos:
4
+ - repo: https://github.com/astral-sh/ruff-pre-commit
5
+ rev: v0.14.11
6
+ hooks:
7
+ - id: ruff-check
8
+ args: [ --fix ]
9
+ - id: ruff-format
@@ -0,0 +1,40 @@
1
+ <!-- This file is generated from sphinx-notes/cookiecutter. -->
2
+
3
+ ## 基本说明
4
+
5
+ 这是一个由 SphinxNotes 开发的 Sphinx Extension,由 `sphinxnotes/cookiecutter` 生成,很多基础文件来自模板。
6
+
7
+ ## 首先阅读
8
+
9
+ - 开始了解项目时,优先阅读 `docs/index.rst`。
10
+ - 如果任务和文档、Sphinx 配置或示例有关,继续阅读 `docs/` 下的其他文件
11
+
12
+ ## 通用知识
13
+
14
+ - 使用 `make` 会构建 `docs/` 下的文档,文档自依赖当前项目,因此文档构建成功也意味着项目基本能正常构建
15
+ - `docs/_build` 存放构建好的文档,`make clean` 清除所有构建结果
16
+ - `make test` 运行测试,测试位于 `tests/`,可能的 e2e 测试位于 `tests/test_e2e.py`
17
+ - `make doctest` 运行 Sphinx 文档测试
18
+ - `make install` 使用 `pip install --user` 将项目安装到本地,跨项目测试时常用
19
+ - `make tmpl-*` 用于模板同步,参看 "模板同步" 小节
20
+
21
+ ## 关于 SphinxNotes 项目
22
+
23
+ - 同为 `sphinxnotes` 项目的其他仓库通常位于当前项目的上一级目录
24
+ - 如果你在阅读代码时遇到本地依赖、模板来源或跨仓库复用关系,可以直接读取这些本地仓库文件,不必先猜测实现,也不必优先去远程搜索。
25
+ - 当我提到 "所有项目" 的时候,请从当前项目的上一级目录的 `cookiecutter/project-list.txt` 获取项目列表
26
+ - `docs/conf.py` 往往会直接从源码树导入当前项目,因此排查文档构建问题时,要同时检查运行时依赖和文档依赖。
27
+
28
+ ## 模板同步
29
+
30
+ - 先确认任务是当前项目问题,还是模板问题;如果是模板问题,优先在 `sphinxnotes/cookiecutter` 中修复。
31
+ - 模板变更完成后,优先使用 `make tmpl-update` 把改动同步回项目,而不是手工重复修改生成文件。
32
+ - 如果 `make tmpl-update` 产生 `.rej`、冲突或三方合并失败,优先尝试 `make tmpl-apply-rej`,再手工解决冲突。
33
+ - 手工解决冲突时,重点检查 `README.rst`、`pyproject.toml`、`.github/workflows/`、`docs/conf.py`、`docs/requirements.txt` 这些常见受影响文件。
34
+ - 当模板同步结果确认无误后,优先使用 `make tmpl-update-done` 完成后续收尾步骤。
35
+
36
+ ### 修改约定
37
+
38
+ - 修改模板生成文件时,保留原有注释,除非模板本身已经统一移除了这些注释。
39
+ - 遇到 `CUSTOM ... START` / `END` 这类用户自定义区块时,必须保留这些锚点,并尽量保留区块中的用户内容。
40
+ - 如果模板更新和项目内手工修改发生冲突,优先保护用户自定义内容,再整理模板变更。
@@ -1,6 +1,6 @@
1
1
  BSD 3-Clause License
2
2
 
3
- Copyright (c) 2021, Sphinx Notes
3
+ Copyright (c) 2025, Shengyu Zhang
4
4
  All rights reserved.
5
5
 
6
6
  Redistribution and use in source and binary forms, with or without
@@ -26,4 +26,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
26
  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
27
  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
28
  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,10 @@
1
+ # This file is generated from sphinx-notes/cookiecutter.
2
+
3
+ include LICENSE
4
+ include README.rst
5
+
6
+ recursive-include tests *
7
+ recursive-exclude * __pycache__
8
+ recursive-exclude * *.py[co]
9
+
10
+ recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif
@@ -0,0 +1,96 @@
1
+ # This file is generated from sphinx-notes/cookiecutter.
2
+
3
+ LANG = en_US.UTF-8
4
+
5
+ MAKE = make
6
+ PY = python3
7
+ RM = rm -rf
8
+ GIT = git
9
+ OPEN = xdg-open
10
+
11
+ .PHONY: docs
12
+ docs:
13
+ $(MAKE) -C docs/
14
+
15
+ .PHONY: view
16
+ view:
17
+ $(OPEN) docs/_build/html/index.html
18
+
19
+ .PHONY: clean
20
+ clean:
21
+ $(MAKE) -C docs/ clean; $(RM) dist/
22
+
23
+ .PHONY: fmt
24
+ fmt:
25
+ ruff format src/ tests/ && ruff check --fix src/ tests/
26
+
27
+ .PHONY: test
28
+ test:
29
+ $(PY) -m pytest tests/ -v
30
+
31
+ .PHONY: doctest
32
+ doctest:
33
+ $(MAKE) doctest -C docs/
34
+
35
+ ################################################################################
36
+ # Distribution Package
37
+ ################################################################################
38
+
39
+ # Build distribution package, for "install" or "upload".
40
+ .PHONY: dist
41
+ dist: pyproject.toml clean
42
+ # Use ``--no-isolation`` to prevent network accessing when in local env.
43
+ $(PY) -m build $(if $(CI),,--no-isolation)
44
+
45
+ # Install distribution package to user directory.
46
+ #
47
+ # NOTE: It may breaks your system-level packages, use at your own risk.
48
+ .PHONY: install
49
+ install: dist
50
+ export PIP_BREAK_SYSTEM_PACKAGES=1 # required by Python 3.11+, see PEP-668
51
+ $(PY) -m pip install --user --no-deps --force-reinstall dist/*.whl
52
+
53
+ # Publish wheel to PyPI offical server <https://pypi.org/> when you want to
54
+ # You should have a PyPI account and have PyPI token configured.
55
+ #
56
+ # See also https://packaging.python.org/en/latest/tutorials/packaging-projects/#uploading-the-distribution-archives
57
+ .PHONY: upload
58
+ upload: dist
59
+ $(PY) -m twine upload --repository pypi $</*
60
+
61
+ ################################################################################
62
+ # Cookiecutter Incremental Updates
63
+ ################################################################################
64
+
65
+ # Keep up to date with the latest template.
66
+ # See https://github.com/sphinx-notes/cookiecutter.
67
+ .PHONY: tmpl-update tmpl-update-done tmpl-apply-rej
68
+
69
+ tmpl-update:
70
+ $(PY) -m cruft update
71
+
72
+ tmpl-update-done:
73
+ $(GIT) commit -m "chore: Update project template to sphinx-notes/cookiecutter@$(shell jq -r '.commit' .cruft.json | head -c8)"
74
+
75
+ tmpl-apply-rej:
76
+ @for rej in $$(find . -name '*.rej'); do \
77
+ echo "applying $$rej..."; \
78
+ wiggle --replace $${rej%.rej} $$rej; \
79
+ done
80
+
81
+ # Update project version.
82
+ .PHONY: bump-version bump-version-done
83
+
84
+ bump-version:
85
+ @echo -n "Please enter the version to bump: "
86
+ @read version && $(PY) -m cruft update --variables-to-update "{ \"version\" : \"$$version\" }"
87
+
88
+ bump-version-done:
89
+ VERSION=$(shell jq -r '.context.cookiecutter.version' .cruft.json); \
90
+ $(GIT) commit -m "chore: Bump version to $$VERSION"; \
91
+ $(GIT) tag $$VERSION
92
+
93
+
94
+ ################################################################################
95
+ # CUSTOM TARGETS
96
+ ################################################################################
@@ -0,0 +1,69 @@
1
+ Metadata-Version: 2.4
2
+ Name: sphinxnotes-recentupdate
3
+ Version: 2.0a0
4
+ Summary: Get the document update information from git and display it in Sphinx documentation
5
+ Author: Shengyu Zhang
6
+ Maintainer: Shengyu Zhang
7
+ License-Expression: BSD-3-Clause
8
+ Project-URL: homepage, https://sphinx.silverrainz.me/recentupdate
9
+ Project-URL: documentation, https://sphinx.silverrainz.me/recentupdate
10
+ Project-URL: repository, https://github.com/sphinx-notes/recentupdate
11
+ Project-URL: changelog, https://sphinx.silverrainz.me/recentupdate/changelog.html
12
+ Project-URL: tracker, https://github.com/sphinx-notes/recentupdate/issues
13
+ Keywords: sphinx,extension,documentation,sphinxnotes
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Environment :: Plugins
16
+ Classifier: Framework :: Sphinx
17
+ Classifier: Framework :: Sphinx :: Extension
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Topic :: Documentation
22
+ Classifier: Topic :: Documentation :: Sphinx
23
+ Requires-Python: >=3.12
24
+ Description-Content-Type: text/x-rst
25
+ License-File: LICENSE
26
+ Requires-Dist: Sphinx>=7.0
27
+ Requires-Dist: GitPython
28
+ Requires-Dist: sphinxnotes-render
29
+ Provides-Extra: dev
30
+ Requires-Dist: build; extra == "dev"
31
+ Requires-Dist: twine; extra == "dev"
32
+ Requires-Dist: cruft; extra == "dev"
33
+ Requires-Dist: ruff>=0.11.10; extra == "dev"
34
+ Requires-Dist: pre-commit; extra == "dev"
35
+ Provides-Extra: test
36
+ Requires-Dist: pytest; extra == "test"
37
+ Dynamic: license-file
38
+
39
+ .. This file is generated from sphinx-notes/cookiecutter.
40
+
41
+ ========================
42
+ sphinxnotes-recentupdate
43
+ ========================
44
+
45
+ .. |docs| image:: https://img.shields.io/github/deployments/sphinx-notes/recentupdate/github-pages
46
+ :target: https://sphinx.silverrainz.me/recentupdate
47
+ :alt: Documentation Status
48
+ .. |license| image:: https://img.shields.io/github/license/sphinx-notes/recentupdate
49
+ :target: https://github.com/sphinx-notes/recentupdate/blob/master/LICENSE
50
+ :alt: Open Source License
51
+ .. |pypi| image:: https://img.shields.io/pypi/v/sphinxnotes-recentupdate.svg
52
+ :target: https://pypi.python.org/pypi/sphinxnotes-recentupdate
53
+ :alt: PyPI Package
54
+ .. |download| image:: https://img.shields.io/pypi/dm/sphinxnotes-recentupdate
55
+ :target: https://pypistats.org/packages/sphinxnotes-recentupdate
56
+ :alt: PyPI Package Downloads
57
+
58
+ |docs| |license| |pypi| |download|
59
+
60
+ Get the document update information from git and display it in Sphinx documentation.
61
+
62
+ .. INTRODUCTION START
63
+ (MUST written in standard reStructuredText, without Sphinx stuff)
64
+
65
+ .. INTRODUCTION END
66
+
67
+ Please refer to Documentation_ for more details.
68
+
69
+ .. _Documentation: https://sphinx.silverrainz.me/recentupdate
@@ -0,0 +1,31 @@
1
+ .. This file is generated from sphinx-notes/cookiecutter.
2
+
3
+ ========================
4
+ sphinxnotes-recentupdate
5
+ ========================
6
+
7
+ .. |docs| image:: https://img.shields.io/github/deployments/sphinx-notes/recentupdate/github-pages
8
+ :target: https://sphinx.silverrainz.me/recentupdate
9
+ :alt: Documentation Status
10
+ .. |license| image:: https://img.shields.io/github/license/sphinx-notes/recentupdate
11
+ :target: https://github.com/sphinx-notes/recentupdate/blob/master/LICENSE
12
+ :alt: Open Source License
13
+ .. |pypi| image:: https://img.shields.io/pypi/v/sphinxnotes-recentupdate.svg
14
+ :target: https://pypi.python.org/pypi/sphinxnotes-recentupdate
15
+ :alt: PyPI Package
16
+ .. |download| image:: https://img.shields.io/pypi/dm/sphinxnotes-recentupdate
17
+ :target: https://pypistats.org/packages/sphinxnotes-recentupdate
18
+ :alt: PyPI Package Downloads
19
+
20
+ |docs| |license| |pypi| |download|
21
+
22
+ Get the document update information from git and display it in Sphinx documentation.
23
+
24
+ .. INTRODUCTION START
25
+ (MUST written in standard reStructuredText, without Sphinx stuff)
26
+
27
+ .. INTRODUCTION END
28
+
29
+ Please refer to Documentation_ for more details.
30
+
31
+ .. _Documentation: https://sphinx.silverrainz.me/recentupdate
@@ -1,10 +1,10 @@
1
+ # This file is generated from sphinx-notes/cookiecutter.
2
+
1
3
  # Minimal makefile for Sphinx documentation
2
- #
3
4
 
4
- # You can set these variables from the command line, and also
5
- # from the environment for the first two.
6
- SPHINXOPTS ?=
7
- SPHINXBUILD ?= sphinx-build
5
+ # You can set these variables from the command line.
6
+ SPHINXOPTS =
7
+ SPHINXBUILD = python3 -msphinx
8
8
  SOURCEDIR = .
9
9
  BUILDDIR = _build
10
10
 
@@ -0,0 +1 @@
1
+ # This file is generated from sphinx-notes/cookiecutter.
@@ -0,0 +1 @@
1
+ # This file is generated from sphinx-notes/cookiecutter.
@@ -0,0 +1,10 @@
1
+ /* This file is generated from sphinx-notes/cookiecutter.
2
+ * DO NOT EDIT.
3
+ */
4
+
5
+ /* Missing style for nodes.system_message from Alabaster. */
6
+ .system-message {
7
+ background-color: #fda;
8
+ padding: 5px;
9
+ border: 3px solid red;
10
+ }
@@ -0,0 +1,57 @@
1
+ .. This file is generated from sphinx-notes/cookiecutter.
2
+
3
+ ==========
4
+ Change Log
5
+ ==========
6
+
7
+ .. hint:: You may want to learn about our `Release Strategy`__
8
+
9
+ __ https://sphinx.silverrainz.me/release.html
10
+
11
+ .. Example:
12
+
13
+ 1.0
14
+ ===
15
+
16
+ .. version:: _
17
+ :date: yyyy-mm-dd
18
+
19
+ Change log here.
20
+
21
+ Version 2.x
22
+ ===========
23
+
24
+ .. version:: 2.0
25
+ :break:
26
+
27
+ - The template feature is now provided by
28
+ :external+render:doc:`sphinxnotes-render <index>`. It offers richer features;
29
+ Please see :external+render:doc:`tmpl`
30
+ - The extension now provides a ``recentupdate`` extra context for replacing
31
+ the ``.. recentupdate::`` directive. See :doc:`usage` for more details
32
+
33
+ BREAKING CHANGES:
34
+
35
+ - Drop the ``.. recentupdate::`` directive
36
+ - Drop the ``strftime`` and ``roles`` filters
37
+ - Drop the ``recentupdate_date_format``, ``recentupdate_template``, and
38
+ ``recentupdate_exclude_path`` confvals
39
+ - The members of :py:class:`~sphinxnotes.recentupdate.Revision` are renamed
40
+
41
+ Version 1.x
42
+ ===========
43
+
44
+ .. version:: 1.1
45
+ :date: 2025-10-30
46
+
47
+ - fix: Deal with case when sphinx srcdir != git workdir
48
+
49
+ .. version:: 1.0
50
+ :date: 2025-10-17
51
+
52
+ First stable version after five years :-)
53
+
54
+ .. version:: 1.0a0
55
+ :date: 2021-12-06
56
+
57
+ Release alpha version.