Awesome
<a name="readme-top"></a>
<!-- PROJECT SHIELDS --> <!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/kingwingfly/fav"> <img src="images/logo.png" alt="Logo" width="80" height="80"> </a> <h3 align="center">fav</h3> <p align="center"> Back up your favorite bilibili resources with CLI. <br /> <a href="https://github.com/kingwingfly/fav"><strong>Explore the docs »</strong></a> <br /> <br /> <a href="https://github.com/kingwingfly/fav">View Demo</a> · <a href="https://github.com/kingwingfly/fav/issues">Report Bug</a> · <a href="https://github.com/kingwingfly/fav/issues">Request Feature</a> </p> </div> <!-- TABLE OF CONTENTS --> <details> <summary>Table of Contents</summary> <ol> <li> <a href="#about-the-project">About The Project</a> <ul> <li><a href="#built-with">Built With</a></li> </ul> </li> <li> <a href="#getting-started">Getting Started</a> <ul> <li><a href="#prerequisites">Prerequisites</a></li> <li><a href="#compilation">Compilation</a></li> </ul> </li> <li><a href="#usage">Usage</a></li> <li><a href="#roadmap">Roadmap</a></li> <li><a href="#contributing">Contributing</a></li> <li><a href="#license">License</a></li> <li><a href="#contact">Contact</a></li> <li><a href="#acknowledgments">Acknowledgments</a></li> </ol> </details> <!-- ABOUT THE PROJECT -->About The Project
Back up your favorite bilibili online resources with CLI.
<p align="right">(<a href="#readme-top">back to top</a>)</p>Built With
<p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- GETTING STARTED -->Getting Started
You can download the release here.
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
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Compilation
- Clone the repo
git clone https://github.com/kingwingfly/fav.git
- Compilation
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/fav
Usage: fav [OPTIONS] <COMMAND>
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
daemon 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 <WORKING_DIR> [default: /Users/louis]
-h, --help Print help
-V, --version Print version
Steps
- Init and Login first
- Fetch the favorite sets(lists)
- Track the list_id you want. You can see them through
fav status -s
- Fetch tracked resources
- Pull the resources
Example
# 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 <list_id>
# fetch and pull videos
$ fav pull
# untrack list or video
$ fav untrack <list_id/bvid>
# daemon, run `fav pull` every 30 minutes
$ fav daemon 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:
# fav.service
[Unit]
Description=Fav Daemon Service
After=network-online.target
[Service]
Type=simple
User=your_user
WorkingDirectory=/path/to/fav_set
ExecStart=/usr/local/bin/fav daemon 180
Restart=on-failure
[Install]
WantedBy=multi-user.target
For more examples, please refer to the Documentation
<p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- ROADMAP -->Roadmap
- Init
- Auth
- Fetch
- Status
- Track
- Untrack
- Pull
- Dynamic completion
See the open issues for a full list of proposed features (and known issues).
<p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- CONTRIBUTING -->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!
<p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- LICENSE -->License
Distributed under the MIT License. See LICENSE.txt
for more information.
Contact
Louis - 836250617@qq.com
Project Link: https://github.com/kingwingfly/fav
<p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- ACKNOWLEDGMENTS -->