chisel 1.3.6__tar.gz → 1.3.7__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.
- {chisel-1.3.6/src/chisel.egg-info → chisel-1.3.7}/PKG-INFO +2 -2
- {chisel-1.3.6 → chisel-1.3.7}/setup.cfg +1 -1
- {chisel-1.3.6 → chisel-1.3.7}/src/chisel/doc.py +9 -2
- {chisel-1.3.6 → chisel-1.3.7/src/chisel.egg-info}/PKG-INFO +2 -2
- {chisel-1.3.6 → chisel-1.3.7}/LICENSE +0 -0
- {chisel-1.3.6 → chisel-1.3.7}/README.md +0 -0
- {chisel-1.3.6 → chisel-1.3.7}/pyproject.toml +0 -0
- {chisel-1.3.6 → chisel-1.3.7}/src/chisel/__init__.py +0 -0
- {chisel-1.3.6 → chisel-1.3.7}/src/chisel/action.py +0 -0
- {chisel-1.3.6 → chisel-1.3.7}/src/chisel/app.py +0 -0
- {chisel-1.3.6 → chisel-1.3.7}/src/chisel/request.py +0 -0
- {chisel-1.3.6 → chisel-1.3.7}/src/chisel/static/__init__.py +0 -0
- {chisel-1.3.6 → chisel-1.3.7}/src/chisel/static/chiselDoc.bare +0 -0
- {chisel-1.3.6 → chisel-1.3.7}/src/chisel/static/index.html +0 -0
- {chisel-1.3.6 → chisel-1.3.7}/src/chisel.egg-info/SOURCES.txt +0 -0
- {chisel-1.3.6 → chisel-1.3.7}/src/chisel.egg-info/dependency_links.txt +0 -0
- {chisel-1.3.6 → chisel-1.3.7}/src/chisel.egg-info/requires.txt +0 -0
- {chisel-1.3.6 → chisel-1.3.7}/src/chisel.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: chisel
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.7
|
|
4
4
|
Summary: Lightweight WSGI application framework, schema-validated JSON APIs, and API documentation
|
|
5
5
|
Home-page: https://github.com/craigahobbs/chisel
|
|
6
6
|
Author: Craig A. Hobbs
|
|
@@ -14,7 +14,7 @@ from .action import Action, ActionError
|
|
|
14
14
|
from .request import RedirectRequest, StaticRequest
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
def create_doc_requests(requests=None, root_path='/doc', api=True, app=True):
|
|
17
|
+
def create_doc_requests(requests=None, root_path='/doc', api=True, app=True, markdown_up=None):
|
|
18
18
|
"""
|
|
19
19
|
Yield a series of requests for use with :meth:`~chisel.Application.add_requests` comprising the Chisel
|
|
20
20
|
documentation application. By default, the documenation application is hosted at "/doc/".
|
|
@@ -25,6 +25,7 @@ def create_doc_requests(requests=None, root_path='/doc', api=True, app=True):
|
|
|
25
25
|
:param bool api: If True, include the documentation APIs. Two documentation APIs are added,
|
|
26
26
|
"/doc/doc_index" and "`/doc/doc_request <doc/#name=chisel_doc_request>`__".
|
|
27
27
|
:param bool app: If True, include the documentation client application.
|
|
28
|
+
:param str markdown_up: Optional, the relative path to the MarkdownUp application.
|
|
28
29
|
:returns: Generator of :class:`~chisel.Request`
|
|
29
30
|
"""
|
|
30
31
|
|
|
@@ -34,9 +35,15 @@ def create_doc_requests(requests=None, root_path='/doc', api=True, app=True):
|
|
|
34
35
|
if app:
|
|
35
36
|
yield RedirectRequest((('GET', root_path),), root_path + '/', name='chisel_doc_redirect', doc_group='Documentation')
|
|
36
37
|
with importlib.resources.files('chisel.static').joinpath('index.html').open('rb') as fh:
|
|
38
|
+
index_bytes = fh.read()
|
|
39
|
+
if markdown_up:
|
|
40
|
+
index_str = index_bytes.decode(encoding='utf-8')
|
|
41
|
+
index_str = index_str.replace('https://craigahobbs.github.io/markdown-up/', markdown_up)
|
|
42
|
+
index_str = index_str.replace("'markdownText':", f"'systemPrefix': '{markdown_up}include/', 'markdownText':")
|
|
43
|
+
index_bytes = index_str.encode(encoding='utf-8')
|
|
37
44
|
yield StaticRequest(
|
|
38
45
|
'chisel_doc',
|
|
39
|
-
|
|
46
|
+
index_bytes,
|
|
40
47
|
'text/html; charset=utf-8',
|
|
41
48
|
(('GET', root_path + '/'), ('GET', root_path + '/index.html')),
|
|
42
49
|
'The Chisel documentation HTML',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: chisel
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.7
|
|
4
4
|
Summary: Lightweight WSGI application framework, schema-validated JSON APIs, and API documentation
|
|
5
5
|
Home-page: https://github.com/craigahobbs/chisel
|
|
6
6
|
Author: Craig A. Hobbs
|
|
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
|