Sign inSign up

rl404/mal-cover

By rl404

•Updated almost 2 years ago

Auto generate MyAnimeList anime/manga cover.

Image
0

2.1K

rl404/mal-cover repository overview

⁠MAL-Cover

Simple API to generate image cover CSS for MyAnimeList list.

⁠Quick Installation

docker run -p 34001:34001 rl404/mal-cover
⁠Environment Variables
NameDefaultDescription
MC_APP_PORT34001Http server port.
MC_APP_READ_TIMEOUT1mHttp server read timeout.
MC_APP_WRITE_TIMEOUT1mHttp server write timeout.
MC_APP_GRACEFUL_TIMEOUT10sHttp server shut down timeout.
MC_CACHE_DIALECTinmemoryCache type. nocache, redis, inmemory, memcache.
MC_CACHE_ADDRESSCache address.
MC_CACHE_PASSWORDCache password.
MC_CACHE_TIME24hCache time.

*all the environment variables are optional

⁠Endpoint

⁠/{user}/{type}

Will generate CSS according to MyAnimeList username and type. For example:

  • https://cover.mal.rl404.com/rl404/anime?style=...
  • https://cover.mal.rl404.com/rl404/manga?style=...

⁠Styling

This is the most important part. The endpoint needs a style param. The style value depends on how your list show your anime/manga cover image.

For example.

Your list's image cover style is like this.

.animetitle[href*='/37716/']:before{
    background-image: url(https://myanimelist.cdn-dena.com/images/anime/1889/93555.jpg)
}

Convert it by replacing anime/manga id to {id} and image URL to {url}.

.animetitle[href*='/{id}/']:before{background-image:url({url})}

Encode it using URL encode⁠.

.animetitle%5Bhref%2A%3D%27%2F%7Bid%7D%2F%27%5D%3Abefore%7Bbackground-image%3Aurl%28%7Burl%7D%29%7D

Then use it in endpoint as style param.

https://cover.mal.rl404.com/rl404/anime?style=.animetitle%5Bhref%2A%3D%27%2F%7Bid%7D%2F%27%5D%3Abefore%7Bbackground-image%3Aurl%28%7Burl%7D%29%7D

Good luck.

Tag summary

Content type

Image

Digest

sha256:c940d2faf…

Size

16.2 MB

Last updated

almost 2 years ago

docker pull rl404/mal-cover