Giter Club home page Giter Club logo

instance's Introduction

Mangaloid Instance

Reference Implementation (Python/aiohttp/sqlalchemy)

How to install

You can easily setup a mangaloid instance with the provided prompt-based setup script.
This supports either installation (via Docker or pip), or simply running off the repo.
Daemon is provided by either systemd or sysvinit (Coming soon...), for non-docker installations.

Run the following in your terminal:

bash <(curl -s "https://setup.mangaloid.moe")

TODO:

  • Finish sneed impementation

API Reference

Manga Routes

Name Parameteres Result
/info Instance
/manga/search String: title, String: author, String: artist, String: genres[] Manga[]
/manga/from_id Integer: id Manga
/manga/get_chapters Integer: id Chapter[]
/manga/thumbnail Integer: id Image
/manga/people String[]
/manga/thumbnail Scanlator[]

Parameters are passed as URL-encoded GET parameters Multiple genres should be CSV

Search help

Searches manga database based on title, author, artist and genres/tags
All of these are optional, can be used in any combination and are evaluated
in that specific order.
Args:
    title (str): This is tested in a case-insensitive LIKE clause.
    author (str): This is tested as "equals" and is case-sensitive.
    artist (str): This is tested as "equals" and is case-sensitive.
    tags (list): List of genres/tags. Can be prefixed with either + or -
                    to define inclusion/exclusion (if missing it defaults to +).
                    As for the tags themselves they are tested as "equal" 
                    and are case-sensitive.

Admin Routes

POST /admin/add_manga -> {"id" : int}

Args (* means mandatory):
    type: Manga, Webtoon. Defaults to Manga
    *country_of_origin (str) : ISO-3166 Country Code
    *publication_status (str): Ongoing, Axed, Completed
    *scanlation_status (bool): Is completely scanlated
    mal_id (int): MyAnimeList ID
    anilist_id (int): AniList ID
    mu_id (int): MangaUpdates ID

POST /admin/add_chapter -> {"id" : int}

Args (* means mandatory):
    *chapter_no (int)
    *scanlator_id (int)
    chapter_postfix (str)
    *page_count (int)
    *title (str)
    version (int)
    *language (str) : ISO 639-1 Language code
    date_added (datetime): Defaults to current datetime
    *ipfs_link (str): IPFS CID to chapter directory

POST /admin/add_scanlator -> {"id" : int}

Args (* means mandatory):
    *name (str)
    website (str)

Return types

Manga

{
    "id": int, 
    "type": str, // Manga / Webtoon
    "titles": [str],
    "artists": [str],
    "authors": [str],
    "genres": [str],
    "country_of_origin": str, // (ISO-3166)
    "publication_status": str, // Ongoing, Axed, Completed
    "scanlation_status": bool,
    "mal_id": int,
    "anilist_id": int,
    "mangaupdates_id": int
}

Chapter

{
    "id": int,
    "manga_id": int,
    "chapter_no": int,
    "chapter_postfix": str,
    "ordinal": int,
    "title": str,
    "page_count": int,
    "version": int,
    "language_id": str, // ISO 639-1
    "group_id": int,
    "date_added": int, // UTC Unix Timestamp
    "ipfs_link": str
}

Scanlator

{
    "id": int,
    "name": str,
    "website": str
}

instance's People

Contributors

compscifag avatar zhet1c avatar

Stargazers

Emanuel avatar Femo avatar  avatar  avatar richard avatar  avatar

Watchers

James Cloos avatar

Forkers

zhet1c itsnewe

instance's Issues

Duplicate values in many-to-many relations

21:51:55    @compscifag | in the author-person, artist-person and manga-genre many-to-many relations, i get duplicate entries in the child tables (person and genre)
21:52:10    @compscifag | it probably needs an insert or ignore thingie but i have no idea how to do this with sqlalchemy
21:52:17    @compscifag | maybe some other anon can enlighten me

image

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.