Skip to content

Commit

Permalink
v3.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
iikira committed Mar 24, 2018
1 parent 6610a15 commit a5dd985
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 27 deletions.
53 changes: 52 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ BaiduPCS-Go loglist

## 切换已登录的百度帐号
```
BaiduPCS-Go su -uid=12345678
BaiduPCS-Go su <uid>
```
```
BaiduPCS-Go su
Expand Down Expand Up @@ -326,6 +326,57 @@ BaiduPCS-Go mv /我的资源/1.mp4 /
BaiduPCS-Go mv /我的资源/1.mp4 /我的资源/3.mp4
```

## 离线下载
```
BaiduPCS-Go offlinedl
BaiduPCS-Go clouddl
BaiduPCS-Go od
```

离线下载支持http/https/ftp/电驴/磁力链协议

### 添加离线下载任务
```
BaiduPCS-Go offlinedl add -path=<离线下载文件保存的路径> 资源地址1 地址2 ...
```

添加任务成功之后, 返回离线下载的任务ID.

### 精确查询离线下载任务
```
BaiduPCS-Go offlinedl query 任务ID1 任务ID2 ...
```

### 查询离线下载任务列表
```
BaiduPCS-Go offlinedl list
```

### 取消离线下载任务
```
BaiduPCS-Go offlinedl cancel 任务ID1 任务ID2 ...
```

### 删除离线下载任务
```
BaiduPCS-Go offlinedl delete 任务ID1 任务ID2 ...
```

#### 例子
```
# 将百度和腾讯主页, 离线下载到根目录 /
BaiduPCS-Go offlinedl add -path=/ http://baidu.com http://qq.com
# 添加磁力链接任务
BaiduPCS-Go offlinedl add magnet:?xt=urn:btih:xxx
# 查询任务ID为 12345 的离线下载任务状态
BaiduPCS-Go offlinedl query
# 取消任务ID为 12345 的离线下载任务
BaiduPCS-Go offlinedl cancel 12345
```

## 显示和修改程序配置项
```
BaiduPCS-Go config
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name="BaiduPCS-Go"
version=$1

if [ "$1" = "" ];then
version=v3.3.1
version=v3.3.2
fi

output="out/"
Expand Down
43 changes: 22 additions & 21 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

var (
// Version 版本号
Version = "v3.3.1"
Version = "v3.3.2"

historyFilePath = pcsutil.ExecutablePathJoin("pcs_command_history.txt")
reloadFn = func(c *cli.Context) error {
Expand Down Expand Up @@ -644,11 +644,12 @@ func main() {
},
},
{
Name: "offlinedl",
Aliases: []string{"clouddl", "od"},
Usage: "离线下载",
Category: "百度网盘",
Before: reloadFn,
Name: "offlinedl",
Aliases: []string{"clouddl", "od"},
Usage: "离线下载",
Description: `支持http/https/ftp/电驴/磁力链协议`,
Category: "百度网盘",
Before: reloadFn,
Action: func(c *cli.Context) error {
if c.NumFlags() <= 0 || c.NArg() <= 0 {
cli.ShowCommandHelp(c, c.Command.Name)
Expand All @@ -657,10 +658,10 @@ func main() {
},
Subcommands: []cli.Command{
{
Name: "addtask",
Aliases: []string{"at", "a"},
Name: "add",
Aliases: []string{"a"},
Usage: "添加离线下载任务",
UsageText: app.Name + " offlinedl addtask -path=<离线下载文件保存的路径> 资源地址1 地址2 ...",
UsageText: app.Name + " offlinedl add -path=<离线下载文件保存的路径> 资源地址1 地址2 ...",
Action: func(c *cli.Context) error {
if c.NArg() < 1 {
cli.ShowCommandHelp(c, c.Command.Name)
Expand All @@ -678,10 +679,10 @@ func main() {
},
},
{
Name: "querytask",
Aliases: []string{"qt", "q"},
Name: "query",
Aliases: []string{"q"},
Usage: "精确查询离线下载任务",
UsageText: app.Name + " offlinedl querytask 任务ID1 任务ID2 ...",
UsageText: app.Name + " offlinedl query 任务ID1 任务ID2 ...",
Action: func(c *cli.Context) error {
if c.NArg() < 1 {
cli.ShowCommandHelp(c, c.Command.Name)
Expand All @@ -700,20 +701,20 @@ func main() {
},
},
{
Name: "listtask",
Aliases: []string{"lt", "l"},
Name: "list",
Aliases: []string{"ls", "l"},
Usage: "查询离线下载任务列表",
UsageText: app.Name + " offlinedl listtask",
UsageText: app.Name + " offlinedl list",
Action: func(c *cli.Context) error {
pcscommand.RunCloudDlListTask()
return nil
},
},
{
Name: "canceltask",
Aliases: []string{"ct", "c"},
Name: "cancel",
Aliases: []string{"c"},
Usage: "取消离线下载任务",
UsageText: app.Name + " offlinedl listtask 任务ID1 任务ID2 ...",
UsageText: app.Name + " offlinedl cancel 任务ID1 任务ID2 ...",
Action: func(c *cli.Context) error {
if c.NArg() < 1 {
cli.ShowCommandHelp(c, c.Command.Name)
Expand All @@ -732,10 +733,10 @@ func main() {
},
},
{
Name: "deletetask",
Aliases: []string{"dt", "d"},
Name: "delete",
Aliases: []string{"del", "d"},
Usage: "删除离线下载任务",
UsageText: app.Name + " offlinedl deletetask 任务ID1 任务ID2 ...",
UsageText: app.Name + " offlinedl delete 任务ID1 任务ID2 ...",
Action: func(c *cli.Context) error {
if c.NArg() < 1 {
cli.ShowCommandHelp(c, c.Command.Name)
Expand Down
Binary file modified resource_windows.syso
Binary file not shown.
8 changes: 4 additions & 4 deletions versioninfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"FileVersion": {
"Major": 3,
"Minor": 3,
"Patch": 1,
"Patch": 2,
"Build": 0
},
"ProductVersion": {
"Major": 3,
"Minor": 3,
"Patch": 1,
"Patch": 2,
"Build": 0
},
"FileFlagsMask": "3f",
Expand All @@ -22,14 +22,14 @@
"Comments": "",
"CompanyName": "iikira",
"FileDescription": "百度网盘客户端",
"FileVersion": "v3.3.1",
"FileVersion": "v3.3.2",
"InternalName": "",
"LegalCopyright": "© 2016-2018 iikira.",
"LegalTrademarks": "",
"OriginalFilename": "",
"PrivateBuild": "",
"ProductName": "BaiduPCS-Go",
"ProductVersion": "v3.3.1",
"ProductVersion": "v3.3.2",
"SpecialBuild": ""
},
"VarFileInfo": {
Expand Down

0 comments on commit a5dd985

Please sign in to comment.