File tree Expand file tree Collapse file tree 1 file changed +74
-0
lines changed
Expand file tree Collapse file tree 1 file changed +74
-0
lines changed Original file line number Diff line number Diff line change 1+ # pulldown-html-ext-cli
2+
3+ A command-line tool for converting markdown to HTML using the pulldown-html-ext library.
4+
5+ ## Installation
6+
7+ ``` bash
8+ cargo install pulldown-html-ext-cli
9+ ```
10+
11+ ## Usage
12+
13+ Basic usage:
14+ ``` bash
15+ # Read from stdin, write to stdout
16+ echo " # Hello" | pulldown-html-ext-cli
17+
18+ # Convert a file
19+ pulldown-html-ext-cli -i input.md -o output.html
20+
21+ # Use custom configuration
22+ pulldown-html-ext-cli -i input.md -o output.html -c config.toml
23+ ```
24+
25+ ## Options
26+
27+ ```
28+ Options:
29+ -i, --input <FILE> Input markdown file (omit for stdin)
30+ -o, --output <FILE> Output HTML file (omit for stdout)
31+ -c, --config <FILE> Config file in TOML format
32+ -h, --help Print help
33+ -V, --version Print version
34+ ```
35+
36+ ## Configuration
37+
38+ You can customize the HTML output by providing a TOML configuration file. Example configuration:
39+
40+ ``` toml
41+ [html ]
42+ escape_html = true
43+ break_on_newline = true
44+ xhtml_style = false
45+ pretty_print = true
46+
47+ [elements .headings ]
48+ add_ids = true
49+ id_prefix = " heading-"
50+
51+ [elements .links ]
52+ nofollow_external = true
53+ open_external_blank = true
54+
55+ [elements .code_blocks ]
56+ default_language = " text"
57+ line_numbers = true
58+ ```
59+
60+ For full configuration options, see the [ library documentation] ( https://docs.rs/pulldown-html-ext ) .
61+
62+ ## Example
63+
64+ ``` bash
65+ # Using stdin/stdout
66+ echo " # Hello World" | pulldown-html-ext-cli > output.html
67+
68+ # Using files with custom config
69+ pulldown-html-ext-cli -i document.md -o document.html -c custom.toml
70+ ```
71+
72+ ## License
73+
74+ [ Add your license information here]
You can’t perform that action at this time.
0 commit comments