markdown-up 3.0.0__tar.gz → 3.0.1__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.
- {markdown_up-3.0.0/src/markdown_up.egg-info → markdown_up-3.0.1}/PKG-INFO +1 -1
- {markdown_up-3.0.0 → markdown_up-3.0.1}/setup.cfg +1 -1
- {markdown_up-3.0.0 → markdown_up-3.0.1}/src/markdown_up/api.py +3 -3
- {markdown_up-3.0.0 → markdown_up-3.0.1}/src/markdown_up/main.py +4 -4
- {markdown_up-3.0.0 → markdown_up-3.0.1}/src/markdown_up/static/markdownUpIndex.bare +2 -0
- {markdown_up-3.0.0 → markdown_up-3.0.1/src/markdown_up.egg-info}/PKG-INFO +1 -1
- {markdown_up-3.0.0 → markdown_up-3.0.1}/LICENSE +0 -0
- {markdown_up-3.0.0 → markdown_up-3.0.1}/README.md +0 -0
- {markdown_up-3.0.0 → markdown_up-3.0.1}/pyproject.toml +0 -0
- {markdown_up-3.0.0 → markdown_up-3.0.1}/src/markdown_up/__init__.py +0 -0
- {markdown_up-3.0.0 → markdown_up-3.0.1}/src/markdown_up/__main__.py +0 -0
- {markdown_up-3.0.0 → markdown_up-3.0.1}/src/markdown_up/app.py +0 -0
- {markdown_up-3.0.0 → markdown_up-3.0.1}/src/markdown_up/static/__init__.py +0 -0
- {markdown_up-3.0.0 → markdown_up-3.0.1}/src/markdown_up/static/index.html +0 -0
- {markdown_up-3.0.0 → markdown_up-3.0.1}/src/markdown_up.egg-info/SOURCES.txt +0 -0
- {markdown_up-3.0.0 → markdown_up-3.0.1}/src/markdown_up.egg-info/dependency_links.txt +0 -0
- {markdown_up-3.0.0 → markdown_up-3.0.1}/src/markdown_up.egg-info/entry_points.txt +0 -0
- {markdown_up-3.0.0 → markdown_up-3.0.1}/src/markdown_up.egg-info/requires.txt +0 -0
- {markdown_up-3.0.0 → markdown_up-3.0.1}/src/markdown_up.egg-info/top_level.txt +0 -0
|
@@ -10,9 +10,9 @@ import os
|
|
|
10
10
|
from pathlib import PurePosixPath
|
|
11
11
|
|
|
12
12
|
import bare_script
|
|
13
|
+
from bare_script.include import schema_parse, schema_type_model_validate
|
|
13
14
|
from bare_script.value import value_args_model, value_args_validate
|
|
14
15
|
import chisel
|
|
15
|
-
import schema_markdown
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
# Load the MarkdownUp API requests
|
|
@@ -25,8 +25,8 @@ def load_api_requests(root, config, api_config):
|
|
|
25
25
|
schema_parts = PurePosixPath(schema_posix).parts
|
|
26
26
|
schema_path = os.path.join(root, *(schema_parts[1:] if schema_parts[0] == '/' else schema_parts))
|
|
27
27
|
with open(schema_path, 'r', encoding='utf-8') as schema_file:
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
schema_parse(schema_file.read(), types, schema_posix, False)
|
|
29
|
+
schema_type_model_validate(types)
|
|
30
30
|
|
|
31
31
|
# Parse and execute the API BareScript files
|
|
32
32
|
api_globals = {
|
|
@@ -13,7 +13,7 @@ import sys
|
|
|
13
13
|
import threading
|
|
14
14
|
import webbrowser
|
|
15
15
|
|
|
16
|
-
import
|
|
16
|
+
from bare_script.include import schema_parse, schema_validate
|
|
17
17
|
import waitress
|
|
18
18
|
|
|
19
19
|
from .app import HTML_EXTS, MARKDOWN_EXTS, MarkdownUpApplication
|
|
@@ -71,7 +71,7 @@ def main(argv=None):
|
|
|
71
71
|
config_path = os.path.normpath(os.path.join(root, args.config))
|
|
72
72
|
if os.path.isfile(config_path):
|
|
73
73
|
with open(config_path, 'r', encoding='utf-8') as config_file:
|
|
74
|
-
config =
|
|
74
|
+
config = schema_validate(CONFIG_TYPES, 'MarkdownUpConfig', json.load(config_file))
|
|
75
75
|
else:
|
|
76
76
|
config = {}
|
|
77
77
|
|
|
@@ -79,7 +79,7 @@ def main(argv=None):
|
|
|
79
79
|
api_path = os.path.normpath(os.path.join(root, args.api))
|
|
80
80
|
if os.path.isfile(api_path):
|
|
81
81
|
with open(api_path, 'r', encoding='utf-8') as api_file:
|
|
82
|
-
api_config =
|
|
82
|
+
api_config = schema_validate(CONFIG_TYPES, 'MarkdownUpAPIConfig', json.load(api_file))
|
|
83
83
|
else:
|
|
84
84
|
api_config = None
|
|
85
85
|
|
|
@@ -131,7 +131,7 @@ def _wsgiapp_log_access(wsgiapp, environ, start_response):
|
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
# The backend configuration schema
|
|
134
|
-
CONFIG_TYPES =
|
|
134
|
+
CONFIG_TYPES = schema_parse('''\
|
|
135
135
|
group "Application Configuration"
|
|
136
136
|
|
|
137
137
|
|
|
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
|