pmd-cli 1.0.0__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.
pmd_cli-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,175 @@
1
+ Metadata-Version: 2.4
2
+ Name: pmd-cli
3
+ Version: 1.0.0
4
+ Summary: Print Markdown — terminal Markdown renderer with ANSI formatting. Zero dependencies.
5
+ Author: mdcli contributors
6
+ License-Expression: MIT
7
+ Keywords: markdown,terminal,cli,renderer,ansi
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Topic :: Terminals
19
+ Classifier: Topic :: Text Processing :: Markup :: Markdown
20
+ Requires-Python: >=3.9
21
+ Description-Content-Type: text/markdown
22
+
23
+ # pmd — Print Markdown
24
+
25
+ > Terminal Markdown renderer. Zero dependencies. One command.
26
+
27
+ **pmd** renders Markdown files directly in your terminal with ANSI colors and Unicode box-drawing characters. No browser, no GUI, no npm install. Just Python 3.9+ and `pip install pmd-cli`.
28
+
29
+ <a href="https://pypi.org/project/pmd-cli/"><img src="https://img.shields.io/pypi/v/pmd" alt="PyPI"></a>
30
+ <a href="https://pypi.org/project/pmd-cli/"><img src="https://img.shields.io/pypi/pyversions/pmd" alt="Python 3.9+"></a>
31
+ <a href="https://pypi.org/project/pmd-cli/"><img src="https://img.shields.io/pypi/l/pmd" alt="License MIT"></a>
32
+
33
+ [*中文版*](README_CN.md)
34
+
35
+ ## Quick start
36
+
37
+ ```bash
38
+ pip install pmd-cli # or: pipx install pmd-cli
39
+ pmd README.md
40
+ cat doc.md | pmd # stdin works too
41
+ ```
42
+
43
+ ## Features
44
+
45
+ ### Headings — 6 levels with colors
46
+
47
+ | Level | Style | Marker |
48
+ |-------|-------|--------|
49
+ | H1 | White on magenta | ■ |
50
+ | H2 | White on blue | ▸ |
51
+ | H3 | Black on cyan | ▸ |
52
+ | H4–H6 | Green / Yellow / Gray | ▸ |
53
+
54
+ No underlines, no `#` prefixes — just color and shape.
55
+
56
+ ### Inline formatting
57
+
58
+ - **Bold** `**text**`
59
+ - *Italic* `*text*`
60
+ - ***Bold-italic*** `***text***`
61
+ - ~~Strikethrough~~ `~~text~~`
62
+ - `Code` — **bold green** for visibility
63
+ - [Links](https://example.com) — blue underlined
64
+
65
+ ### Code blocks — bordered, language-tagged
66
+
67
+ ```
68
+ ┌ python ──────────────────
69
+ │ def hello():
70
+ │ print("world")
71
+ └──────────────────────────
72
+ ```
73
+
74
+ Clean box borders, language label in the top frame. No syntax highlighting — just readable code.
75
+
76
+ ### Tables — autofit, cell wrapping, inline formatting
77
+
78
+ ```
79
+ ┌──────────┬───────┬─────────────────┐
80
+ │ Name │ Age │ City │
81
+ ├──────────┼───────┼─────────────────┤
82
+ │ Alice │ 30 │ Beijing │
83
+ │ Bob │ 25 │ Shanghai │
84
+ └──────────┴───────┴─────────────────┘
85
+ ```
86
+
87
+ - Unicode box-drawing glyphs
88
+ - Columns autofit to content — **compact by default**
89
+ - Long cells wrap within their column
90
+ - Inline formatting (`` `code` ``, `**bold**`) preserved inside cells
91
+
92
+ ### Task lists
93
+
94
+ ```
95
+ ● Completed task
96
+ ○ Pending task
97
+ ```
98
+
99
+ GFM-style `- [x]` / `- [ ]` rendered as green filled / gray empty circles. Mix with regular list items freely.
100
+
101
+ ### Blockquotes
102
+
103
+ ```
104
+ ▎ Cyan bar + dimmed text
105
+ ▎ Clean and compact
106
+ ```
107
+
108
+ ### CJK / Emoji support
109
+
110
+ Chinese, Japanese, Korean characters measured at correct display width (2 columns). Table alignment and text wrapping work properly for mixed-script documents.
111
+
112
+ ## Why pmd?
113
+
114
+ | Tool | Language | Dependencies |
115
+ |------|----------|-------------|
116
+ | **pmd** | Python 3 | **Zero** |
117
+ | `glow` | Go | Requires Go toolchain or prebuilt binary |
118
+ | `rich-cli` | Python | `rich` + 10+ transitive deps |
119
+ | `mdcat` | Rust | Requires Rust or prebuilt binary |
120
+ | `mdr` | Ruby | Requires Ruby + `gem install` |
121
+
122
+ pmd is the lightest option when you need markdown rendering on a server, container, CI runner, or air-gapped machine where installing compilers or heavy packages isn't practical.
123
+
124
+ ## Alternatives vs. built-in `less` / `cat`
125
+
126
+ These show raw markdown source:
127
+
128
+ ```
129
+ # Heading ← looks like a comment
130
+ **bold** *italic* ← noise characters everywhere
131
+ | table | columns | ← misaligned without rendering
132
+ ```
133
+
134
+ pmd shows the **rendered** document — the way it was meant to be read.
135
+
136
+ ## Install
137
+
138
+ ```bash
139
+ pip install pmd-cli # system-wide
140
+ pip install --user pmd-cli # user only
141
+ pipx install pmd-cli # isolated CLI (recommended)
142
+ ```
143
+
144
+ Python 3.9 or later. No other dependencies.
145
+
146
+ ## Usage
147
+
148
+ ```bash
149
+ # File
150
+ pmd README.md
151
+
152
+ # Stdin
153
+ curl -s https://example.com/doc.md | pmd
154
+
155
+ # From clipboard (macOS)
156
+ pbpaste | pmd
157
+
158
+ # From clipboard (Linux)
159
+ xclip -o | pmd
160
+ ```
161
+
162
+ ## Project structure
163
+
164
+ ```
165
+ src/pmd/
166
+ __init__.py # version
167
+ __main__.py # parser + renderer (~850 lines)
168
+ pyproject.toml # pip metadata
169
+ ```
170
+
171
+ Single-file core — easy to vendor, fork, or embed.
172
+
173
+ ## License
174
+
175
+ MIT
@@ -0,0 +1,153 @@
1
+ # pmd — Print Markdown
2
+
3
+ > Terminal Markdown renderer. Zero dependencies. One command.
4
+
5
+ **pmd** renders Markdown files directly in your terminal with ANSI colors and Unicode box-drawing characters. No browser, no GUI, no npm install. Just Python 3.9+ and `pip install pmd-cli`.
6
+
7
+ <a href="https://pypi.org/project/pmd-cli/"><img src="https://img.shields.io/pypi/v/pmd" alt="PyPI"></a>
8
+ <a href="https://pypi.org/project/pmd-cli/"><img src="https://img.shields.io/pypi/pyversions/pmd" alt="Python 3.9+"></a>
9
+ <a href="https://pypi.org/project/pmd-cli/"><img src="https://img.shields.io/pypi/l/pmd" alt="License MIT"></a>
10
+
11
+ [*中文版*](README_CN.md)
12
+
13
+ ## Quick start
14
+
15
+ ```bash
16
+ pip install pmd-cli # or: pipx install pmd-cli
17
+ pmd README.md
18
+ cat doc.md | pmd # stdin works too
19
+ ```
20
+
21
+ ## Features
22
+
23
+ ### Headings — 6 levels with colors
24
+
25
+ | Level | Style | Marker |
26
+ |-------|-------|--------|
27
+ | H1 | White on magenta | ■ |
28
+ | H2 | White on blue | ▸ |
29
+ | H3 | Black on cyan | ▸ |
30
+ | H4–H6 | Green / Yellow / Gray | ▸ |
31
+
32
+ No underlines, no `#` prefixes — just color and shape.
33
+
34
+ ### Inline formatting
35
+
36
+ - **Bold** `**text**`
37
+ - *Italic* `*text*`
38
+ - ***Bold-italic*** `***text***`
39
+ - ~~Strikethrough~~ `~~text~~`
40
+ - `Code` — **bold green** for visibility
41
+ - [Links](https://example.com) — blue underlined
42
+
43
+ ### Code blocks — bordered, language-tagged
44
+
45
+ ```
46
+ ┌ python ──────────────────
47
+ │ def hello():
48
+ │ print("world")
49
+ └──────────────────────────
50
+ ```
51
+
52
+ Clean box borders, language label in the top frame. No syntax highlighting — just readable code.
53
+
54
+ ### Tables — autofit, cell wrapping, inline formatting
55
+
56
+ ```
57
+ ┌──────────┬───────┬─────────────────┐
58
+ │ Name │ Age │ City │
59
+ ├──────────┼───────┼─────────────────┤
60
+ │ Alice │ 30 │ Beijing │
61
+ │ Bob │ 25 │ Shanghai │
62
+ └──────────┴───────┴─────────────────┘
63
+ ```
64
+
65
+ - Unicode box-drawing glyphs
66
+ - Columns autofit to content — **compact by default**
67
+ - Long cells wrap within their column
68
+ - Inline formatting (`` `code` ``, `**bold**`) preserved inside cells
69
+
70
+ ### Task lists
71
+
72
+ ```
73
+ ● Completed task
74
+ ○ Pending task
75
+ ```
76
+
77
+ GFM-style `- [x]` / `- [ ]` rendered as green filled / gray empty circles. Mix with regular list items freely.
78
+
79
+ ### Blockquotes
80
+
81
+ ```
82
+ ▎ Cyan bar + dimmed text
83
+ ▎ Clean and compact
84
+ ```
85
+
86
+ ### CJK / Emoji support
87
+
88
+ Chinese, Japanese, Korean characters measured at correct display width (2 columns). Table alignment and text wrapping work properly for mixed-script documents.
89
+
90
+ ## Why pmd?
91
+
92
+ | Tool | Language | Dependencies |
93
+ |------|----------|-------------|
94
+ | **pmd** | Python 3 | **Zero** |
95
+ | `glow` | Go | Requires Go toolchain or prebuilt binary |
96
+ | `rich-cli` | Python | `rich` + 10+ transitive deps |
97
+ | `mdcat` | Rust | Requires Rust or prebuilt binary |
98
+ | `mdr` | Ruby | Requires Ruby + `gem install` |
99
+
100
+ pmd is the lightest option when you need markdown rendering on a server, container, CI runner, or air-gapped machine where installing compilers or heavy packages isn't practical.
101
+
102
+ ## Alternatives vs. built-in `less` / `cat`
103
+
104
+ These show raw markdown source:
105
+
106
+ ```
107
+ # Heading ← looks like a comment
108
+ **bold** *italic* ← noise characters everywhere
109
+ | table | columns | ← misaligned without rendering
110
+ ```
111
+
112
+ pmd shows the **rendered** document — the way it was meant to be read.
113
+
114
+ ## Install
115
+
116
+ ```bash
117
+ pip install pmd-cli # system-wide
118
+ pip install --user pmd-cli # user only
119
+ pipx install pmd-cli # isolated CLI (recommended)
120
+ ```
121
+
122
+ Python 3.9 or later. No other dependencies.
123
+
124
+ ## Usage
125
+
126
+ ```bash
127
+ # File
128
+ pmd README.md
129
+
130
+ # Stdin
131
+ curl -s https://example.com/doc.md | pmd
132
+
133
+ # From clipboard (macOS)
134
+ pbpaste | pmd
135
+
136
+ # From clipboard (Linux)
137
+ xclip -o | pmd
138
+ ```
139
+
140
+ ## Project structure
141
+
142
+ ```
143
+ src/pmd/
144
+ __init__.py # version
145
+ __main__.py # parser + renderer (~850 lines)
146
+ pyproject.toml # pip metadata
147
+ ```
148
+
149
+ Single-file core — easy to vendor, fork, or embed.
150
+
151
+ ## License
152
+
153
+ MIT
@@ -0,0 +1,36 @@
1
+ [build-system]
2
+ requires = ["setuptools>=64", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "pmd-cli"
7
+ version = "1.0.0"
8
+ description = "Print Markdown — terminal Markdown renderer with ANSI formatting. Zero dependencies."
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.9"
12
+ authors = [{name = "mdcli contributors"}]
13
+ keywords = ["markdown", "terminal", "cli", "renderer", "ansi"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Environment :: Console",
17
+ "Intended Audience :: Developers",
18
+ "Operating System :: OS Independent",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.9",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: 3.13",
25
+ "Topic :: Terminals",
26
+ "Topic :: Text Processing :: Markup :: Markdown",
27
+ ]
28
+
29
+ [project.scripts]
30
+ pmd = "pmd.__main__:main"
31
+
32
+ [tool.setuptools.package-dir]
33
+ "" = "src"
34
+
35
+ [tool.setuptools.packages.find]
36
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ """pmd - Print Markdown. Terminal Markdown renderer with ANSI formatting."""
2
+
3
+ __version__ = "1.0.0"