sphinxnotes-recentupdate 1.1__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.
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/.cruft.json +4 -2
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/.gitignore +4 -0
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/.pre-commit-config.yaml +3 -1
- sphinxnotes_recentupdate-2.0a0/AGENTS.md +40 -0
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/MANIFEST.in +0 -1
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/Makefile +8 -4
- {sphinxnotes_recentupdate-1.1/src/sphinxnotes_recentupdate.egg-info → sphinxnotes_recentupdate-2.0a0}/PKG-INFO +2 -13
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/README.rst +0 -1
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/docs/Makefile +0 -1
- sphinxnotes_recentupdate-2.0a0/docs/_images/.gitkeep +1 -0
- sphinxnotes_recentupdate-2.0a0/docs/_static/.gitkeep +1 -0
- sphinxnotes_recentupdate-2.0a0/docs/_static/custom.css +10 -0
- sphinxnotes_recentupdate-2.0a0/docs/changelog.rst +57 -0
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/docs/conf.py +29 -14
- sphinxnotes_recentupdate-2.0a0/docs/conf.rst +14 -0
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/docs/index.rst +24 -11
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/docs/make.bat +38 -37
- sphinxnotes_recentupdate-2.0a0/docs/requirements.txt +16 -0
- sphinxnotes_recentupdate-2.0a0/docs/usage.rst +104 -0
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/pyproject.toml +1 -18
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/ruff.toml +0 -1
- sphinxnotes_recentupdate-2.0a0/src/sphinxnotes/recentupdate/__init__.py +199 -0
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/src/sphinxnotes/recentupdate/meta.py +7 -3
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0/src/sphinxnotes_recentupdate.egg-info}/PKG-INFO +2 -13
- sphinxnotes_recentupdate-2.0a0/src/sphinxnotes_recentupdate.egg-info/SOURCES.txt +85 -0
- sphinxnotes_recentupdate-2.0a0/src/sphinxnotes_recentupdate.egg-info/requires.txt +13 -0
- sphinxnotes_recentupdate-2.0a0/tests/__init__.py +1 -0
- sphinxnotes_recentupdate-2.0a0/tests/conftest.py +28 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/HEAD +1 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/config +8 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/index +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/objects/26/c00b1dd5cd359d8382b2c6246294ba231eaf92 +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/objects/b4/a82ac0751e8d909d8670aa0fe02dba3a11bdc5 +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/objects/b7/7dd9ea96d34a54ef2cf7b9bd59e14f63ceef7d +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/objects/cd/1ba0f8ba01eea82d97fa16b1b456475223021a +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/objects/e4/4d8b53484c14d71d04634227cf3056702fedba +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/objects/ee/c732375bfef2b30f4c0e4ffaf3f199d7ebb0ba +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/.gitdata/refs/heads/master +1 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/conf.py +6 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-basic/index.rst +9 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/HEAD +1 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/config +8 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/index +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/objects/15/a4e25051f662390b66207b69833a94634a0bfa +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/objects/27/e53c961766c5041a140df1ddaa3183e242e33c +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/objects/4f/b0f4b09d543a7b1e0b354e5e5a6e41321571e1 +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/objects/56/7c8f9d76bb5413f145125669003cf9b180dd3f +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/objects/b5/f7ed01b3a40d20334eb87224272bc81afbaf08 +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/objects/b7/7dd9ea96d34a54ef2cf7b9bd59e14f63ceef7d +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/objects/d7/049ba58051d12dd2af975c67c647f68c78914f +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/objects/ee/c732375bfef2b30f4c0e4ffaf3f199d7ebb0ba +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/objects/fa/070a00b6d14b0a04058758a59ec5b8b58de778 +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/.gitdata/refs/heads/master +1 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/conf.py +6 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/index.rst +11 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-current-doc/other.rst +2 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/HEAD +1 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/config +8 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/index +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/19/d82f92368b7a52ad5e72276af9cb24890fc373 +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/27/e53c961766c5041a140df1ddaa3183e242e33c +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/2c/2a251c2bef177436e16be0fda970aab89f8c56 +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/3b/54729640c355750dfe1e24bbdf6821c7d01221 +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/49/25b645377c0558f6d4913f3430f1391f4005a7 +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/5f/b4f79896fd76af2d17c630447fcaf650aa6e1c +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/8e/19dfa64d98848299c52bbab92e687a3b9d660a +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/9d/3e74f1cb019cb379b2f3faf5331173127fc783 +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/b1/62b1e17c275288464ffbe285aad358b99c912a +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/b7/7dd9ea96d34a54ef2cf7b9bd59e14f63ceef7d +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/objects/c1/ac64c024d69c348a1ad6b742ff57cc62193406 +0 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/.gitdata/refs/heads/master +1 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/conf.py +6 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/index.rst +9 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/other.rst +2 -0
- sphinxnotes_recentupdate-2.0a0/tests/roots/test-recentupdate-path-filter/subdir/doc.rst +2 -0
- sphinxnotes_recentupdate-2.0a0/tests/test_always_pass.py +9 -0
- sphinxnotes_recentupdate-2.0a0/tests/test_e2e.py +40 -0
- sphinxnotes_recentupdate-1.1/docs/_images/.gitkeep +0 -0
- sphinxnotes_recentupdate-1.1/docs/_static/.gitkeep +0 -0
- sphinxnotes_recentupdate-1.1/docs/changelog.rst +0 -38
- sphinxnotes_recentupdate-1.1/docs/conf.rst +0 -56
- sphinxnotes_recentupdate-1.1/docs/usage.rst +0 -65
- sphinxnotes_recentupdate-1.1/src/sphinxnotes/recentupdate/__init__.py +0 -276
- sphinxnotes_recentupdate-1.1/src/sphinxnotes_recentupdate.egg-info/SOURCES.txt +0 -31
- sphinxnotes_recentupdate-1.1/src/sphinxnotes_recentupdate.egg-info/requires.txt +0 -24
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/.github/workflows/lint.yml +0 -0
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/.github/workflows/pages.yml +0 -0
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/.github/workflows/pypi.yml +0 -0
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/.github/workflows/release.yml +0 -0
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/LICENSE +0 -0
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/docs/_static/sphinx-notes.png +0 -0
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/setup.cfg +0 -0
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/src/sphinxnotes/recentupdate/py.typed +0 -0
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/src/sphinxnotes_recentupdate.egg-info/dependency_links.txt +0 -0
- {sphinxnotes_recentupdate-1.1 → sphinxnotes_recentupdate-2.0a0}/src/sphinxnotes_recentupdate.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"template": "https://github.com/sphinx-notes/cookiecutter",
|
|
3
|
-
"commit": "
|
|
3
|
+
"commit": "233a8daa4e276a9559975a51178f29e7079dcafd",
|
|
4
4
|
"checkout": null,
|
|
5
5
|
"context": {
|
|
6
6
|
"cookiecutter": {
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
"version": "1.1",
|
|
13
13
|
"github_owner": "sphinx-notes",
|
|
14
14
|
"github_repo": "recentupdate",
|
|
15
|
+
"generated_file_header": "This file is generated from sphinx-notes/cookiecutter.",
|
|
16
|
+
"dont_edit_header": "DO NOT EDIT.",
|
|
15
17
|
"pypi_name": "sphinxnotes-recentupdate",
|
|
16
18
|
"pypi_owner": "SilverRainZ",
|
|
17
19
|
"is_python_project": true,
|
|
@@ -20,7 +22,7 @@
|
|
|
20
22
|
"sphinx_version": "7.0",
|
|
21
23
|
"development_status": "3 - Alpha",
|
|
22
24
|
"_template": "https://github.com/sphinx-notes/cookiecutter",
|
|
23
|
-
"_commit": "
|
|
25
|
+
"_commit": "233a8daa4e276a9559975a51178f29e7079dcafd"
|
|
24
26
|
}
|
|
25
27
|
},
|
|
26
28
|
"directory": null
|
|
@@ -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,5 +1,4 @@
|
|
|
1
1
|
# This file is generated from sphinx-notes/cookiecutter.
|
|
2
|
-
# You need to consider modifying the TEMPLATE or modifying THIS FILE.
|
|
3
2
|
|
|
4
3
|
LANG = en_US.UTF-8
|
|
5
4
|
|
|
@@ -23,11 +22,15 @@ clean:
|
|
|
23
22
|
|
|
24
23
|
.PHONY: fmt
|
|
25
24
|
fmt:
|
|
26
|
-
ruff format src/ && ruff check --fix src/
|
|
25
|
+
ruff format src/ tests/ && ruff check --fix src/ tests/
|
|
27
26
|
|
|
28
27
|
.PHONY: test
|
|
29
28
|
test:
|
|
30
|
-
$(PY) -m
|
|
29
|
+
$(PY) -m pytest tests/ -v
|
|
30
|
+
|
|
31
|
+
.PHONY: doctest
|
|
32
|
+
doctest:
|
|
33
|
+
$(MAKE) doctest -C docs/
|
|
31
34
|
|
|
32
35
|
################################################################################
|
|
33
36
|
# Distribution Package
|
|
@@ -36,7 +39,8 @@ test:
|
|
|
36
39
|
# Build distribution package, for "install" or "upload".
|
|
37
40
|
.PHONY: dist
|
|
38
41
|
dist: pyproject.toml clean
|
|
39
|
-
|
|
42
|
+
# Use ``--no-isolation`` to prevent network accessing when in local env.
|
|
43
|
+
$(PY) -m build $(if $(CI),,--no-isolation)
|
|
40
44
|
|
|
41
45
|
# Install distribution package to user directory.
|
|
42
46
|
#
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sphinxnotes-recentupdate
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0a0
|
|
4
4
|
Summary: Get the document update information from git and display it in Sphinx documentation
|
|
5
5
|
Author: Shengyu Zhang
|
|
6
6
|
Maintainer: Shengyu Zhang
|
|
@@ -25,7 +25,7 @@ Description-Content-Type: text/x-rst
|
|
|
25
25
|
License-File: LICENSE
|
|
26
26
|
Requires-Dist: Sphinx>=7.0
|
|
27
27
|
Requires-Dist: GitPython
|
|
28
|
-
Requires-Dist:
|
|
28
|
+
Requires-Dist: sphinxnotes-render
|
|
29
29
|
Provides-Extra: dev
|
|
30
30
|
Requires-Dist: build; extra == "dev"
|
|
31
31
|
Requires-Dist: twine; extra == "dev"
|
|
@@ -34,20 +34,9 @@ Requires-Dist: ruff>=0.11.10; extra == "dev"
|
|
|
34
34
|
Requires-Dist: pre-commit; extra == "dev"
|
|
35
35
|
Provides-Extra: test
|
|
36
36
|
Requires-Dist: pytest; extra == "test"
|
|
37
|
-
Provides-Extra: docs
|
|
38
|
-
Requires-Dist: furo; extra == "docs"
|
|
39
|
-
Requires-Dist: sphinx_design; extra == "docs"
|
|
40
|
-
Requires-Dist: sphinx_copybutton; extra == "docs"
|
|
41
|
-
Requires-Dist: sphinxcontrib-gtagjs; extra == "docs"
|
|
42
|
-
Requires-Dist: sphinx-sitemap; extra == "docs"
|
|
43
|
-
Requires-Dist: sphinxext-opengraph; extra == "docs"
|
|
44
|
-
Requires-Dist: sphinx-last-updated-by-git; extra == "docs"
|
|
45
|
-
Requires-Dist: sphinxnotes-project; extra == "docs"
|
|
46
|
-
Requires-Dist: sphinxnotes-comboroles; extra == "docs"
|
|
47
37
|
Dynamic: license-file
|
|
48
38
|
|
|
49
39
|
.. This file is generated from sphinx-notes/cookiecutter.
|
|
50
|
-
You need to consider modifying the TEMPLATE or modifying THIS FILE.
|
|
51
40
|
|
|
52
41
|
========================
|
|
53
42
|
sphinxnotes-recentupdate
|
|
@@ -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,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.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# This file is generated from sphinx-notes/cookiecutter.
|
|
2
|
-
# You need to consider modifying the TEMPLATE or modifying THIS FILE.
|
|
3
2
|
|
|
4
3
|
# Configuration file for the Sphinx documentation builder.
|
|
5
4
|
#
|
|
@@ -23,6 +22,8 @@ version = release = '1.1'
|
|
|
23
22
|
# ones.
|
|
24
23
|
extensions = [
|
|
25
24
|
'sphinx.ext.githubpages',
|
|
25
|
+
'sphinx.ext.doctest',
|
|
26
|
+
'sphinx.ext.viewcode',
|
|
26
27
|
'sphinx_design',
|
|
27
28
|
'sphinx_copybutton',
|
|
28
29
|
'sphinx_last_updated_by_git',
|
|
@@ -45,6 +46,9 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
|
|
45
46
|
# produce any output in the built files.
|
|
46
47
|
show_authors = True
|
|
47
48
|
|
|
49
|
+
# Keep warnings as “system message” paragraphs in the rendered documents.
|
|
50
|
+
keep_warnings = True
|
|
51
|
+
|
|
48
52
|
# -- Options for HTML output -------------------------------------------------
|
|
49
53
|
|
|
50
54
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
@@ -52,12 +56,6 @@ show_authors = True
|
|
|
52
56
|
#
|
|
53
57
|
html_theme = 'furo'
|
|
54
58
|
|
|
55
|
-
html_theme_options = {}
|
|
56
|
-
|
|
57
|
-
# Add any paths that contain custom static files (such as style sheets) here,
|
|
58
|
-
# relative to this directory. They are copied after the builtin static files,
|
|
59
|
-
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
60
|
-
html_static_path = ['_static']
|
|
61
59
|
html_theme_options = {
|
|
62
60
|
"source_repository": "https://github.com/sphinx-notes/recentupdate/",
|
|
63
61
|
"source_branch": "master",
|
|
@@ -70,6 +68,13 @@ html_baseurl = 'https://sphinx.silverrainz.me/recentupdate'
|
|
|
70
68
|
|
|
71
69
|
html_logo = html_favicon = '_static/sphinx-notes.png'
|
|
72
70
|
|
|
71
|
+
# Add any paths that contain custom static files (such as style sheets) here,
|
|
72
|
+
# relative to this directory. They are copied after the builtin static files,
|
|
73
|
+
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
74
|
+
html_static_path = ['_static']
|
|
75
|
+
|
|
76
|
+
html_css_files = ['custom.css']
|
|
77
|
+
|
|
73
78
|
# -- Extensions -------------------------------------------------------------
|
|
74
79
|
|
|
75
80
|
extensions.append('sphinx.ext.extlinks')
|
|
@@ -85,13 +90,12 @@ gtagjs_ids = ['G-E4SNX0WZYV']
|
|
|
85
90
|
extensions.append('sphinx.ext.autodoc')
|
|
86
91
|
autoclass_content = 'init'
|
|
87
92
|
autodoc_typehints = 'description'
|
|
93
|
+
autodoc_default_options = {
|
|
94
|
+
'member-order': 'bysource',
|
|
95
|
+
}
|
|
88
96
|
|
|
89
97
|
extensions.append('sphinx.ext.intersphinx')
|
|
90
|
-
intersphinx_mapping = {
|
|
91
|
-
'python': ('https://docs.python.org/3', None),
|
|
92
|
-
'sphinx': ('https://www.sphinx-doc.org/en/master', None),
|
|
93
|
-
'jinja': ('https://jinja.palletsprojects.com/en/latest/', None),
|
|
94
|
-
}
|
|
98
|
+
intersphinx_mapping = {}
|
|
95
99
|
|
|
96
100
|
extensions.append('sphinx_sitemap')
|
|
97
101
|
sitemap_filename = "sitemap.xml"
|
|
@@ -107,6 +111,7 @@ comboroles_roles = {
|
|
|
107
111
|
'parsed_literal': (['literal'], True),
|
|
108
112
|
}
|
|
109
113
|
|
|
114
|
+
|
|
110
115
|
extensions.append('sphinxnotes.project')
|
|
111
116
|
primary_domain = 'any'
|
|
112
117
|
|
|
@@ -117,7 +122,17 @@ primary_domain = 'any'
|
|
|
117
122
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
118
123
|
import os
|
|
119
124
|
import sys
|
|
120
|
-
sys.path.insert(0, os.path.abspath('../src/
|
|
121
|
-
extensions.append('recentupdate')
|
|
125
|
+
sys.path.insert(0, os.path.abspath('../src/'))
|
|
126
|
+
extensions.append('sphinxnotes.recentupdate')
|
|
122
127
|
|
|
123
128
|
# CUSTOM CONFIGURATION
|
|
129
|
+
|
|
130
|
+
intersphinx_mapping['render'] = ('https://sphinx.silverrainz.me/render', None)
|
|
131
|
+
|
|
132
|
+
extensions.append('sphinxnotes.render.ext')
|
|
133
|
+
|
|
134
|
+
manpages_url = 'https://manpages.debian.org/{path}'
|
|
135
|
+
|
|
136
|
+
autodoc_typehints = 'signature'
|
|
137
|
+
|
|
138
|
+
project_example_style = 'stack'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
=============
|
|
2
|
+
Configuration
|
|
3
|
+
=============
|
|
4
|
+
|
|
5
|
+
The extension provides the following configuration:
|
|
6
|
+
|
|
7
|
+
.. autoconfval:: recentupdate_exclude_commit
|
|
8
|
+
|
|
9
|
+
A list of commit message pattern that should be excluded when looking for file changes.
|
|
10
|
+
|
|
11
|
+
.. autoconfval:: recentupdate_count
|
|
12
|
+
|
|
13
|
+
Number of recent revisions to return by default when calling
|
|
14
|
+
``load_extra('recentupdate')`` without an explicit ``count`` parameter.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
.. This file is generated from sphinx-notes/cookiecutter.
|
|
2
|
-
You need to consider modifying the TEMPLATE or modifying THIS FILE.
|
|
3
2
|
|
|
4
3
|
========================
|
|
5
4
|
sphinxnotes-recentupdate
|
|
@@ -28,12 +27,14 @@ Introduction
|
|
|
28
27
|
|
|
29
28
|
.. INTRODUCTION START
|
|
30
29
|
|
|
31
|
-
Get the document update information from
|
|
30
|
+
Get the Sphinx document update information from Git repository.
|
|
32
31
|
|
|
33
|
-
This
|
|
32
|
+
This extension integrates with :external+render:doc:`sphinxnotes-render <index>`
|
|
33
|
+
by providing an extra context ``recentupdate``. The recent document update
|
|
34
|
+
information is read from a Git_ repository. You can customize the presentation
|
|
35
|
+
via ``data.render`` template.
|
|
34
36
|
|
|
35
37
|
.. _Git: https://git-scm.com/
|
|
36
|
-
.. _Jinja: https://jinja.palletsprojects.com/en/3.0.x/templates/
|
|
37
38
|
|
|
38
39
|
.. INTRODUCTION END
|
|
39
40
|
|
|
@@ -59,22 +60,33 @@ Then, add the extension name to ``extensions`` configuration item in your
|
|
|
59
60
|
.. code-block:: python
|
|
60
61
|
|
|
61
62
|
extensions = [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
# …
|
|
64
|
+
'sphinxnotes.render.ext',
|
|
65
|
+
'sphinxnotes.recentupdate',
|
|
66
|
+
# …
|
|
67
|
+
]
|
|
66
68
|
|
|
67
69
|
.. _Getting Started with Sphinx: https://www.sphinx-doc.org/en/master/usage/quickstart.html
|
|
68
70
|
.. _conf.py: https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
69
71
|
|
|
70
72
|
.. ADDITIONAL CONTENT START
|
|
71
73
|
|
|
72
|
-
|
|
74
|
+
Now you can use the :rst:dir:`data.render` directive (provided by
|
|
75
|
+
``sphinxnotes.render.ext``) with ``recentupdate`` extra context to render
|
|
76
|
+
a revision list:
|
|
73
77
|
|
|
74
78
|
.. example::
|
|
75
|
-
:style: grid
|
|
76
79
|
|
|
77
|
-
..
|
|
80
|
+
.. data.render::
|
|
81
|
+
|
|
82
|
+
The most recent 3 commits:
|
|
83
|
+
|
|
84
|
+
{% for r in load_extra('recentupdate', 3) %}
|
|
85
|
+
``{{ r.date }}``
|
|
86
|
+
{{ r.message[0] }}
|
|
87
|
+
{% endfor %}
|
|
88
|
+
|
|
89
|
+
Please refer to :doc:`usage` for more details.
|
|
78
90
|
|
|
79
91
|
.. ADDITIONAL CONTENT END
|
|
80
92
|
|
|
@@ -98,6 +110,7 @@ as part of **The Sphinx Notes Project**.
|
|
|
98
110
|
:caption: The Sphinx Notes Project
|
|
99
111
|
|
|
100
112
|
Home <https://sphinx.silverrainz.me/>
|
|
113
|
+
GitHub <https://github.com/sphinx-notes>
|
|
101
114
|
Blog <https://silverrainz.me/blog/category/sphinx.html>
|
|
102
115
|
PyPI <https://pypi.org/search/?q=sphinxnotes>
|
|
103
116
|
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
REM This file is generated from sphinx-notes/cookiecutter.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
set
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
echo.
|
|
21
|
-
echo.
|
|
22
|
-
echo.
|
|
23
|
-
echo.
|
|
24
|
-
echo.
|
|
25
|
-
echo.
|
|
26
|
-
echo.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
1
|
+
REM This file is generated from sphinx-notes/cookiecutter.
|
|
2
|
+
REM DO NOT EDIT.
|
|
3
|
+
|
|
4
|
+
@ECHO OFF
|
|
5
|
+
|
|
6
|
+
pushd %~dp0
|
|
7
|
+
|
|
8
|
+
REM Command file for Sphinx documentation
|
|
9
|
+
|
|
10
|
+
if "%SPHINXBUILD%" == "" (
|
|
11
|
+
set SPHINXBUILD=python -msphinx
|
|
12
|
+
)
|
|
13
|
+
set SOURCEDIR=.
|
|
14
|
+
set BUILDDIR=_build
|
|
15
|
+
|
|
16
|
+
if "%1" == "" goto help
|
|
17
|
+
|
|
18
|
+
%SPHINXBUILD% >NUL 2>NUL
|
|
19
|
+
if errorlevel 9009 (
|
|
20
|
+
echo.
|
|
21
|
+
echo.The Sphinx module was not found. Make sure you have Sphinx installed,
|
|
22
|
+
echo.then set the SPHINXBUILD environment variable to point to the full
|
|
23
|
+
echo.path of the 'sphinx-build' executable. Alternatively you may add the
|
|
24
|
+
echo.Sphinx directory to PATH.
|
|
25
|
+
echo.
|
|
26
|
+
echo.If you don't have Sphinx installed, grab it from
|
|
27
|
+
echo.http://sphinx-doc.org/
|
|
28
|
+
exit /b 1
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
|
|
32
|
+
goto end
|
|
33
|
+
|
|
34
|
+
:help
|
|
35
|
+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
|
|
36
|
+
|
|
37
|
+
:end
|
|
38
|
+
popd
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# This file is generated from sphinx-notes/cookiecutter.
|
|
2
|
+
|
|
3
|
+
# Documentation build dependencies.
|
|
4
|
+
# Keep these out of pyproject optional-dependencies to avoid resolver issues.
|
|
5
|
+
furo
|
|
6
|
+
sphinx_copybutton
|
|
7
|
+
sphinxcontrib-gtagjs
|
|
8
|
+
sphinx-sitemap
|
|
9
|
+
sphinxext-opengraph
|
|
10
|
+
sphinx-last-updated-by-git
|
|
11
|
+
sphinxnotes-project
|
|
12
|
+
sphinxnotes-comboroles
|
|
13
|
+
|
|
14
|
+
# CUSTOM DOCS DEPENDENCIES START
|
|
15
|
+
sphinxnotes-render
|
|
16
|
+
# CUSTOM DOCS DEPENDENCIES END
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
=====
|
|
2
|
+
Usage
|
|
3
|
+
=====
|
|
4
|
+
|
|
5
|
+
The extension provides an extra context ``recentupdate`` for `sphinxnotes-render`_.
|
|
6
|
+
Extra context can be load by the :external+render:term:`load_extra` function in
|
|
7
|
+
a Jinja template. User can easily render a Jinja template via :rst:dir:`data.render`
|
|
8
|
+
directive.
|
|
9
|
+
|
|
10
|
+
``recentupdate``
|
|
11
|
+
================
|
|
12
|
+
|
|
13
|
+
When calling ``load_extra('recentupdate', **kwargs)`` in the template, the
|
|
14
|
+
following parameters are available:
|
|
15
|
+
|
|
16
|
+
``count``
|
|
17
|
+
Number of recent revisions to return (default from :confval:`recentupdate_count`).
|
|
18
|
+
|
|
19
|
+
``path``
|
|
20
|
+
A git pathspec (:manpage:`gitglossary(7)`) to filter file changes
|
|
21
|
+
(default ``'.'``).
|
|
22
|
+
See also :example:`Recent Updates of Custom Path`.
|
|
23
|
+
|
|
24
|
+
``current_doc``
|
|
25
|
+
If ``True``, only return revisions that modified the current document
|
|
26
|
+
(default ``False``).
|
|
27
|
+
See also :example:`Recent Updates to Current Document`.
|
|
28
|
+
|
|
29
|
+
Each item returned is a :py:class:`~sphinxnotes.recentupdate.Revision` object:
|
|
30
|
+
|
|
31
|
+
.. autoclass:: sphinxnotes.recentupdate.Revision
|
|
32
|
+
|
|
33
|
+
.. autoattribute:: message
|
|
34
|
+
.. autoattribute:: author
|
|
35
|
+
.. autoattribute:: date
|
|
36
|
+
.. autoattribute:: added_docs
|
|
37
|
+
.. autoattribute:: changed_docs
|
|
38
|
+
.. autoattribute:: removed_docs
|
|
39
|
+
|
|
40
|
+
This is a basic example:
|
|
41
|
+
|
|
42
|
+
.. example::
|
|
43
|
+
|
|
44
|
+
.. data.render::
|
|
45
|
+
|
|
46
|
+
{% for r in load_extra('recentupdate', count=5) %}
|
|
47
|
+
``👤{{ r.author }}`` @ ``📅 {{ r.date }}``
|
|
48
|
+
{{ r.message[0] }}
|
|
49
|
+
{% endfor %}
|
|
50
|
+
|
|
51
|
+
Examples
|
|
52
|
+
========
|
|
53
|
+
|
|
54
|
+
.. example:: Show Which Files Updated
|
|
55
|
+
|
|
56
|
+
.. data.render::
|
|
57
|
+
|
|
58
|
+
{% for r in load_extra('recentupdate', count=5) %}
|
|
59
|
+
``📅 {{ r.date }}``
|
|
60
|
+
{% if r.changed_docs -%}
|
|
61
|
+
:Modified: {{ r.changed_docs | roles("doc") | join(", ") }}
|
|
62
|
+
{% endif %}
|
|
63
|
+
{% if r.added_docs -%}
|
|
64
|
+
:Added: {{ r.added_docs | roles("doc") | join(", ") }}
|
|
65
|
+
{% endif %}
|
|
66
|
+
{% if r.removed_docs -%}
|
|
67
|
+
:Deleted: {{ r.removed_docs | join(", ") }}
|
|
68
|
+
{% endif %}
|
|
69
|
+
{% endfor %}
|
|
70
|
+
|
|
71
|
+
The aboved :external+render:term:`roles` filter is also provided by
|
|
72
|
+
`sphinxnotes-render`_.
|
|
73
|
+
|
|
74
|
+
.. example:: Recent Updates of Custom Path
|
|
75
|
+
|
|
76
|
+
.. data.render::
|
|
77
|
+
|
|
78
|
+
Recent changes of the ``docs/index.rst`` file:
|
|
79
|
+
|
|
80
|
+
{% for r in load_extra('recentupdate', count=5, path='docs/index.rst') %}
|
|
81
|
+
``{{ r.date }}`` — {{ r.message[0] }}
|
|
82
|
+
{% endfor %}
|
|
83
|
+
|
|
84
|
+
.. example:: Recent Updates to Current Document
|
|
85
|
+
|
|
86
|
+
.. data.render::
|
|
87
|
+
|
|
88
|
+
Recent changes to this document:
|
|
89
|
+
|
|
90
|
+
{% for r in load_extra('recentupdate', count=5, current_doc=True) %}
|
|
91
|
+
``{{ r.date }}`` — {{ r.message[0] }}
|
|
92
|
+
{% endfor %}
|
|
93
|
+
|
|
94
|
+
``sphinxnotes-render``
|
|
95
|
+
======================
|
|
96
|
+
|
|
97
|
+
For more details about ``sphinxnotes-render``:
|
|
98
|
+
|
|
99
|
+
.. seealso::
|
|
100
|
+
|
|
101
|
+
:external+render:doc:`sphinxnotes-render: Templating <tmpl>`
|
|
102
|
+
How to write ``data.render`` templates.
|
|
103
|
+
:external+render:doc:`sphinxnotes-render: Extending <ext>`
|
|
104
|
+
How extra context and filters work.
|