Ahusm / fav

Back up your favorite bilibili resources with CLI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contributors Forks Stargazers Issues MIT License


Logo

fav

Back up your favorite bilibili resources with CLI.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Product Name Screen Shot

Back up your favorite bilibili online resources with CLI.

(back to top)

Built With

  • Rust

(back to top)

Getting Started

Prerequisites

  • Install Rust
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    You may need add some dependencies for protobuf yourself.

Compilation

  1. Clone the repo
    git clone https://github.com/kingwingfly/fav.git
  2. Compilation
    cargo build --release

(back to top)

Usage

Need ffmpeg usable.

$ fav -h
Back up your favorite online resources with CLI.

Usage: fav <COMMAND>

Commands:
  init        Initialize the folder for fav
  auth        Login your account
  fetch       Fetch from remote
  status      Show status of local, default to show video status
  track       Track a remote source
  untrack     Untrack a remote source
  pull        Pull remote data
  push        Push local data
  like        Like a video
  ffmpeg      Set the path of ffmpeg
  daemon      Interval fetch and pull
  modify      Modify resource status
  completion  Completions for the shell
  help        Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Steps

  1. Init and Login first
  2. Fetch the favorite list
  3. Track the bvid or list_id you want to fav. You can see them through fav status -l/v
  4. Fetch tracked resources
  5. Pull the resources (Now only tracked resource can be pulled, since c_id need for pulling while only tracked resource has c_id fetched)

Example

# auto complete is supported; e.g:
$ fav completion fish > ~/.config/fish/completions/fav.fish
# init for bilibili
$ fav init bili
# scan code to login
$ fav auth login
# fetch favorite list
$ fav fetch
# show status
$ fav status -l
# track list (just like `git add`, by the way, commit is not needed)
$ fav track <list_id/bvid>
# fetch
$ fav fetch
# set ffmpeg path
$ fav ffmpeg /usr/bin/ffmpeg
# pull videos (support dry-run)
$ fav pull
# push videos (support dry-run)
$ fav push
# ignore list or video
$ fav ignore <list_id/bvid>
# untrack list or video (just like `git rm`)
$ fav untrack <list_id/bvid>
# like
$ fav like --all
# daemon
$ fav daemon 30
# mark as saved
$ fav modify <list_id/bvid> --saved true
# modify clarity
$ fav modify <list_id/bvid> --clarity 1080p

For more examples, please refer to the Documentation

(back to top)

Roadmap

  • Init
  • Auth
  • Fetch
  • Status
  • Track
  • Untrack
  • Pull
  • Push
  • Ignore
  • Like
  • Sync
  • Serve
  • Tui
  • Dynamic completion

See the open issues for a full list of proposed features (and known issues).

(back to top)

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!

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Louis - 836250617@qq.com

Project Link: https://github.com/kingwingfly/fav

(back to top)

Acknowledgments

(back to top)

About

Back up your favorite bilibili resources with CLI.

License:MIT License


Languages

Language:Rust 100.0%