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.
Create an interactive session using:
docker exec -u pixivUser -it PixivUtil2 bash
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
.
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.
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". |
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.
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