Skip to content

k4yt3x/pixivdaily-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PixivDaily (Rust)

This repository contains the source code of the backend program running the Telegram channels @pixiv_daily and @pixiv_daily_r18.

Run in a Container

You will obviously first have to have an OCI-compatible container runtime like Podman or Docker installed. Then, pull and run the container:

sudo podman run -e TELOXIDE_TOKEN=$TELOXIDE_TOKEN -e TELOXIDE_CHAT_ID=$TELOXIDE_CHAT_ID ghcr.io/k4yt3x/pixivdaily:1.4.0

You can pass the settings either through environment variables or arguments. For details, see the help page of the binary:

sudo podman run ghcr.io/k4yt3x/pixivdaily:1.4.0 -h

Run From Source

First, you'll need to clone and build this program. For this step, you will need cargo to be installed and the rustc compiler available.

git clone https://github.com/k4yt3x/pixivdaily-rust
cd pixivdaily-rust
cargo build --release

After the binary is built, you can either run it directly:

./target/release/pixivdaily -c [CHAT_ID] -t [TOKEN]

...or run it with systemd. The default systemd timer runs the program at every midnight. Remember to update the fields in /etc/pixivdaily.conf.

sudo cp target/release/pixivdaily /usr/local/bin/pixivdaily
sudo cp conf/pixivdaily.service conf/pixivdaily.timer /etc/systemd/system
sudo cp conf/pixivdaily.conf /etc/pixivdaily.conf
sudo systemctl daemon-reload
sudo systemctl enable --now pixivdaily.timer