Shiva
Shiva library: Implementation in Rust of a parser and generator for documents of any type
Features
- Common Document Model (CDM) for all document types
- Parsers produce CDM
- Generators consume CDM
Supported document types
Document type | Parse | Generate |
---|---|---|
Plain text | + | + |
Markdown | + | + |
HTML | + | + |
+ | + | |
JSON | + | + |
XML | + | + |
CSV | + | + |
RTF | + | - |
DOCX | + | - |
XLS | - | - |
Typst | - | - |
Parse document features
Document type | Header | Paragraph | List | Table | Image | Hyperlink | PageHeader | PageFooter |
---|---|---|---|---|---|---|---|---|
Plain text | - | + | - | - | - | - | - | - |
Markdown | + | + | + | + | + | + | - | - |
HTML | + | + | + | + | + | + | - | - |
- | + | + | - | - | - | - | - | |
DOCX | + | + | + | + | - | + | + | + |
RTF | + | + | + | + | - | + | + | + |
JSON | + | + | + | + | - | + | + | + |
XML | + | + | - | - | - | + | + | + |
CSV | - | - | - | + | - | - | - | - |
Generate document features
Document type | Header | Paragraph | List | Table | Image | Hyperlink | PageHeader | PageFooter |
---|---|---|---|---|---|---|---|---|
Plain text | + | + | + | + | - | + | + | + |
Markdown | + | + | + | + | + | + | + | + |
HTML | + | + | + | + | + | + | - | - |
+ | + | + | + | + | + | + | + | |
JSON | + | + | + | + | - | + | + | + |
XML | + | + | - | - | - | + | + | + |
CSV | - | - | - | + | - | - | - | - |
Usage Shiva library
Cargo.toml
[]
= { = "0.4.0", = ["html", "markdown", "text", "pdf", "json", "csv", "rtf", "docx", "xml"] }
main.rs
Shiva CLI & Server
Build executable Shiva CLI and Shiva Server
Run executable Shiva CLI
Run Shiva Server
Contributing
I would love to see contributions from the community. If you experience bugs, feel free to open an issue. If you would like to implement a new feature or bug fix, please follow the steps:
- Read "Contributor License Agreement (CLA)"
- Contact with me via telegram @ievkz or discord @igumnovnsk
- Confirm e-mail invitation in repository
- Do "git clone"
- Create branch with your assigned issue
- Create pull request to main branch