A fast and efficient Rust-based parser for Mangalib with multiple integration options
- π Fast & Efficient - Built with Rust for maximum performance
- π Web Server Mode - Built-in HTTP server with REST API
- π° RabbitMQ Integration - Consume tasks from message queues
- π― Multiple Deployment Options - CLI, server, or consumer mode
- π Concurrent Processing - Handle multiple manga scraping tasks simultaneously
- π¨ Modern Stack - Uses Axum + Tokio
Before you begin, ensure you have the following installed:
- Rust 1.70+ - For building from source (optional if using pre-built binaries)
git clone git@github.com:Filipponik/rustamanga-mangalib-parser.git
cd rustamanga-mangalib-parser
cargo build --release
cd target/releaseDownload the latest release from the GitHub releases page.
Start a RabbitMQ consumer to process manga scraping tasks from a message queue.
Usage: ./rustamanga-mangalib-parser consume [OPTIONS]
Options:
--url <URL> AMQP URI
--proxy <PROXY> Proxy URI
-h, --help Print helpExample:
./rustamanga-mangalib-parser consume --url=amqp://guest:guest@localhost:5672Start an HTTP server that accepts POST requests to scrape manga data.
Usage: ./rustamanga-mangalib-parser serve [OPTIONS]
Options:
--port <PORT> Web server port
-h, --help Print helpExample:
./rustamanga-mangalib-parser serve --port=12345The server will be available at http://localhost:{PORT}
- POST
/async-command- execute command asynchronously - POST
/sync-command- Same, but action will be executed synchronously.
Request Body:
Command: full
{
"command": "full",
"params": {
"slug": "manga-slug",
"callback_url": "https://example.com",
"after_chapter": "1",
"after_volume": "1"
}
}Command: only_chapters
{
"command": "only_chapters",
"params": {
"slug": "manga-slug",
"callback_url": "https://example.com",
}
}Command: get_user_list
{
"command": "get_user_list",
"params": {
"user_id": 1,
"callback_url": "https://example.com",
}
}Send a manga resource to a specified callback URL.
Usage: ./rustamanga-mangalib-parser send-resource [OPTIONS]
Options:
--url <URL> URL where we should send this resource
-h, --help Print helpExample:
./rustamanga-mangalib-parser send-resource --url=https://example.comcargo testrustamanga-mangalib-parser/
βββ src/ # Source code
βββ tests/ # Test files
β βββ fixtures/ # Test data
βββ resource/ # Helper resources
β βββ json/ # JSON resources
βββ Cargo.toml # Project dependencies
βββ README.md # This file
- Port Settings - Configure via
--portflag in serve mode - AMQP URL - Set RabbitMQ connection string with
--urlin consume mode
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Write clear commit messages
- Add tests for new features
- Update documentation as needed
- Follow Rust coding conventions
- Ensure all tests pass before submitting
- βοΈ All configuration options are provided via CLI flags for flexibility
- π Test fixtures are available in
tests/fixtures/for development - π Static resources are located in
resource/json/
This project is licensed under the MIT License - see the LICENSE file for details.
Filipponik
- GitHub: @Filipponik
- Repository: rustamanga-mangalib-parser
Made with β€οΈ and π¦ Rust