mirror of
https://codeberg.org/YGGverse/ytd.git
synced 2026-04-08 12:55:32 +00:00
YouTube / Invidious daemon and CLI tool for crawling and processing channels with pre-configured commands vector
https://crates.io/crates/ytd
| example | ||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
ytd
YouTube daemon and CLI tool for crawling and processing channels with pre-configured commands vector.
This tool was initially created as a helper for the Pidpilne project, impressed by ytsub and rustypipe API.
Install
cargo install ytd
Usage
Foreground / testing:
RUST_LOG=trace cargo run -- -c example/config.toml
Background / daemon:
RUST_LOG=ytd=info NO_COLOR=1 /usr/local/bin/ytd -c /etc/config.toml
- make sure
updateoption is defined (in the config file)
systemd
git clone https://codeberg.org/yggverse/ytd.git
cd ytd
cargo build --release --locked
sudo install target/release/ytd /usr/local/bin
sudo cp example/config.toml /etc/ytd.toml
sudo useradd -s /usr/sbin/nologin -Mr ytd
sudo mkdir /var/lib/ytd && sudo chown ytd:ytd /var/lib/ytd
sudo mkdir /var/log/ytd && sudo chown ytd:ytd /var/log/ytd
#/etc/systemd/system/ytd.service
[Unit]
After=network-online.target
Wants=network-online.target
[Service]
User=ytd
Group=ytd
Environment="RUST_LOG=ytd=warn"
Environment="NO_COLOR=1"
# Environment="HTTP_PROXY=socks5://127.0.0.1:1080"
# Environment="HTTPS_PROXY=socks5://127.0.0.1:1080"
WorkingDirectory=/var/lib/ytd
ExecStart=/usr/local/bin/ytd -c=/etc/ytd.toml
StandardOutput=file:///var/log/ytd/debug.log
StandardError=file:///var/log/ytd/error.log
[Install]
WantedBy=multi-user.target
sudo systemctl restart ytdsudo systemctl enable ytdsudo systemctl status ytd