Giter Site home page Giter Site logo

manga-sharp's Introduction

MangaSharp

About

MangaSharp is a CLI that supports downloading manga and other comics from a variety of sites. All images will be converted to the WebP format to optimize disk usage while still maintaining high quality. It also includes a lightweight web interface for reading locally saved manga. Give it a try if you like the sound of fullscreen images on a black background with minimal distracting UI elements.

Usage

  • Call manga download URL with the URL for the manga's index or chapter page (e.g. https://mangadex.org/title/dd8a907a-3850-4f95-ba03-ba201a8399e3/fullmetal-alchemist). You can pass multiple URLs at once if you would like. By default, the reading direction will be assumed to be horizontal but this can be changed with --direction. If you are downloading a manhwa for example, you will want to pass --direction vertical before the URL. --direction can be specified multiple times and will affect all URLs following it.
  • Call manga update TITLE with the title of a previously downloaded manga to check for new chapters. Use --all to check all downloaded titles for updates.
  • manga ls will list information about the manga in you collection. Use --json if you need structured output.
  • manga rm TITLE will remove a downloaded manga from the database and delete all associated images from disk. --all will delete all downloaded manga.
  • manga archive TITLE is similar to manga rm but only deletes images from disk while leaving the database entries intact. This lets you free up space without losing your reading history. --all can be used to archive all manga. --from-chapter and to-chapter can be used with chapter titles to only archive part of a manga. They will default to the first and last chapters if omitted. --from-chapter and --to-chapter can not be combined with --all.
  • manga unarchive TITLE restores a previously archived manga. This only changes the status in the database, so you will need to run manga update afterwards to actually download the content. --all can be used to restore all archived manga. --from-chapter and to-chapter can be used with chapter titles to only restore part of a manga. They will default to the first and last chapters if omitted. --from-chapter and --to-chapter can not be combined with --all.
  • manga read will start a server and open a web page with a list of your downloaded manga in your default browser. --no-open will just start the server and prevent the browser from opening automatically. --title and --last allow you to skip the index page and jump straight to reading the corresponding manga. Use --port to set the port the server will listen on.

Install

Download an executable

Just download the appropriate executable for your operating system from the releases. You will also need to have the .NET 7.0 Runtime installed. This is the recommended installation strategy, but self-contained versions of the executables are also provided for convenience. Note that these are much larger since they bundle a copy of the runtime with the executable.

AUR

For Arch Linux users, an AUR package is available at https://aur.archlinux.org/packages/manga-sharp.

yay -S manga-sharp

Develop

Running ./build will install necessary assets from npm and copy them to wwwroot and then build the project. Then you can use dotnet run or dotnet watch as usual. Setting DOTNET_ENVIRONMENT=Development will enable more verbose logging.

Release

./publish will build standard and self-contained versions of the project for both Windows and Linux. It also generates a checksums.txt file.

manga-sharp's People

Contributors

literacyfanatic avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

manga-sharp's Issues

Raise an error if title changes

The update command will currently create a new manga if the name of an existing one changes. Instead it should check if the parsed name matches the existing one and raise an error if it doesn't.

Reject downloads with non-image mime types

It is currently possible for empty files or text representations of HTTP errors to end up in the image folders for chapters. Proper mime type headers should be sent when making requests. The actual type and size of files should be checked afterwards as well.

Handle duplicate chapters on MangaDex

MangaDex often includes multiple versions of the same chapter by different scanlators. This results in downloading the same chapter multiple times and whichever version is last wins. Or if they have different extensions images from multiple versions can end up in the same folder.

Oneshots on MangaDex cause error

Some series on MangaDex have a oneshot listed alongside the other chapters. This means that the name of a chapter can actually be null.

Don't reuse instances of HttpRequestMessage

An instance of HttpRequestMessage can only be used once. Attempting to retry a failed request using the same object will raise an exception (which is currently being swallowed silently and returning None). Instead of passing around HttpRequestMessage directly, a factory function should be used.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.