The Markdown Converter is a robust command-line utility built with Rust. It's designed to transform Markdown files into HTML, EPUB & PDF format effortlessly. With the power of the 'pulldown-cmark' crate, it ensures accurate parsing and rendering of Markdown content.
Swift Conversion: Instantly convert your Markdown files into HTML, PDF & EPUB.
Intuitive Interface: A user-friendly command-line interface powered by the clap crate.
Rich Markdown Support: Supports a wide range of Markdown syntax, including headings, paragraphs, lists, emphasis, links, images (with Base64 embedding), and code blocks.
Customization Options: Choose specific Markdown features like tables and strikethrough using the pulldown-cmark Options.
Flexible Output: Save the generated HTML or EPUB to a specified location, copy it directly to the clipboard, or preview it in your default web browser.
Theming: Style your HTML output with different themes.
Setup Rust Environment: If you haven't installed Rust and Cargo, get them from Rust's official website.
Clone the Repository:
git clone https://github.com/arncv/TextScribe.gitNavigate to the Project Directory:
cd TextScribeCompile the Project:
cargo build --releaseTo convert your Markdown to HTML or EPUB, use the following command:
cargo run --release -- -i <input-file> [-o <output-file>] [--theme <theme-name>] [--clipboard] [--browser] [--epub]<input-file>: Path to your Markdown file.<output-file>: (Optional) Path for the HTML output. If not provided and neither clipboard nor browser options are used, an error will be prompted.--theme <theme-name>: Choose a theme (options: default, dark, light).--clipboard: Copy the generated HTML directly to the clipboard.--browser: Preview the generated HTML in your default web browser.--epub: Generate an EPUB file. Perfect for readers.Convert example.md to HTML using the dark theme and save it as output.html:
cargo run --release -- -i example.md -o output.html --theme darkTo copy the output directly to the clipboard:
cargo run --release -- -i example.md --clipboardTo preview the output in your default web browser:
cargo run --release -- -i example.md --browserConvert example.md to EPUB using the dark theme and save it as output.epub:
cargo run --release -- -i example.md -o output.epub --theme dark --epubTheming: Style your HTML output.
cargo run --release -- -i <input-file> -o <output-file> --theme <theme-name>Tables: Enable table formatting in your Markdown.
cargo run --release -- -i <input-file> -o <output-file> --tablesStrikethrough: Enable strikethrough formatting.
cargo run --release -- -i <input-file> -o <output-file> --strikethroughClipboard Output: Copy the generated HTML to the clipboard.
cargo run --release -- -i <input-file> --clipboardBrowser Preview: View the generated HTML in your default web browser.
cargo run --release -- -i <input-file> --browserWe're always open to suggestions and feedback. If you have an idea that's not listed here, please share it with us!
Contributions are always welcome! Whether it's a feature request, bug fix, or a new idea, feel free to submit a pull request or open an issue. Let's enhance this tool together! Be sure to read CONTRIBUTING file to know about more contributions details.
This project is licensed under the MIT License.