lontar-cli-0.1.1 is not a library.
Lontar CLI
Command-line interface for the Lontar document generation library.
Convert documents between multiple formats using the Lontar library from the command line.
Installation
Usage
# Convert Markdown to DOCX
# Convert template to PDF
# Convert to multiple formats
Supported Formats
Input
- Markdown
- Tera templates
- JSON (document AST)
Output
- DOCX: Microsoft Word documents
- PPTX: Microsoft PowerPoint presentations
- PDF: Portable Document Format
- XLSX: Microsoft Excel spreadsheets
- HTML: Self-contained HTML with inline CSS
- Markdown: CommonMark-compatible Markdown
- LaTeX: XeLaTeX/LuaLaTeX source files
- TXT: Plain text with ASCII art tables
Features
All features from the lontar library are available:
- Multi-format output
- Unicode and complex script support
- Citations and bibliography
- Cross-references
- Diagrams with auto-layout
- Template-based generation
Examples
Basic Conversion
With Bibliography
Template Rendering
Multiple Outputs
# Generates: output.docx, output.pdf, output.html
Command-Line Options
lontar [OPTIONS] <INPUT>
Arguments:
<INPUT> Input file
Options:
-f, --format <FORMAT> Output format(s): docx, pptx, pdf, xlsx, md, html, txt, tex
-o, --output <OUTPUT> Output file or directory
-b, --bibliography <FILE> Bibliography file (.bib or .json)
-d, --data <FILE> Template data file (JSON)
-h, --help Print help
-V, --version Print version
Library
This CLI is built on the lontar library. For programmatic document generation, use the library directly:
[]
= { = "0.1", = ["docx", "pdf"] }
Minimum Supported Rust Version (MSRV)
Rust 1.88 or later.
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.