1 unstable release
| 0.1.0 | Jul 20, 2025 |
|---|
#2626 in Text processing
35KB
374 lines
YAMC - Yet Another Markdown Converter
A fast, feature-rich command-line tool for converting Markdown files to beautiful HTML with GitHub-style rendering.
Features
- 🚀 Fast conversion using the high-performance Comrak markdown parser
- 🎨 GitHub-style rendering with responsive design
- 📱 Mobile-friendly output with responsive CSS
- 🔧 Flexible output - specify custom output files or use automatic naming
- ✅ Rich markdown support including:
- Tables
- Task lists
- Strikethrough text
- Footnotes
- Description lists
- Front matter
- And much more!
Installation
From Source
git clone https://github.com/yourusername/yamc.git
cd yamc
cargo build --release
Using Cargo
cargo install --git https://github.com/yourusername/yamc.git
Usage
Basic Usage
Convert a markdown file to HTML:
yamc convert README.md
This will create README.html in the same directory.
Specify Output File
yamc convert README.md output.html
Convert Files in Different Directories
yamc convert ./docs/manual.md ./public/index.html
Get Help
yamc --help
# or
yamc -h
# or
yamc help
Examples
Input Markdown (example.md)
# My Awesome Project
This is a **bold** and *italic* text with `code`.
## Features
- [x] Feature 1
- [ ] Feature 2
- [x] Feature 3
## Code Example
```rust
fn main() {
println!("Hello, World!");
}
Table
| Name | Age | City |
|---|---|---|
| Alice | 25 | New York |
| Bob | 30 | London |
This text is strikethrough
### Output HTML
The tool generates a complete HTML document with:
- Proper HTML5 structure
- GitHub-style CSS
- Responsive design
- Meta tags for better SEO
- Mobile-friendly layout
## Error Handling
The tool provides clear error messages for common issues:
- File not found
- Invalid file paths
- Permission errors
- Conversion failures
## Development
### Building
```bash
cargo build
Running Tests
cargo test
Running in Development Mode
cargo run convert example.md
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Acknowledgments
- Comrak - The excellent markdown parser
- GitHub Markdown CSS - The beautiful styling
Dependencies
~56–76MB
~1M SLoC