Skip to content

Commit f4b7407

Browse files
authored
build: build version 0.0.2 (#6)
1 parent bacf8e1 commit f4b7407

File tree

4 files changed

+54
-24
lines changed

4 files changed

+54
-24
lines changed

README-en.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,48 +53,62 @@ options:
5353
```bash
5454
biliupload login
5555
```
56-
Then you can scan the QR code or click the link to login. The `cookie.json` will be saved in the current directory.
56+
57+
Then you can scan the QR code or click the link to login. If you add the `--export` parameter when inputting the command, the `cookie.json` file will be exported to the current directory (the `cookie.json` file can be used for other projects).
5758

5859
![](https://cdn.jsdelivr.net/gh/timerring/scratchpad2023/2024/2025-01-08-11-54-34.png)
5960

61+
`biliupload login -h ` print help information:
62+
63+
```
64+
usage: biliupload login [-h] [--export]
65+
66+
options:
67+
-h, --help show this help message and exit
68+
--export (default is false) export the login cookie file
69+
```
70+
6071
### Upload
6172

62-
Help information:
73+
`biliupload upload -h ` print help information:
6374

6475
```bash
6576
$ biliupload upload -h
66-
usage: biliupload upload [-h] -c COOKIES [-y YAML] [--copyright COPYRIGHT] [--title TITLE] [--desc DESC] [--tid TID] [--tag TAG] [--line LINE] video_path
77+
usage: biliupload upload [-h] [-y YAML] [--copyright COPYRIGHT] [--title TITLE] [--desc DESC] [--tid TID] [--tag TAG] [--line LINE] [--source SOURCE] [--cover COVER]
78+
[--dynamic DYNAMIC]
79+
video_path
6780

6881
positional arguments:
6982
video_path (required) the path to video file
7083

7184
options:
7285
-h, --help show this help message and exit
73-
-c COOKIES, --cookies COOKIES
74-
The path to cookies
7586
-y YAML, --yaml YAML The path to yaml file(if yaml file is provided, the arguments below will be ignored)
7687
--copyright COPYRIGHT
7788
(default is 2) 1 for original, 2 for reprint
7889
--title TITLE (default is video name) The title of video
7990
--desc DESC (default is empty) The description of video
8091
--tid TID (default is 138) For more info to the type id, refer to https://biliup.github.io/tid-ref.html
81-
--tag TAG (default is biliupload) video tags, separated by comma
92+
--tag TAG (default is biliupload) video tags, separated by comma
8293
--line LINE (default is bda2) line refer to https://biliup.github.io/upload-systems-analysis.html
94+
--source SOURCE (default is 来源于网络) The source of video (if your video is re-print)
95+
--cover COVER (default is empty) The cover of video (if you want to customize, set it as the path to your cover image)
96+
--dynamic DYNAMIC (default is empty) The dynamic information
8397
```
8498

8599
Example:
86100

87101
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.
88102

89103
```bash
90-
# the video path and cookie path are required
91-
biliupload upload /path/to/your/video.mp4 -c /path/to/your/cookie.json
104+
# the video path is required
105+
biliupload upload /path/to/your/video.mp4
92106

93107
# upload the video with command line parameters
94-
biliupload upload /path/to/your/video.mp4 -c /path/to/your/cookie.json --title "test" --desc "test" --tid 138 --tag "test" --line bda2
108+
biliupload upload /path/to/your/video.mp4 --title "test" --desc "test" --tid 138 --tag "test" --line bda2
95109

96110
# upload the video with yaml config
97-
biliupload upload /path/to/your/video.mp4 -c /path/to/your/cookie.json -y /path/to/your/upload/template.yaml
111+
biliupload upload /path/to/your/video.mp4 -y /path/to/your/upload/template.yaml
98112
```
99113

100114
## Acknowledgments

README.md

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
## 功能
1010

11-
- 保存 `cookies.json` 用于 bilibili 登录
11+
- 持久记忆存储登录状态,同样可以导出 `cookies.json` 用于其他项目
1212
- 上传视频
1313
- 支持上传视频的 yaml 配置
14+
- 更新 cookies(正在开发)
15+
- 下载视频(正在开发)
16+
- 显示上传进度(正在开发)
1417
- 追加视频到已有的视频(正在开发)
1518
- 显示已发布的视频信息(预计支持)
16-
- 下载视频(预计支持)
17-
- 更新 cookies(预计支持)
18-
- 显示上传进度(预计支持)
1919

2020
> 目前我实现了 `login``upload` 功能,并会继续实现其他功能。欢迎使用并给我更多反馈。欢迎贡献此项目。
2121
@@ -53,25 +53,38 @@ options:
5353
```bash
5454
biliupload login
5555
```
56-
然后你可以扫描二维码或点击链接登录,`cookie.json` 将保存在当前目录。
56+
57+
然后你可以扫描二维码或点击链接登录,如果输入命令时加上 `--export` 参数,则会导出 `cookie.json` 文件到当前目录(cookie.json 文件可以用于其他项目)。
5758

5859
![](https://cdn.jsdelivr.net/gh/timerring/scratchpad2023/2024/2025-01-08-11-54-34.png)
5960

61+
`biliupload login -h ` 打印帮助信息:
62+
63+
```
64+
usage: biliupload login [-h] [--export]
65+
66+
options:
67+
-h, --help show this help message and exit
68+
--export (default is false) export the login cookie file
69+
```
70+
6071
### 上传
6172

73+
> 注意:上传功能需要先登录,登录后会记忆登录状态,下次上传时不需要再次登录。
74+
6275
`biliupload upload -h ` 打印帮助信息:
6376

6477
```bash
6578
$ biliupload upload -h
66-
usage: biliupload upload [-h] -c COOKIES [-y YAML] [--copyright COPYRIGHT] [--title TITLE] [--desc DESC] [--tid TID] [--tag TAG] [--line LINE] video_path
79+
usage: biliupload upload [-h] [-y YAML] [--copyright COPYRIGHT] [--title TITLE] [--desc DESC] [--tid TID] [--tag TAG] [--line LINE] [--source SOURCE] [--cover COVER]
80+
[--dynamic DYNAMIC]
81+
video_path
6782

6883
positional arguments:
6984
video_path (required) the path to video file
7085

7186
options:
7287
-h, --help show this help message and exit
73-
-c COOKIES, --cookies COOKIES
74-
The path to cookies
7588
-y YAML, --yaml YAML The path to yaml file(if yaml file is provided, the arguments below will be ignored)
7689
--copyright COPYRIGHT
7790
(default is 2) 1 for original, 2 for reprint
@@ -80,21 +93,24 @@ options:
8093
--tid TID (default is 138) For more info to the type id, refer to https://biliup.github.io/tid-ref.html
8194
--tag TAG (default is biliupload) video tags, separated by comma
8295
--line LINE (default is bda2) line refer to https://biliup.github.io/upload-systems-analysis.html
96+
--source SOURCE (default is 来源于网络) The source of video (if your video is re-print)
97+
--cover COVER (default is empty) The cover of video (if you want to customize, set it as the path to your cover image)
98+
--dynamic DYNAMIC (default is empty) The dynamic information
8399
```
84100

85101
示例:
86102

87103
你可以参考 [`template/example-config.yaml`](https://github.com/timerring/biliupload/tree/main/template/example-config.yaml) 了解更多的 yaml 模板。
88104

89105
```bash
90-
# 视频路径和 cookie 路径是必需的
91-
biliupload upload /path/to/your/video.mp4 -c /path/to/your/cookie.json
106+
# 视频路径是必需的
107+
biliupload upload /path/to/your/video.mp4
92108

93109
# 使用命令行参数上传视频
94-
biliupload upload /path/to/your/video.mp4 -c /path/to/your/cookie.json --title "test" --desc "test" --tid 138 --tag "test" --line bda2
110+
biliupload upload /path/to/your/video.mp4 --title "test" --desc "test" --tid 138 --tag "test" --line bda2
95111

96112
# 使用 yaml 配置上传视频
97-
biliupload upload /path/to/your/video.mp4 -c /path/to/your/cookie.json -y /path/to/your/upload/template.yaml
113+
biliupload upload /path/to/your/video.mp4 -y /path/to/your/upload/template.yaml
98114
```
99115

100116
## Acknowledgments

biliupload/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def cli():
1717
level=logging.INFO
1818
)
1919
parser = argparse.ArgumentParser(description='Python implementation of biliup')
20-
parser.add_argument('-V', '--version', action='version', version='biliupload 1.0', help='Print version information')
20+
parser.add_argument('-V', '--version', action='version', version='biliupload 0.0.2', help='Print version information')
2121

2222
subparsers = parser.add_subparsers(dest='subcommand', help='Subcommands')
2323

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "biliupload" # make sure your module name is unique
7-
version = "0.0.1"
7+
version = "0.0.2"
88
authors = [
99
{ name="timerring"},
1010
]

0 commit comments

Comments
 (0)