Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/k4yt3x/pixivdaily-rust
- Owner: k4yt3x
- License: gpl-2.0
- Created: 2021-08-23T02:18:50.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-02T22:38:52.000Z (over 1 year ago)
- Last Synced: 2023-06-03T00:35:36.215Z (over 1 year ago)
- Topics: pixiv, rust, telegram
- Language: Rust
- Homepage: https://t.me/pixiv_daily
- Size: 35.2 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```