Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/k4yt3x/pixivdaily-rust

Source code for the Telegram channel @pixiv_daily
https://github.com/k4yt3x/pixivdaily-rust

pixiv rust telegram

Last synced: 26 days ago
JSON representation

Source code for the Telegram channel @pixiv_daily

Awesome Lists containing this project

README

        

# PixivDaily (Rust)

This repository contains the source code of the backend program running the Telegram channels [@pixiv_daily](https://t.me/pixiv_daily) and [@pixiv_daily_r18](https://t.me/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:

```shell
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:

```shell
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.

```shell
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:

```shell
./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`.

```shell
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
```