Skip to content

OneAnimeTeam/OneAnime

Repository files navigation

OneAnime

OneAnime is a random picture server, the original purpose is to allow visitors to see different blog headlines.

Why use OneAnime

  • Convert format to.webp format, save bandwidth and your disk space.
  • Single file design, more compact and lightweight. Out of the box to use.

Install the required environment

OneAnime is written in Python3 and relies on the PIL image processing library.

You can clone OneAnime to local:

git clone https://github.com/qwe7002/OneAnime.git

After that, install the graphics support library:

pip3 install Pillow

Configure your server

You need to write your config.json according to config.example.json . Remember, json does not allow the presence of annotations!

{
  "server": "0.0.0.0", #Server listening address, 0.0.0.0 to accept all requests received by native IP
  "port": 8080, #Server listening port
  "location": "./image" #Image file storage location, it is recommended that you save the image folder to upgrade when the normal `git pull`
}

You can place the image in the directory you specified, only need to access the correct address when requested. For example, if you put the image in the image/photos directory, you can request` /photos' directly.

Once the configuration is complete, start your interpreter to start the OneAnime server:

python3 oneanime.py

Keep running and monitor your OneAnime

In order to avoid each update, the program error to bring you the trouble. OneAnime strongly recommends that you use NodeJS-based monitoring programs: PM2

For more information about PM2 installation, please see How To Install Node.js on Ubuntu 16.04 | DigitalOcean and PM2 - Quick Start

Then you just need to run

pm2 start oneanime.py

It can be achieved in the update file or program error, automatically restart OneAnime.

You can also use it

pm2 startup
pm2 save

So that your OneAnime can start automatically when the system is powered on

Releases

No releases published

Packages

No packages published

Languages