8.8 KiB
About The Project
Tranga can download Chapters and Metadata from "Scanlation" sites such as
- MangaDex.org (Multilingual)
- Manganato.gg (en) (or natomanga.com, mangakakalot, nelomanga, ...)
- MangaKatana.com (en)
- Mangaworld.bz (it)
- Bato.to (en)
- ManhuaPlus (en)
- MangaHere (en)
- Weebcentral (en)
- Webtoons (en)
- ❓ Open an issue
and trigger a library-scan with Komga and Kavita.
Notifications can be sent to your devices using Gotify, LunaSea or Ntfy, or any other service that can use REST Webhooks.
What this program does and does not do
Tranga (the program in this repository) is a REST-API and worker in one. Meaning it will open a network-port to listen for requests, and then work through these. Requests include searches for Manga, starting "Jobs" such as downloading available chapters, creating a monitoring job (that will periodically do the aforementioned), update metadata, and more.
This repository does not include a frontend. A frontend can take many forms, such as a website:
When downloading a chapter (meaning the images that make-up the manga) from a Scanlation-Website, Tranga will
additionally try and scrape Metadata from the same website or enhance it from third-party sources
(tbd https://github.com/C9Glax/tranga/issues/280).
Tranga will then package the contents of each chapter in a .cbz
-archive and place it in a common folder per Manga.
If specified, Tranga will then notify library-Managers such as Komga and Kavita to trigger a scan for new
chapters. Tranga can also send notifications to your devices via third-party services such as Gotify, LunaSea or Ntfy.
Screenshots
This repository has no frontend, however checkout tranga-website for a default!
Inspiration:
Because Kaizoku was relying on mangal and mangal hasn't received bugfixes for its issues with Titles not showing up, or throwing errors because of illegal characters, there were no alternatives for automatic downloads. However, Kaizoku certainly had a great Web-UI.
That is why I wanted to create my own project, in a language I understand, and that I am able to maintain myself.
Endpoint Documentation
Endpoints are documented in Swagger. Just spin up an instance, and go to http://<url>/swagger
.
Built With
- .NET
- ASP.NET
- Entity Framework
- PostgreSQL
- Swagger
- Ngpsql
- Newtonsoft.Json
- PuppeteerSharp
- Html Agility Pack (HAP)
- Soenneker.Utils.String.NeedlemanWunsch
- Sixlabors.ImageSharp
- 💙 Blåhaj 🦈
Star History
Getting Started
Docker
An example docker-compose.yaml
is provided. Mount /Manga
to wherever you want your chapters (.cbz
-Archives)
downloaded (where Komga/Kavita can access them for example).
The file also includes tranga-website as frontend. For its configuration refer to the
Tranga-Website Repository README.
For compatibility do not execute the compose as root (which you should not do anyways...) but as user that can access the folder. Permission conflicts with Komga and Kavita should thus be limited.
Bare-Metal
While not supported/currently built, Tranga will also run Bare-Metal without issue.
Configuration-Files will be stored per OS:
- Linux
/usr/share/tranga-api
- Windows
%appdata%/tranga-api
Downloads (default) are stored in - but this can be configured in settings.json
:
- Linux
/Manga
- Windows
%currentDirectory%/Downloads
Prerequisits
Contributing
If you want to contribute, please feel free to fork and create a Pull-Request!
General rules:
- Strongly-type your variables. This improves readability.
var xyz = Object.GetSomething(); //Do not do this. What type is xyz?
Manga[] zyx = Object.GetAnotherThing(); //I can now easily see that zyx is an Array.
A broad overview of where is what:
Program.cs
Configuration for ASP.NET, Swagger (also inNamedSwaggerGenOptions.cs
, NpgsqlTranga.cs
Job(worker)-LogicSchema/
Entity-FrameworkSchema/Jobs/
+ Logic for JobsSchema/**/
+ Logic for **Schema/PgsqlContext.cs
EF configuration
MangaDownloadClients/
Networking-Clients for ScrapingControllers/
ASP.NET Controllers (Endpoints)APIEndpointRecords/
Records for API-Requests with specific Request-Types (Body)
If you want to add a new Scanlationsite-Connector:
- Copy one of the existing connectors, or start from scratch and inherit from
API.Schema.MangaConnectors.MangaConnector
. - Add the new Connector as Object-Instance in
Program.cs
to the MangaConnector-Arrayconnectors
. - In
Schema/PgsqlContext.cs
add the Discriminator for the Connector (the value is the name of the connector, as defined in the constructor).
License
Distributed under the GNU GPLv3 License. See LICENSE.txt for more information.