markdown-up 3.3.2__tar.gz → 3.3.3__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.3.2/src/markdown_up.egg-info → markdown_up-3.3.3}/PKG-INFO +23 -19
- {markdown_up-3.3.2 → markdown_up-3.3.3}/README.md +22 -18
- {markdown_up-3.3.2 → markdown_up-3.3.3}/pyproject.toml +1 -1
- {markdown_up-3.3.2 → markdown_up-3.3.3}/src/markdown_up/main.py +10 -3
- {markdown_up-3.3.2 → markdown_up-3.3.3/src/markdown_up.egg-info}/PKG-INFO +23 -19
- {markdown_up-3.3.2 → markdown_up-3.3.3}/LICENSE +0 -0
- {markdown_up-3.3.2 → markdown_up-3.3.3}/setup.cfg +0 -0
- {markdown_up-3.3.2 → markdown_up-3.3.3}/src/markdown_up/__init__.py +0 -0
- {markdown_up-3.3.2 → markdown_up-3.3.3}/src/markdown_up/__main__.py +0 -0
- {markdown_up-3.3.2 → markdown_up-3.3.3}/src/markdown_up/app.py +0 -0
- {markdown_up-3.3.2 → markdown_up-3.3.3}/src/markdown_up/static/__init__.py +0 -0
- {markdown_up-3.3.2 → markdown_up-3.3.3}/src/markdown_up/static/index.html +0 -0
- {markdown_up-3.3.2 → markdown_up-3.3.3}/src/markdown_up/static/markdownUpIndex.bare +0 -0
- {markdown_up-3.3.2 → markdown_up-3.3.3}/src/markdown_up.egg-info/SOURCES.txt +0 -0
- {markdown_up-3.3.2 → markdown_up-3.3.3}/src/markdown_up.egg-info/dependency_links.txt +0 -0
- {markdown_up-3.3.2 → markdown_up-3.3.3}/src/markdown_up.egg-info/entry_points.txt +0 -0
- {markdown_up-3.3.2 → markdown_up-3.3.3}/src/markdown_up.egg-info/requires.txt +0 -0
- {markdown_up-3.3.2 → markdown_up-3.3.3}/src/markdown_up.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: markdown-up
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.3
|
|
4
4
|
Summary: MarkdownUp is a Markdown viewer
|
|
5
5
|
Author-email: "Craig A. Hobbs" <craigahobbs@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -30,7 +30,13 @@ Dynamic: license-file
|
|
|
30
30
|
[](https://github.com/craigahobbs/markdown-up-py/blob/main/LICENSE)
|
|
31
31
|
[](https://pypi.org/project/markdown-up/)
|
|
32
32
|
|
|
33
|
-
MarkdownUp is a Markdown viewer.
|
|
33
|
+
MarkdownUp is a Markdown viewer. This is the MarkdownUp backend application.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## Links
|
|
37
|
+
|
|
38
|
+
- [MarkdownUp Frontend](https://github.com/craigahobbs/markdown-up#readme)
|
|
39
|
+
- [Source code](https://github.com/craigahobbs/markdown-up-py)
|
|
34
40
|
|
|
35
41
|
|
|
36
42
|
## Install MarkdownUp
|
|
@@ -42,7 +48,7 @@ pip install markdown-up
|
|
|
42
48
|
~~~
|
|
43
49
|
|
|
44
50
|
|
|
45
|
-
## View Markdown Files
|
|
51
|
+
## View Local Markdown Files
|
|
46
52
|
|
|
47
53
|
To start MarkdownUp, open a terminal and run the `markdown-up` application:
|
|
48
54
|
|
|
@@ -89,13 +95,14 @@ All Markdown parsing and rendering are done on the client.
|
|
|
89
95
|
The `markdown-up` application has the following command-line arguments:
|
|
90
96
|
|
|
91
97
|
```
|
|
92
|
-
usage: markdown-up [-h] [-p N] [-t N] [-n] [-r] [-q] [path]
|
|
98
|
+
usage: markdown-up [-h] [--host HOST] [-p N] [-t N] [-n] [-r] [-q] [path]
|
|
93
99
|
|
|
94
100
|
positional arguments:
|
|
95
101
|
path the file or directory to view (default is ".")
|
|
96
102
|
|
|
97
103
|
options:
|
|
98
104
|
-h, --help show this help message and exit
|
|
105
|
+
--host HOST the host address to bind (default is "127.0.0.1"; "0.0.0.0" in release mode)
|
|
99
106
|
-p, --port N the application port (default is 8080)
|
|
100
107
|
-t, --threads N the number of web server threads (default is 8)
|
|
101
108
|
-n, --no-browser don't open a web browser
|
|
@@ -106,32 +113,29 @@ options:
|
|
|
106
113
|
|
|
107
114
|
## MarkdownUp Applications
|
|
108
115
|
|
|
109
|
-
|
|
110
|
-
[BareScript](https://craigahobbs.github.io/bare-script/language/)
|
|
111
|
-
MarkdownUp
|
|
112
|
-
|
|
113
|
-
to a Markdown file and viewing it with the MarkdownUp frontend application. When the Markdown file
|
|
114
|
-
is rendered, the BareScript is executed and its results are rendered in place. For example:
|
|
116
|
+
MarkdownUp applications are Markdown files that contain code. Add a `markdown-script` fenced code
|
|
117
|
+
block of [BareScript](https://craigahobbs.github.io/bare-script/language/) to any Markdown file, and
|
|
118
|
+
when MarkdownUp renders the file, it runs the script and renders its output in place of the code
|
|
119
|
+
block. For example:
|
|
115
120
|
|
|
116
121
|
~~~markdown
|
|
117
|
-
#
|
|
122
|
+
# Hello World
|
|
118
123
|
|
|
119
124
|
```markdown-script
|
|
120
125
|
markdownPrint('Hello, **World**!!')
|
|
121
126
|
```
|
|
122
127
|
~~~
|
|
123
128
|
|
|
129
|
+
Applications run entirely in the browser, so no server-side code is required. Use the following
|
|
130
|
+
resources to learn more:
|
|
124
131
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
[
|
|
128
|
-
|
|
129
|
-
[The BareScript Library](https://craigahobbs.github.io/bare-script/library/)
|
|
130
|
-
|
|
131
|
-
[MarkdownUp Frontend Examples](https://craigahobbs.github.io/#var.vPage='MarkdownUp')
|
|
132
|
+
- [The BareScript Language](https://craigahobbs.github.io/bare-script/language/)
|
|
133
|
+
- [The BareScript Library](https://craigahobbs.github.io/bare-script/library/)
|
|
134
|
+
- [MarkdownUp Application Examples](https://craigahobbs.github.io/#var.vPage='MarkdownUp')
|
|
135
|
+
- [The BareScript Creator](https://craigahobbs.github.io/bare-script-py/creator/)
|
|
132
136
|
|
|
133
137
|
|
|
134
|
-
###
|
|
138
|
+
### Backend Applications
|
|
135
139
|
|
|
136
140
|
To write a backend application in BareScript, use the
|
|
137
141
|
[bare-script](https://pypi.org/project/bare-script/) package's
|
|
@@ -5,7 +5,13 @@
|
|
|
5
5
|
[](https://github.com/craigahobbs/markdown-up-py/blob/main/LICENSE)
|
|
6
6
|
[](https://pypi.org/project/markdown-up/)
|
|
7
7
|
|
|
8
|
-
MarkdownUp is a Markdown viewer.
|
|
8
|
+
MarkdownUp is a Markdown viewer. This is the MarkdownUp backend application.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Links
|
|
12
|
+
|
|
13
|
+
- [MarkdownUp Frontend](https://github.com/craigahobbs/markdown-up#readme)
|
|
14
|
+
- [Source code](https://github.com/craigahobbs/markdown-up-py)
|
|
9
15
|
|
|
10
16
|
|
|
11
17
|
## Install MarkdownUp
|
|
@@ -17,7 +23,7 @@ pip install markdown-up
|
|
|
17
23
|
~~~
|
|
18
24
|
|
|
19
25
|
|
|
20
|
-
## View Markdown Files
|
|
26
|
+
## View Local Markdown Files
|
|
21
27
|
|
|
22
28
|
To start MarkdownUp, open a terminal and run the `markdown-up` application:
|
|
23
29
|
|
|
@@ -64,13 +70,14 @@ All Markdown parsing and rendering are done on the client.
|
|
|
64
70
|
The `markdown-up` application has the following command-line arguments:
|
|
65
71
|
|
|
66
72
|
```
|
|
67
|
-
usage: markdown-up [-h] [-p N] [-t N] [-n] [-r] [-q] [path]
|
|
73
|
+
usage: markdown-up [-h] [--host HOST] [-p N] [-t N] [-n] [-r] [-q] [path]
|
|
68
74
|
|
|
69
75
|
positional arguments:
|
|
70
76
|
path the file or directory to view (default is ".")
|
|
71
77
|
|
|
72
78
|
options:
|
|
73
79
|
-h, --help show this help message and exit
|
|
80
|
+
--host HOST the host address to bind (default is "127.0.0.1"; "0.0.0.0" in release mode)
|
|
74
81
|
-p, --port N the application port (default is 8080)
|
|
75
82
|
-t, --threads N the number of web server threads (default is 8)
|
|
76
83
|
-n, --no-browser don't open a web browser
|
|
@@ -81,32 +88,29 @@ options:
|
|
|
81
88
|
|
|
82
89
|
## MarkdownUp Applications
|
|
83
90
|
|
|
84
|
-
|
|
85
|
-
[BareScript](https://craigahobbs.github.io/bare-script/language/)
|
|
86
|
-
MarkdownUp
|
|
87
|
-
|
|
88
|
-
to a Markdown file and viewing it with the MarkdownUp frontend application. When the Markdown file
|
|
89
|
-
is rendered, the BareScript is executed and its results are rendered in place. For example:
|
|
91
|
+
MarkdownUp applications are Markdown files that contain code. Add a `markdown-script` fenced code
|
|
92
|
+
block of [BareScript](https://craigahobbs.github.io/bare-script/language/) to any Markdown file, and
|
|
93
|
+
when MarkdownUp renders the file, it runs the script and renders its output in place of the code
|
|
94
|
+
block. For example:
|
|
90
95
|
|
|
91
96
|
~~~markdown
|
|
92
|
-
#
|
|
97
|
+
# Hello World
|
|
93
98
|
|
|
94
99
|
```markdown-script
|
|
95
100
|
markdownPrint('Hello, **World**!!')
|
|
96
101
|
```
|
|
97
102
|
~~~
|
|
98
103
|
|
|
104
|
+
Applications run entirely in the browser, so no server-side code is required. Use the following
|
|
105
|
+
resources to learn more:
|
|
99
106
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
[
|
|
103
|
-
|
|
104
|
-
[The BareScript Library](https://craigahobbs.github.io/bare-script/library/)
|
|
105
|
-
|
|
106
|
-
[MarkdownUp Frontend Examples](https://craigahobbs.github.io/#var.vPage='MarkdownUp')
|
|
107
|
+
- [The BareScript Language](https://craigahobbs.github.io/bare-script/language/)
|
|
108
|
+
- [The BareScript Library](https://craigahobbs.github.io/bare-script/library/)
|
|
109
|
+
- [MarkdownUp Application Examples](https://craigahobbs.github.io/#var.vPage='MarkdownUp')
|
|
110
|
+
- [The BareScript Creator](https://craigahobbs.github.io/bare-script-py/creator/)
|
|
107
111
|
|
|
108
112
|
|
|
109
|
-
###
|
|
113
|
+
### Backend Applications
|
|
110
114
|
|
|
111
115
|
To write a backend application in BareScript, use the
|
|
112
116
|
[bare-script](https://pypi.org/project/bare-script/) package's
|
|
@@ -29,6 +29,8 @@ def main(argv=None):
|
|
|
29
29
|
parser = argparse.ArgumentParser(**argument_parser_args)
|
|
30
30
|
parser.add_argument('path', nargs='?', default='.',
|
|
31
31
|
help='the file or directory to view (default is ".")')
|
|
32
|
+
parser.add_argument('--host', metavar='HOST',
|
|
33
|
+
help='the host address to bind (default is "127.0.0.1"; "0.0.0.0" in release mode)')
|
|
32
34
|
parser.add_argument('-p', '--port', metavar='N', type=int, default=8080,
|
|
33
35
|
help='the application port (default is 8080)')
|
|
34
36
|
parser.add_argument('-t', '--threads', metavar='N', type=int, default=8,
|
|
@@ -57,8 +59,13 @@ def main(argv=None):
|
|
|
57
59
|
if root == '':
|
|
58
60
|
root = '.'
|
|
59
61
|
|
|
60
|
-
#
|
|
61
|
-
|
|
62
|
+
# Determine the host address to bind. By default, only release mode is reachable from other machines.
|
|
63
|
+
bind_host = args.host or ('0.0.0.0' if args.release else '127.0.0.1')
|
|
64
|
+
|
|
65
|
+
# Construct the URL - an any-address bind is viewed at its loopback address
|
|
66
|
+
host = {'0.0.0.0': '127.0.0.1', '::': '::1'}.get(bind_host, bind_host)
|
|
67
|
+
if ':' in host:
|
|
68
|
+
host = f'[{host}]'
|
|
62
69
|
if is_file:
|
|
63
70
|
path_base = os.path.basename(args.path)
|
|
64
71
|
path_root, path_ext = os.path.splitext(path_base)
|
|
@@ -82,7 +89,7 @@ def main(argv=None):
|
|
|
82
89
|
# Host the application
|
|
83
90
|
if not args.quiet:
|
|
84
91
|
print(f'markdown-up: Serving at {url} ...')
|
|
85
|
-
waitress.serve(wsgiapp_wrap, port=args.port, threads=max(1, args.threads))
|
|
92
|
+
waitress.serve(wsgiapp_wrap, host=bind_host, port=args.port, threads=max(1, args.threads))
|
|
86
93
|
|
|
87
94
|
|
|
88
95
|
# WSGI application wrapper and the start_response function so we can log status and environ
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: markdown-up
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.3
|
|
4
4
|
Summary: MarkdownUp is a Markdown viewer
|
|
5
5
|
Author-email: "Craig A. Hobbs" <craigahobbs@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -30,7 +30,13 @@ Dynamic: license-file
|
|
|
30
30
|
[](https://github.com/craigahobbs/markdown-up-py/blob/main/LICENSE)
|
|
31
31
|
[](https://pypi.org/project/markdown-up/)
|
|
32
32
|
|
|
33
|
-
MarkdownUp is a Markdown viewer.
|
|
33
|
+
MarkdownUp is a Markdown viewer. This is the MarkdownUp backend application.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## Links
|
|
37
|
+
|
|
38
|
+
- [MarkdownUp Frontend](https://github.com/craigahobbs/markdown-up#readme)
|
|
39
|
+
- [Source code](https://github.com/craigahobbs/markdown-up-py)
|
|
34
40
|
|
|
35
41
|
|
|
36
42
|
## Install MarkdownUp
|
|
@@ -42,7 +48,7 @@ pip install markdown-up
|
|
|
42
48
|
~~~
|
|
43
49
|
|
|
44
50
|
|
|
45
|
-
## View Markdown Files
|
|
51
|
+
## View Local Markdown Files
|
|
46
52
|
|
|
47
53
|
To start MarkdownUp, open a terminal and run the `markdown-up` application:
|
|
48
54
|
|
|
@@ -89,13 +95,14 @@ All Markdown parsing and rendering are done on the client.
|
|
|
89
95
|
The `markdown-up` application has the following command-line arguments:
|
|
90
96
|
|
|
91
97
|
```
|
|
92
|
-
usage: markdown-up [-h] [-p N] [-t N] [-n] [-r] [-q] [path]
|
|
98
|
+
usage: markdown-up [-h] [--host HOST] [-p N] [-t N] [-n] [-r] [-q] [path]
|
|
93
99
|
|
|
94
100
|
positional arguments:
|
|
95
101
|
path the file or directory to view (default is ".")
|
|
96
102
|
|
|
97
103
|
options:
|
|
98
104
|
-h, --help show this help message and exit
|
|
105
|
+
--host HOST the host address to bind (default is "127.0.0.1"; "0.0.0.0" in release mode)
|
|
99
106
|
-p, --port N the application port (default is 8080)
|
|
100
107
|
-t, --threads N the number of web server threads (default is 8)
|
|
101
108
|
-n, --no-browser don't open a web browser
|
|
@@ -106,32 +113,29 @@ options:
|
|
|
106
113
|
|
|
107
114
|
## MarkdownUp Applications
|
|
108
115
|
|
|
109
|
-
|
|
110
|
-
[BareScript](https://craigahobbs.github.io/bare-script/language/)
|
|
111
|
-
MarkdownUp
|
|
112
|
-
|
|
113
|
-
to a Markdown file and viewing it with the MarkdownUp frontend application. When the Markdown file
|
|
114
|
-
is rendered, the BareScript is executed and its results are rendered in place. For example:
|
|
116
|
+
MarkdownUp applications are Markdown files that contain code. Add a `markdown-script` fenced code
|
|
117
|
+
block of [BareScript](https://craigahobbs.github.io/bare-script/language/) to any Markdown file, and
|
|
118
|
+
when MarkdownUp renders the file, it runs the script and renders its output in place of the code
|
|
119
|
+
block. For example:
|
|
115
120
|
|
|
116
121
|
~~~markdown
|
|
117
|
-
#
|
|
122
|
+
# Hello World
|
|
118
123
|
|
|
119
124
|
```markdown-script
|
|
120
125
|
markdownPrint('Hello, **World**!!')
|
|
121
126
|
```
|
|
122
127
|
~~~
|
|
123
128
|
|
|
129
|
+
Applications run entirely in the browser, so no server-side code is required. Use the following
|
|
130
|
+
resources to learn more:
|
|
124
131
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
[
|
|
128
|
-
|
|
129
|
-
[The BareScript Library](https://craigahobbs.github.io/bare-script/library/)
|
|
130
|
-
|
|
131
|
-
[MarkdownUp Frontend Examples](https://craigahobbs.github.io/#var.vPage='MarkdownUp')
|
|
132
|
+
- [The BareScript Language](https://craigahobbs.github.io/bare-script/language/)
|
|
133
|
+
- [The BareScript Library](https://craigahobbs.github.io/bare-script/library/)
|
|
134
|
+
- [MarkdownUp Application Examples](https://craigahobbs.github.io/#var.vPage='MarkdownUp')
|
|
135
|
+
- [The BareScript Creator](https://craigahobbs.github.io/bare-script-py/creator/)
|
|
132
136
|
|
|
133
137
|
|
|
134
|
-
###
|
|
138
|
+
### Backend Applications
|
|
135
139
|
|
|
136
140
|
To write a backend application in BareScript, use the
|
|
137
141
|
[bare-script](https://pypi.org/project/bare-script/) package's
|
|
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
|