mkdocs-document-dates 3.8.5__tar.gz → 3.8.6__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.
- {mkdocs_document_dates-3.8.5/mkdocs_document_dates.egg-info → mkdocs_document_dates-3.8.6}/PKG-INFO +1 -1
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/plugin.py +6 -2
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/utils.py +14 -4
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6/mkdocs_document_dates.egg-info}/PKG-INFO +1 -1
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/pyproject.toml +1 -1
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/setup.py +1 -1
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/LICENSE +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/MANIFEST.in +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/README.md +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/__init__.py +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/cache_manager.py +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/hooks/pre-commit +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/hooks_installer.py +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/.DS_Store +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/config/config.css +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/config/config.js +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/core/core.css +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/core/core.js +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/core/default.config.js +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/core/md5.min.js +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/core/timeago.full.min.js +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/core/timeago.min.js +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/core/utils.js +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/fonts/material-icons.css +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/fonts/materialicons.woff2 +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/templates/recently_updated_detail.html +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/templates/recently_updated_grid.html +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/templates/recently_updated_group.html +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/templates/recently_updated_list.html +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/tippy/backdrop.css +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/tippy/light.css +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/tippy/material.css +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/tippy/popper.min.js +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/tippy/scale.css +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/tippy/shift-away.css +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/tippy/tippy.css +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/tippy/tippy.umd.min.js +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates.egg-info/SOURCES.txt +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates.egg-info/dependency_links.txt +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates.egg-info/entry_points.txt +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates.egg-info/requires.txt +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates.egg-info/top_level.txt +0 -0
- {mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/setup.cfg +0 -0
{mkdocs_document_dates-3.8.5/mkdocs_document_dates.egg-info → mkdocs_document_dates-3.8.6}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mkdocs-document-dates
|
|
3
|
-
Version: 3.8.
|
|
3
|
+
Version: 3.8.6
|
|
4
4
|
Summary: A new generation MkDocs plugin for displaying exact creation date, last updated date, authors, email of documents
|
|
5
5
|
Author-email: Aaron Wang <aaronwqt@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -189,10 +189,14 @@ class DocumentDatesPlugin(BasePlugin):
|
|
|
189
189
|
# 检查是否需要排除
|
|
190
190
|
if is_excluded(rel_path, self._exclude_patterns):
|
|
191
191
|
return markdown
|
|
192
|
-
|
|
192
|
+
|
|
193
|
+
# 增强鲁棒性,碰到异常数据提前返回
|
|
194
|
+
if not created or not updated:
|
|
195
|
+
return markdown
|
|
196
|
+
|
|
193
197
|
# 生成日期和作者信息 HTML
|
|
194
198
|
info_html = self._generate_html_info(page.meta, created, updated, authors)
|
|
195
|
-
|
|
199
|
+
|
|
196
200
|
# 将信息写入 markdown
|
|
197
201
|
return self._insert_date_info(markdown, info_html)
|
|
198
202
|
|
|
@@ -128,8 +128,13 @@ def load_git_metadata(docs_dir_path: Path):
|
|
|
128
128
|
['git', 'rev-parse', '--show-toplevel'],
|
|
129
129
|
cwd=docs_dir_path, encoding='utf-8'
|
|
130
130
|
).strip())
|
|
131
|
-
rel_docs_path = docs_dir_path.relative_to(git_root)
|
|
131
|
+
rel_docs_path = docs_dir_path.relative_to(git_root)
|
|
132
132
|
|
|
133
|
+
relative_arg = (
|
|
134
|
+
'--relative'
|
|
135
|
+
if rel_docs_path == Path('.')
|
|
136
|
+
else f'--relative={rel_docs_path.as_posix()}'
|
|
137
|
+
)
|
|
133
138
|
cmd = [
|
|
134
139
|
'git',
|
|
135
140
|
'-c', 'core.quotepath=false',
|
|
@@ -140,7 +145,7 @@ def load_git_metadata(docs_dir_path: Path):
|
|
|
140
145
|
'--name-only',
|
|
141
146
|
'-z',
|
|
142
147
|
'--format=%aN%x1f%aE%x1f%at%x1f%B%x00',
|
|
143
|
-
|
|
148
|
+
relative_arg,
|
|
144
149
|
'--',
|
|
145
150
|
'*.md'
|
|
146
151
|
]
|
|
@@ -192,9 +197,14 @@ def load_git_last_updated_dates(docs_dir_path: Path):
|
|
|
192
197
|
['git', 'rev-parse', '--show-toplevel'],
|
|
193
198
|
cwd=docs_dir_path, encoding='utf-8'
|
|
194
199
|
).strip())
|
|
195
|
-
rel_docs_path = docs_dir_path.relative_to(git_root)
|
|
200
|
+
rel_docs_path = docs_dir_path.relative_to(git_root)
|
|
196
201
|
|
|
197
|
-
|
|
202
|
+
relative_arg = (
|
|
203
|
+
'--relative'
|
|
204
|
+
if rel_docs_path == Path('.')
|
|
205
|
+
else f'--relative={rel_docs_path.as_posix()}'
|
|
206
|
+
)
|
|
207
|
+
cmd = ['git', '-c', 'core.quotepath=false', 'log', '--no-merges', '--use-mailmap', '--format=%aN|%aE|%at', '--name-only', relative_arg, '--', '*.md']
|
|
198
208
|
process = subprocess.run(cmd, cwd=docs_dir_path, capture_output=True, encoding='utf-8')
|
|
199
209
|
if process.returncode == 0:
|
|
200
210
|
result = subprocess.run(
|
{mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6/mkdocs_document_dates.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mkdocs-document-dates
|
|
3
|
-
Version: 3.8.
|
|
3
|
+
Version: 3.8.6
|
|
4
4
|
Summary: A new generation MkDocs plugin for displaying exact creation date, last updated date, authors, email of documents
|
|
5
5
|
Author-email: Aaron Wang <aaronwqt@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "mkdocs-document-dates"
|
|
7
|
-
version = "3.8.
|
|
7
|
+
version = "3.8.6"
|
|
8
8
|
description = "A new generation MkDocs plugin for displaying exact creation date, last updated date, authors, email of documents"
|
|
9
9
|
readme = { file = "README.md", content-type = "text/markdown" }
|
|
10
10
|
requires-python = ">=3.7"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/__init__.py
RENAMED
|
File without changes
|
{mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/cache_manager.py
RENAMED
|
File without changes
|
{mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/hooks/pre-commit
RENAMED
|
File without changes
|
{mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/hooks_installer.py
RENAMED
|
File without changes
|
{mkdocs_document_dates-3.8.5 → mkdocs_document_dates-3.8.6}/mkdocs_document_dates/static/.DS_Store
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|