-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from nanashi-1/edit-readme
Update README.md
- Loading branch information
Showing
1 changed file
with
14 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,156 +1,31 @@ | ||
<p align="center"> | ||
<img width="512" alt="bilibili-extractor logo" src="logo.png"> | ||
<img width="256" alt="bilibili-extractor logo" src="logo.png"> | ||
</p> | ||
|
||
# bilibili-extractor | ||
|
||
[![Tests](https://github.com/nanashi-1/bilibili-extractor/actions/workflows/test.yml/badge.svg)](https://github.com/nanashi-1/bilibili-extractor/actions/workflows/test.yml) | ||
|
||
This tool extracts and compiles downloaded content from bilibili. This is the successor of [bilibili-tools](https://github.com/nanashi-1/bilibili-tools). | ||
This tool extracts🔩 and compiles🔨 downloaded content from bilibili. This is the successor of [bilibili-tools](https://github.com/nanashi-1/bilibili-tools). | ||
|
||
![Screenshot from 2024-02-11 21-19-06](https://github.com/nanashi-1/bilibili-extractor/assets/54083498/b81618d7-5eb6-48a1-a05a-31c6dded05ef) | ||
|
||
## Installation🪛 | ||
|
||
## The Problem | ||
See [Installation](https://github.com/nanashi-1/bilibili-extractor/wiki/Installation). | ||
|
||
Downloaded content from bilibili doesn't get saved as one file. It saves the audio, video, and subtitles separately. And they aren't saved with human-readable names. They are saved with their IDs as their name. Although the subtitle has been in SSA format recently, there are still older uploads in the proprietary JSON subtitle format by bilibili. | ||
> [!TIP] | ||
> If you have `cargo` and `ffmpeg` installed, run: | ||
> | ||
> cargo install bilibili-extractor | ||
> | ||
<details> | ||
<summary>Example of the structure</summary> | ||
## How to use❓️ | ||
|
||
``` | ||
download/ | ||
└── s_34641 | ||
├── 342865 | ||
│ ├── 112 | ||
│ │ ├── audio.m4s | ||
│ │ ├── index.json | ||
│ │ └── video.m4s | ||
│ ├── en | ||
│ │ └── 35813381d9f4a5f623e052af678072aca867054e.json | ||
│ └── entry.json | ||
├── 346992 | ||
│ ├── 112 | ||
│ │ ├── audio.m4s | ||
│ │ ├── index.json | ||
│ │ └── video.m4s | ||
│ ├── en | ||
│ │ └── 7678f3b1b74e728ccf8a301ac36bc2a440e2a983.json | ||
│ └── entry.json | ||
├── 350165 | ||
│ ├── 112 | ||
│ │ ├── audio.m4s | ||
│ │ ├── index.json | ||
│ │ └── video.m4s | ||
│ ├── en | ||
│ │ └── fae1bea747dfdbba0bc9734cbf36b66ee44ef602.json | ||
│ └── entry.json | ||
├── 355184 | ||
│ ├── 112 | ||
│ │ ├── audio.m4s | ||
│ │ ├── index.json | ||
│ │ └── video.m4s | ||
│ ├── en | ||
│ │ └── 95422040af142e903cf3501f1efbbd4d650f0788.json | ||
│ └── entry.json | ||
├── 358304 | ||
│ ├── 112 | ||
│ │ ├── audio.m4s | ||
│ │ ├── index.json | ||
│ │ └── video.m4s | ||
│ ├── en | ||
│ │ └── 38bb9688fba53f2b25b860cbf80fccdd4bfefb9e.json | ||
│ └── entry.json | ||
├── 359293 | ||
│ ├── 112 | ||
│ │ ├── audio.m4s | ||
│ │ ├── index.json | ||
│ │ └── video.m4s | ||
│ ├── en | ||
│ │ └── 09d37641f164d657bf139b7ac6b6721fb8c22342.json | ||
│ └── entry.json | ||
├── 359295 | ||
│ ├── 112 | ||
│ │ ├── audio.m4s | ||
│ │ ├── index.json | ||
│ │ └── video.m4s | ||
│ ├── en | ||
│ │ └── b880308196740c89f6a591d51171f3586799a69a.json | ||
│ └── entry.json | ||
├── 359296 | ||
│ ├── 112 | ||
│ │ ├── audio.m4s | ||
│ │ ├── index.json | ||
│ │ └── video.m4s | ||
│ ├── en | ||
│ │ └── 87829ca0dda97d9356ccd07cc9f8b642f85ec608.json | ||
│ └── entry.json | ||
├── 359297 | ||
│ ├── 112 | ||
│ │ ├── audio.m4s | ||
│ │ ├── index.json | ||
│ │ └── video.m4s | ||
│ ├── en | ||
│ │ └── 4885e942e5c0731bff07b78ab56d696e08030b4b.json | ||
│ └── entry.json | ||
├── 359298 | ||
│ ├── 112 | ||
│ │ ├── audio.m4s | ||
│ │ ├── index.json | ||
│ │ └── video.m4s | ||
│ ├── en | ||
│ │ └── 45ccbcee9c73355dc658603a8a673cf8b4726f34.json | ||
│ └── entry.json | ||
├── 359300 | ||
│ ├── 112 | ||
│ │ ├── audio.m4s | ||
│ │ ├── index.json | ||
│ │ └── video.m4s | ||
│ ├── en | ||
│ │ └── bb6e5a10c0c917c9ed23bfb4cff66cd048708696.json | ||
│ └── entry.json | ||
└── 359301 | ||
├── 112 | ||
│ ├── audio.m4s | ||
│ ├── index.json | ||
│ └── video.m4s | ||
├── en | ||
│ └── f9171d78e6aa73b2079d15ceb9b5e4f9139cd157.json | ||
└── entry.json | ||
``` | ||
</details> | ||
[**Guide**](https://github.com/nanashi-1/bilibili-extractor/wiki/Guide) - complete tutorial on how to use this tool from start to finish. | ||
|
||
## The Solution | ||
[**Basic Usage**](https://github.com/nanashi-1/bilibili-extractor/wiki/Basic-Usage) - very basic tutorial on how to use this tool. | ||
|
||
Firstly, the subtitle problem, a program that can translate it to other formats compatible with FFmpeg, is employed. The files are then compiled into one `.mkv` file using FFmpeg. Folders are then created to store the `.mkv` files about to be extracted. The folders are named based on the entry title. Then the `.mkv` files are renamed and moved to their specified folder. | ||
|
||
## Dependencies | ||
|
||
Firstly, make sure that `ffmpeg` is installed. To check whether you have it run: | ||
|
||
which ffmpeg # This should return the location of ffmpeg. | ||
|
||
In case you don't have it installed: | ||
|
||
### Arch | ||
|
||
pacman -S ffmpeg | ||
|
||
### Ubuntu/Debian | ||
|
||
apt install ffmpeg | ||
|
||
### Fedora | ||
|
||
dnf install https://download1.rpmfusion.org/free/fedora rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm | ||
dnf install ffmpeg | ||
|
||
|
||
## Installation | ||
|
||
cargo install bilibili-extractor | ||
|
||
> **_NOTE:_** The binary will be installed as `bilibili_extractor_cli`. Run `bilibili_extractor_cli help` for usage instructions. | ||
## License | ||
## License🪪 | ||
|
||
This project is licensed under the MIT License. |