Skip to content

zhet1c/instance

 
 

Repository files navigation

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
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 63.6%
  • HTML 25.0%
  • Shell 11.1%
  • Dockerfile 0.3%