Skip to content

Commit 63c9030

Browse files
committed
docs: update readme
1 parent 2756882 commit 63c9030

File tree

3 files changed

+109
-3
lines changed

3 files changed

+109
-3
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ package.json
55
__pycache__/
66
cookie.json
77
*.mp4
8-
*.yaml
8+
upload.yaml
99
dist/

README.md

Lines changed: 95 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,99 @@
11
# biliupload
22

3-
This is a Python implementation of [biliup-rs](https://github.com/biliup/biliup-rs).
3+
> This is a Python implementation of [biliup-rs](https://github.com/biliup/biliup-rs).
44
5-
From now on, I have implemented the login and upload functions, and will continue to implement the other functions. Welcome to use and give me more feedback. And welcome to contribute to this project.
5+
`biliupload` is a command line tool for logining and uploading videos to bilibili, which can also be used as a library for other projects.
66

7+
## Features
8+
9+
- Save `cookies.json` for bilibili by scanning QR code or web login
10+
- `Upload` videos
11+
- Support uploading videos with yaml config
12+
- `Append` videos to a existing video (WIP)
13+
- `Show` the published videos infomation (planned feature)
14+
- `Download` videos (planned feature)
15+
- `Renew` the cookies (planned feature)
16+
- Show the upload progress (planned feature)
17+
18+
> Over the passed few days, I have implemented the `login` and `upload` functions, and will continue to implement the other functions. Welcome to use and give me more feedback. And welcome to contribute to this project.
19+
20+
## Usage
21+
22+
### Installation
23+
24+
> Recommend Python version >= 3.10.
25+
26+
```bash
27+
pip install biliupload
28+
```
29+
30+
Help information:
31+
32+
```
33+
usage: biliupload [-h] [-V] {login,upload} ...
34+
35+
Python implementation of biliup
36+
37+
positional arguments:
38+
{login,upload} Subcommands
39+
login login and save the cookies
40+
upload upload the video
41+
42+
options:
43+
-h, --help show this help message and exit
44+
-V, --version Print version information
45+
```
46+
47+
### Login
48+
49+
```bash
50+
biliupload login
51+
```
52+
Then you can scan the QR code or click the link to login. The `cookie.json` will be saved in the current directory.
53+
54+
![](https://cdn.jsdelivr.net/gh/timerring/scratchpad2023/2024/2025-01-08-11-54-34.png)
55+
56+
### Upload
57+
58+
Help information:
59+
60+
```bash
61+
$ biliupload upload -h
62+
usage: biliupload upload [-h] -c COOKIES [-y YAML] [--copyright COPYRIGHT] [--title TITLE] [--desc DESC] [--tid TID] [--tags TAGS] [--line LINE] video_path
63+
64+
positional arguments:
65+
video_path (required) the path to video file
66+
67+
options:
68+
-h, --help show this help message and exit
69+
-c COOKIES, --cookies COOKIES
70+
The path to cookies
71+
-y YAML, --yaml YAML The path to yaml file(if yaml file is provided, the arguments below will be ignored)
72+
--copyright COPYRIGHT
73+
(default is 2) 1 for original, 2 for reprint
74+
--title TITLE (default is video name) The title of video
75+
--desc DESC (default is empty) The description of video
76+
--tid TID (default is 138) For more info to the type id, refer to https://biliup.github.io/tid-ref.html
77+
--tags TAGS (default is biliupload) video tags, separated by comma
78+
--line LINE (default is bda2) line refer to https://biliup.github.io/upload-systems-analysis.html
79+
```
80+
81+
Example:
82+
83+
your can refer the [`template/example-config.yaml`](https://github.com/timerring/biliupload/tree/main/template/example-config.yaml) to know more about the yaml template.
84+
85+
```bash
86+
# the video path and cookie path are required
87+
biliupload upload /path/to/your/video.mp4 -c /path/to/your/cookie.json
88+
89+
# upload the video with command line parameters
90+
biliupload upload /path/to/your/video.mp4 -c /path/to/your/cookie.json --title "test" --desc "test" --tid 138 --tags "test" --line bda2
91+
92+
# upload the video with yaml config
93+
biliupload upload /path/to/your/video.mp4 -c /path/to/your/cookie.json -y /path/to/your/upload/template.yaml
94+
```
95+
96+
## Acknowledgments
97+
98+
- Thanks to [bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect) for the API collection.
99+
- Thanks to [biliup-rs](https://github.com/biliup/biliup-rs) for the inspiration.

template/example-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
line: bda2 # the cdn upload line
2+
limit: 5 # the limit of video upload threads
3+
streamers:
4+
patterns-example: # the pattern matching(WIP, you can ignore this field and just leave it as this example)
5+
copyright: 1 # the copyright of video (1 for original, 2 for reprint)
6+
source: https://live.bilibili.com/xxxxxxxx # the source of video (if your video is re-print)
7+
tid: 138 # the type id of video
8+
cover: '' # the cover of video (if you want to customize, set it as the path to your cover image)
9+
title: "your video title"
10+
desc_format_id: 0
11+
desc: "your video description"
12+
dynamic: '' # the dynamic information of video
13+
tag: "your, video, tags" # the tags of video, separated by comma

0 commit comments

Comments
 (0)