Code Monkey home page Code Monkey logo

docker-pixivutil2's Introduction

docker-pixivutil2

Docker image to automate archival of Pixiv user's galleries using PixivUtil2. This container uses cron to run PixivUtil2 every 6 hours on a list of Pixiv users.

Application Setup

Create an interactive session using: docker exec -u pixivUser -it PixivUtil2 bash

Existing PixivUtil2 Migration

If you already have an existing config from an existing PixivUtil2 instance, simply copy the following files:

Original File After Copy
config.ini /config/config.ini
db.sqlite /config/pixivUtil2.sqlite

Update your config so that it is saving the files to somewhere in /storage.

Then in an interactive session generate member_list.txt by running python /opt/PixivUtil2/PixivUtil2.py -c /config/configauto.ini then options d, 3, member_list.txt, n.

New PixivUtil2

Running the container for the first time will create a config.ini in the /config folder then exit. Configure the file as needed. Checkout PixivUtil2 documentation for an explination of each option.

Configuration

The container takes 2 environment variables:

ENV Variable Type Default Explanation
ARGS string -s 4 -f /config/member_list.txt -x The content of this variable with be appended
to the command that starts PixivUtil
CRON string */5 * * * * The cron entry for how often PixivUtil2 should be started.
Mind you that a new instance will never start if the previous run is still active.
So technically this can be considered
"How often to try starting a new instance once the previous one finished".

Docker Parameters

The following parameters are required:

Parameter Function
-v /config Configuration files.
-v /storage Location used for downloaded images.

In order to play nicely with Unraid's file permissions, PixivUtil2 is run as the user pixuvUser with PUID 99 and GPID 100 with a 000 mask. These are hardcoded values used in the Dockerfile when the account is created, but I would welcome a merge-request to make this user specified.

Build and Deploy Steps:

sudo systemctl start docker.service
sudo docker build -t ginnokami/pixivutil2:latest .
sudo docker tag BUILDID ginnokami/pixivutil2:VERSION
sudo docker push ginnokami/pixivutil2:latest
sudo docker push ginnokami/pixivutil2:VERSION

docker-pixivutil2's People

Contributors

gin-no-kami avatar chloe-ko avatar

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.