markdown_convert 1.2.20__tar.gz → 1.2.22__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_convert-1.2.22/PKG-INFO +104 -0
- markdown_convert-1.2.22/README.md +85 -0
- markdown_convert-1.2.22/markdown_convert/__init__.py +11 -0
- {markdown_convert-1.2.20 → markdown_convert-1.2.22}/pyproject.toml +3 -1
- markdown_convert-1.2.20/PKG-INFO +0 -79
- markdown_convert-1.2.20/README.md +0 -60
- {markdown_convert-1.2.20 → markdown_convert-1.2.22}/.gitignore +0 -0
- {markdown_convert-1.2.20 → markdown_convert-1.2.22}/LICENSE +0 -0
- {markdown_convert-1.2.20 → markdown_convert-1.2.22}/markdown_convert/__main__.py +0 -0
- {markdown_convert-1.2.20 → markdown_convert-1.2.22}/markdown_convert/code.css +0 -0
- {markdown_convert-1.2.20 → markdown_convert-1.2.22}/markdown_convert/default.css +0 -0
- {markdown_convert-1.2.20 → markdown_convert-1.2.22}/markdown_convert/modules/__init__.py +0 -0
- {markdown_convert-1.2.20 → markdown_convert-1.2.22}/markdown_convert/modules/constants.py +0 -0
- {markdown_convert-1.2.20 → markdown_convert-1.2.22}/markdown_convert/modules/convert.py +0 -0
- {markdown_convert-1.2.20 → markdown_convert-1.2.22}/markdown_convert/modules/resources.py +0 -0
- {markdown_convert-1.2.20 → markdown_convert-1.2.22}/markdown_convert/modules/utils.py +0 -0
- {markdown_convert-1.2.20 → markdown_convert-1.2.22}/markdown_convert/modules/validate.py +0 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: markdown_convert
|
|
3
|
+
Version: 1.2.22
|
|
4
|
+
Summary: Convert Markdown files to PDF from your command line.
|
|
5
|
+
Project-URL: homepage, https://github.com/Julynx/markdown_convert
|
|
6
|
+
Author-email: Julio Cabria <juliocabria@tutanota.com>
|
|
7
|
+
License: GPL-2.0-only
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Requires-Python: <3.15,>=3.9
|
|
13
|
+
Requires-Dist: argsdict==1.0.0
|
|
14
|
+
Requires-Dist: latex2mathml>=3.78.1
|
|
15
|
+
Requires-Dist: markdown2<3,>=2.4.13
|
|
16
|
+
Requires-Dist: playwright>=1.57.0
|
|
17
|
+
Requires-Dist: pygments<3,>=2.17.2
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# markdown-convert
|
|
21
|
+
|
|
22
|
+
_Convert Markdown files to PDF from your command line._
|
|
23
|
+
|
|
24
|
+
`pip install markdown-convert`
|
|
25
|
+
|
|
26
|
+
<br>
|
|
27
|
+
|
|
28
|
+
[](https://github.com/Julynx/markdown-convert)
|
|
29
|
+
[](https://pypi.org/project/markdown_convert)
|
|
30
|
+
|
|
31
|
+
<br>
|
|
32
|
+
|
|
33
|
+
<img src='https://i.imgur.com/uWDm7s0.png' width='80%'>
|
|
34
|
+
|
|
35
|
+
----
|
|
36
|
+
|
|
37
|
+
- [markdown-convert](#markdown-convert)
|
|
38
|
+
- [Why `markdown-convert`?](#why-markdown-convert)
|
|
39
|
+
- [Installation](#installation)
|
|
40
|
+
- [Usage](#usage)
|
|
41
|
+
- [1. From your terminal](#1-from-your-terminal)
|
|
42
|
+
- [2. As a Python library](#2-as-a-python-library)
|
|
43
|
+
- [3. From the context menu of your file explorer](#3-from-the-context-menu-of-your-file-explorer)
|
|
44
|
+
|
|
45
|
+
## Why `markdown-convert`?
|
|
46
|
+
|
|
47
|
+
Unlike other similar tools, `markdown-convert`:
|
|
48
|
+
|
|
49
|
+
- Can be fully installed via `pip install markdown-convert`, with no external system-level dependencies.
|
|
50
|
+
- Comes with a sensible default CSS stylesheet out of the box.
|
|
51
|
+
- Supports:
|
|
52
|
+
- **LaTeX math equations:** `$...$` for inline and `$$...$$` for block equations.
|
|
53
|
+
- **Syntax highlighting for code blocks:** Applied automatically based on the specified language.
|
|
54
|
+
- **Live conversion:** `markdown-convert file.md --mode=live` updates the PDF every time the Markdown file changes.
|
|
55
|
+
- **Custom CSS** `markdown-convert file.md --css=style.css` extends the default CSS with your own stylesheet.
|
|
56
|
+
- **Pipe tables, header links, CSS paged media features and more!**
|
|
57
|
+
|
|
58
|
+
## Installation
|
|
59
|
+
|
|
60
|
+
`markdown-convert` is available on PyPI and can be installed via pip:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pip install markdown-convert
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Usage
|
|
67
|
+
|
|
68
|
+
### 1. From your terminal
|
|
69
|
+
|
|
70
|
+
Simply run `markdown-convert file.md` to convert `file.md` to `file.pdf`.
|
|
71
|
+
|
|
72
|
+
You can specify the following options:
|
|
73
|
+
|
|
74
|
+
- `--mode=once|live`: Convert the markdown file once (default) or live.
|
|
75
|
+
- `--css=[css_file_path]`: Use a custom CSS file.
|
|
76
|
+
- `--out=[output_file_path]`: Specify the output file path.
|
|
77
|
+
|
|
78
|
+
For example: `markdown-convert README.md --mode=live --css=style.css --out=output.pdf` will convert `README.md` to `output.pdf` using `style.css` and update the PDF live as you edit the Markdown file.
|
|
79
|
+
|
|
80
|
+
### 2. As a Python library
|
|
81
|
+
|
|
82
|
+
You can also use `markdown-convert` as a library in your Python code:
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
from markdown_convert import convert, convert_text, live_convert
|
|
86
|
+
|
|
87
|
+
# Convert your Markdown file and save it as a PDF file
|
|
88
|
+
convert('README.md', 'style.css', 'README.pdf')
|
|
89
|
+
|
|
90
|
+
# Convert your Markdown string and get the PDF bytes
|
|
91
|
+
pdf_bytes = convert_text('# Hello World', 'h1 { color: red; }')
|
|
92
|
+
|
|
93
|
+
# Convert your Markdown file to PDF every time it changes
|
|
94
|
+
live_convert('README.md', 'style.css', 'README.pdf')
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 3. From the context menu of your file explorer
|
|
98
|
+
|
|
99
|
+
Install the extension of your choice:
|
|
100
|
+
|
|
101
|
+
- For Windows Explorer: [markdown_convert_explorer](https://github.com/Julynx/markdown_convert_explorer)
|
|
102
|
+
- For Linux (Nautilus): [markdown_convert_nautilus](https://github.com/Julynx/markdown_convert_nautilus)
|
|
103
|
+
|
|
104
|
+
Then right click any Markdown file and select `Convert to PDF` to convert it.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# markdown-convert
|
|
2
|
+
|
|
3
|
+
_Convert Markdown files to PDF from your command line._
|
|
4
|
+
|
|
5
|
+
`pip install markdown-convert`
|
|
6
|
+
|
|
7
|
+
<br>
|
|
8
|
+
|
|
9
|
+
[](https://github.com/Julynx/markdown-convert)
|
|
10
|
+
[](https://pypi.org/project/markdown_convert)
|
|
11
|
+
|
|
12
|
+
<br>
|
|
13
|
+
|
|
14
|
+
<img src='https://i.imgur.com/uWDm7s0.png' width='80%'>
|
|
15
|
+
|
|
16
|
+
----
|
|
17
|
+
|
|
18
|
+
- [markdown-convert](#markdown-convert)
|
|
19
|
+
- [Why `markdown-convert`?](#why-markdown-convert)
|
|
20
|
+
- [Installation](#installation)
|
|
21
|
+
- [Usage](#usage)
|
|
22
|
+
- [1. From your terminal](#1-from-your-terminal)
|
|
23
|
+
- [2. As a Python library](#2-as-a-python-library)
|
|
24
|
+
- [3. From the context menu of your file explorer](#3-from-the-context-menu-of-your-file-explorer)
|
|
25
|
+
|
|
26
|
+
## Why `markdown-convert`?
|
|
27
|
+
|
|
28
|
+
Unlike other similar tools, `markdown-convert`:
|
|
29
|
+
|
|
30
|
+
- Can be fully installed via `pip install markdown-convert`, with no external system-level dependencies.
|
|
31
|
+
- Comes with a sensible default CSS stylesheet out of the box.
|
|
32
|
+
- Supports:
|
|
33
|
+
- **LaTeX math equations:** `$...$` for inline and `$$...$$` for block equations.
|
|
34
|
+
- **Syntax highlighting for code blocks:** Applied automatically based on the specified language.
|
|
35
|
+
- **Live conversion:** `markdown-convert file.md --mode=live` updates the PDF every time the Markdown file changes.
|
|
36
|
+
- **Custom CSS** `markdown-convert file.md --css=style.css` extends the default CSS with your own stylesheet.
|
|
37
|
+
- **Pipe tables, header links, CSS paged media features and more!**
|
|
38
|
+
|
|
39
|
+
## Installation
|
|
40
|
+
|
|
41
|
+
`markdown-convert` is available on PyPI and can be installed via pip:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install markdown-convert
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
### 1. From your terminal
|
|
50
|
+
|
|
51
|
+
Simply run `markdown-convert file.md` to convert `file.md` to `file.pdf`.
|
|
52
|
+
|
|
53
|
+
You can specify the following options:
|
|
54
|
+
|
|
55
|
+
- `--mode=once|live`: Convert the markdown file once (default) or live.
|
|
56
|
+
- `--css=[css_file_path]`: Use a custom CSS file.
|
|
57
|
+
- `--out=[output_file_path]`: Specify the output file path.
|
|
58
|
+
|
|
59
|
+
For example: `markdown-convert README.md --mode=live --css=style.css --out=output.pdf` will convert `README.md` to `output.pdf` using `style.css` and update the PDF live as you edit the Markdown file.
|
|
60
|
+
|
|
61
|
+
### 2. As a Python library
|
|
62
|
+
|
|
63
|
+
You can also use `markdown-convert` as a library in your Python code:
|
|
64
|
+
|
|
65
|
+
```python
|
|
66
|
+
from markdown_convert import convert, convert_text, live_convert
|
|
67
|
+
|
|
68
|
+
# Convert your Markdown file and save it as a PDF file
|
|
69
|
+
convert('README.md', 'style.css', 'README.pdf')
|
|
70
|
+
|
|
71
|
+
# Convert your Markdown string and get the PDF bytes
|
|
72
|
+
pdf_bytes = convert_text('# Hello World', 'h1 { color: red; }')
|
|
73
|
+
|
|
74
|
+
# Convert your Markdown file to PDF every time it changes
|
|
75
|
+
live_convert('README.md', 'style.css', 'README.pdf')
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 3. From the context menu of your file explorer
|
|
79
|
+
|
|
80
|
+
Install the extension of your choice:
|
|
81
|
+
|
|
82
|
+
- For Windows Explorer: [markdown_convert_explorer](https://github.com/Julynx/markdown_convert_explorer)
|
|
83
|
+
- For Linux (Nautilus): [markdown_convert_nautilus](https://github.com/Julynx/markdown_convert_nautilus)
|
|
84
|
+
|
|
85
|
+
Then right click any Markdown file and select `Convert to PDF` to convert it.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""
|
|
2
|
+
This file is used to import all the functions from the modules and make them
|
|
3
|
+
available to the user.
|
|
4
|
+
Author: @julynx
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from .modules.convert import convert, live_convert, convert_text
|
|
8
|
+
from .__main__ import main
|
|
9
|
+
|
|
10
|
+
__version__ = "1.2.15"
|
|
11
|
+
__all__ = ["convert", "live_convert", "convert_text", "main"]
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "markdown_convert"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.22"
|
|
8
8
|
description = "Convert Markdown files to PDF from your command line."
|
|
9
9
|
authors = [
|
|
10
10
|
{ name = "Julio Cabria", email = "juliocabria@tutanota.com" },
|
|
@@ -33,6 +33,7 @@ markdown-convert = "markdown_convert.__main__:main"
|
|
|
33
33
|
|
|
34
34
|
[tool.hatch.build.targets.sdist]
|
|
35
35
|
include = [
|
|
36
|
+
"markdown_convert/__init__.py",
|
|
36
37
|
"markdown_convert/__main__.py",
|
|
37
38
|
"markdown_convert/default.css",
|
|
38
39
|
"markdown_convert/code.css",
|
|
@@ -47,6 +48,7 @@ include = [
|
|
|
47
48
|
[tool.hatch.build.targets.wheel]
|
|
48
49
|
packages = ["markdown_convert"]
|
|
49
50
|
include = [
|
|
51
|
+
"markdown_convert/__init__.py",
|
|
50
52
|
"markdown_convert/__main__.py",
|
|
51
53
|
"markdown_convert/default.css",
|
|
52
54
|
"markdown_convert/code.css",
|
markdown_convert-1.2.20/PKG-INFO
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: markdown_convert
|
|
3
|
-
Version: 1.2.20
|
|
4
|
-
Summary: Convert Markdown files to PDF from your command line.
|
|
5
|
-
Project-URL: homepage, https://github.com/Julynx/markdown_convert
|
|
6
|
-
Author-email: Julio Cabria <juliocabria@tutanota.com>
|
|
7
|
-
License: GPL-2.0-only
|
|
8
|
-
License-File: LICENSE
|
|
9
|
-
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
|
|
10
|
-
Classifier: Operating System :: OS Independent
|
|
11
|
-
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Requires-Python: <3.15,>=3.9
|
|
13
|
-
Requires-Dist: argsdict==1.0.0
|
|
14
|
-
Requires-Dist: latex2mathml>=3.78.1
|
|
15
|
-
Requires-Dist: markdown2<3,>=2.4.13
|
|
16
|
-
Requires-Dist: playwright>=1.57.0
|
|
17
|
-
Requires-Dist: pygments<3,>=2.17.2
|
|
18
|
-
Description-Content-Type: text/markdown
|
|
19
|
-
|
|
20
|
-
# markdown-convert
|
|
21
|
-
|
|
22
|
-
_Convert Markdown files to PDF from your command line._
|
|
23
|
-
|
|
24
|
-
### `pip install markdown-convert`
|
|
25
|
-
|
|
26
|
-
<br>
|
|
27
|
-
|
|
28
|
-
[](https://github.com/Julynx/markdown-convert)
|
|
29
|
-
[](https://pypi.org/project/markdown_convert)
|
|
30
|
-
|
|
31
|
-
<br>
|
|
32
|
-
|
|
33
|
-
<img src='https://i.imgur.com/SZIz2gY.png' width='80%'>
|
|
34
|
-
|
|
35
|
-
`markdown-convert` is an elegant command-line tool that converts Markdown files to PDF, powered by the amazing `markdown2` and `playwright` libraries.
|
|
36
|
-
|
|
37
|
-
Unlike other similar tools, it relies solely on Python packages to do the job, eliminating the need for any external system-level dependencies.
|
|
38
|
-
|
|
39
|
-
### Features
|
|
40
|
-
|
|
41
|
-
- ⚡️ Supports live compilation, so you can preview your PDF in real-time as you type.
|
|
42
|
-
- 🌸 Comes with beautiful CSS out of the box, making your documents look great from the start.
|
|
43
|
-
- 🎨 Syntax highlighting for code blocks included.
|
|
44
|
-
- 🪐 Designed for the 21st century, with relative links, pipe tables, and modern CSS paged media features.
|
|
45
|
-
|
|
46
|
-
### Usage
|
|
47
|
-
|
|
48
|
-
> Note: If you just installed the package, you may need to log out and log back in for the `markdown-convert` command to be registered to your PATH.
|
|
49
|
-
|
|
50
|
-
Run `markdown-convert -h` right from your terminal to check out the available options:
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
Usage:
|
|
54
|
-
markdown-convert [markdown_file_path] [options]
|
|
55
|
-
|
|
56
|
-
Options:
|
|
57
|
-
--mode=once|live
|
|
58
|
-
Convert the markdown file once (default) or live.
|
|
59
|
-
--css=[css_file_path]
|
|
60
|
-
Use a custom CSS file.
|
|
61
|
-
--out=[output_file_path]
|
|
62
|
-
Specify the output file path.
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
...or import any of the functions from the package to use them in your own code:
|
|
66
|
-
|
|
67
|
-
```python
|
|
68
|
-
from markdown_convert import convert, live_convert
|
|
69
|
-
|
|
70
|
-
# Convert your Markdown file to PDF once
|
|
71
|
-
convert('README.md', 'style.css', 'README.pdf')
|
|
72
|
-
|
|
73
|
-
# Convert your Markdown file to PDF every time it changes
|
|
74
|
-
live_convert('README.md', 'style.css', 'README.pdf')
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### Integrations
|
|
78
|
-
|
|
79
|
-
Right click a Markdown file and `Convert to PDF` with the [markdown_convert_explorer](https://github.com/Julynx/markdown_convert_explorer) and [markdown_convert_nautilus](https://github.com/Julynx/markdown_convert_nautilus) extensions for Windows and Linux.
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# markdown-convert
|
|
2
|
-
|
|
3
|
-
_Convert Markdown files to PDF from your command line._
|
|
4
|
-
|
|
5
|
-
### `pip install markdown-convert`
|
|
6
|
-
|
|
7
|
-
<br>
|
|
8
|
-
|
|
9
|
-
[](https://github.com/Julynx/markdown-convert)
|
|
10
|
-
[](https://pypi.org/project/markdown_convert)
|
|
11
|
-
|
|
12
|
-
<br>
|
|
13
|
-
|
|
14
|
-
<img src='https://i.imgur.com/SZIz2gY.png' width='80%'>
|
|
15
|
-
|
|
16
|
-
`markdown-convert` is an elegant command-line tool that converts Markdown files to PDF, powered by the amazing `markdown2` and `playwright` libraries.
|
|
17
|
-
|
|
18
|
-
Unlike other similar tools, it relies solely on Python packages to do the job, eliminating the need for any external system-level dependencies.
|
|
19
|
-
|
|
20
|
-
### Features
|
|
21
|
-
|
|
22
|
-
- ⚡️ Supports live compilation, so you can preview your PDF in real-time as you type.
|
|
23
|
-
- 🌸 Comes with beautiful CSS out of the box, making your documents look great from the start.
|
|
24
|
-
- 🎨 Syntax highlighting for code blocks included.
|
|
25
|
-
- 🪐 Designed for the 21st century, with relative links, pipe tables, and modern CSS paged media features.
|
|
26
|
-
|
|
27
|
-
### Usage
|
|
28
|
-
|
|
29
|
-
> Note: If you just installed the package, you may need to log out and log back in for the `markdown-convert` command to be registered to your PATH.
|
|
30
|
-
|
|
31
|
-
Run `markdown-convert -h` right from your terminal to check out the available options:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
Usage:
|
|
35
|
-
markdown-convert [markdown_file_path] [options]
|
|
36
|
-
|
|
37
|
-
Options:
|
|
38
|
-
--mode=once|live
|
|
39
|
-
Convert the markdown file once (default) or live.
|
|
40
|
-
--css=[css_file_path]
|
|
41
|
-
Use a custom CSS file.
|
|
42
|
-
--out=[output_file_path]
|
|
43
|
-
Specify the output file path.
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
...or import any of the functions from the package to use them in your own code:
|
|
47
|
-
|
|
48
|
-
```python
|
|
49
|
-
from markdown_convert import convert, live_convert
|
|
50
|
-
|
|
51
|
-
# Convert your Markdown file to PDF once
|
|
52
|
-
convert('README.md', 'style.css', 'README.pdf')
|
|
53
|
-
|
|
54
|
-
# Convert your Markdown file to PDF every time it changes
|
|
55
|
-
live_convert('README.md', 'style.css', 'README.pdf')
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Integrations
|
|
59
|
-
|
|
60
|
-
Right click a Markdown file and `Convert to PDF` with the [markdown_convert_explorer](https://github.com/Julynx/markdown_convert_explorer) and [markdown_convert_nautilus](https://github.com/Julynx/markdown_convert_nautilus) extensions for Windows and Linux.
|
|
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
|