https://github.com/kingwingfly/fav
Back up your favorite bilibili resources with CLI.
https://github.com/kingwingfly/fav
backup bilibili synchornization
Last synced: about 2 months ago
JSON representation
Back up your favorite bilibili resources with CLI.
- Host: GitHub
- URL: https://github.com/kingwingfly/fav
- Owner: kingwingfly
- License: mit
- Created: 2024-01-24T17:07:06.000Z (over 1 year ago)
- Default Branch: dev
- Last Pushed: 2025-04-01T21:47:31.000Z (2 months ago)
- Last Synced: 2025-04-03T15:09:51.290Z (about 2 months ago)
- Topics: backup, bilibili, synchornization
- Language: Rust
- Homepage: https://crates.io/crates/fav_core
- Size: 3.24 MB
- Stars: 105
- Watchers: 0
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
![]()
fav
Back up your favorite bilibili resources with CLI.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
## About The Project
[![Product Name Screen Shot][product-screenshot]](https://github.com/kingwingfly/fav)
Back up your favorite bilibili online resources with CLI.
### Built With
- [![Rust][Rust]][Rust-url]
## Getting Started
You can download the release [here](https://github.com/kingwingfly/fav/releases).
For Arch Linux users, you can `yay -S fav-git` maybe, someone has maken it a package.
Or you can compile by yourself:
### Prerequisites
- Install Rust
```sh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```### Compilation
1. Clone the repo
```sh
git clone https://github.com/kingwingfly/fav.git
```
2. Compilation
```sh
cargo build --release
```## Usage
Need `ffmpeg` usable, and able to be directly called in cli.
```
Fav's CLI, helping persist the remote source. Repo: https://github.com/kingwingfly/favUsage: fav [OPTIONS]
Commands:
init Initialize the folder for fav
auth Login your account
fetch Fetch from remote
status Show status of local, default to show sets' status
track Track a remote source
untrack Untrack a remote source
pull Pull remote resource to local. If no id provided, then pull all and skip those having been saved
cron Interval fetch and pull
completion Completions for the shell
help Print this message or the help of the given subcommand(s)Options:
-d, --working-dir [default: /Users/louis]
-h, --help Print help
-V, --version Print version
```### Steps
1. Init and Login first
2. Fetch the favorite sets(lists)
3. Track the list_id you want. You can see them through `fav status -s`
4. Fetch tracked resources
5. Pull the resources### Example
```sh
# auto completion is supported; e.g. fish
fav completion fish > ~/.config/fish/completions/fav.fish
# For Windows users
echo "fav completion powershell | Out-String | Invoke-Expression" >> $PROFILE
# init for bilibili
fav init
# scan code to login
fav auth login
# a fetch will auto run after login
# show status
fav status -s
# track list
fav track
# fetch and pull videos
fav pull
# untrack list or video
fav untrack
# cron, run `fav pull` every 30 minutes
fav cron 30
# after fetching, you can find your favorite upper
fav status -r | awk -F '│' '{print $3}' | grep -v '^\s*$' | sort | uniq -c | sort -n
```Service example:
```ini
# fav.service
[Unit]
Description=Fav Cron Service
After=network-online.target[Service]
Type=simple
User=your_user
WorkingDirectory=/path/to/fav_set
ExecStart=/usr/local/bin/fav cron 180
Restart=on-failure[Install]
WantedBy=multi-user.target
```You can also achieve the goal with `systemd timer` by yourself, but it's a little hard to learn.
_For more examples, please refer to the [Documentation](https://github.com/kingwingfly/fav)_
## Roadmap
- [x] Init
- [x] Auth
- [x] Fetch
- [x] Status
- [x] Track
- [x] Untrack
- [x] Pull
- [ ] Dynamic completionSee the [open issues](https://github.com/kingwingfly/fav/issues) for a full list of proposed features (and known issues).
## Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. Moreover, it is recommended to open an issue before coding to avoid repeated and useless work.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!## License
Distributed under the MIT License. See `LICENSE.txt` for more information.
## Contact
Louis - [email protected]
Project Link: [https://github.com/kingwingfly/fav](https://github.com/kingwingfly/fav)
## Acknowledgments
- [bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect)
[contributors-shield]: https://img.shields.io/github/contributors/kingwingfly/fav.svg?style=for-the-badge
[contributors-url]: https://github.com/kingwingfly/fav/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/kingwingfly/fav.svg?style=for-the-badge
[forks-url]: https://github.com/kingwingfly/fav/network/members
[stars-shield]: https://img.shields.io/github/stars/kingwingfly/fav.svg?style=for-the-badge
[stars-url]: https://github.com/kingwingfly/fav/stargazers
[issues-shield]: https://img.shields.io/github/issues/kingwingfly/fav.svg?style=for-the-badge
[issues-url]: https://github.com/kingwingfly/fav/issues
[license-shield]: https://img.shields.io/github/license/kingwingfly/fav.svg?style=for-the-badge
[license-url]: https://github.com/kingwingfly/fav/blob/master/LICENSE.txt
[product-screenshot]: images/screenshot.png
[Rust]: https://img.shields.io/badge/Rust-000000?style=for-the-badge&logo=Rust&logoColor=orange
[Rust-url]: https://www.rust-lang.org