Skip to content

Commit

Permalink
doc(readme) introduce how to use the tool
Browse files Browse the repository at this point in the history
  • Loading branch information
foamzou committed Jan 2, 2022
1 parent c8fbef2 commit e5e51d8
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,49 @@
# media-get
Get the media through the url

## Quick Start
```shell
# download the bilibili video with the url
media-get -u "https://www.bilibili.com/video/BV1eb4y187AG?spm_id_from=444.41.0.0"

# only download the audio, use `-t audio`
media-get -u "https://www.bilibili.com/video/BV1eb4y187AG?spm_id_from=444.41.0.0" -t audio
```

## Download / Update the tool
One of the following way can be download
- from the latest release page. [Click me](https://github.com/foamzou/media-get/releases)
- brew install (soon...)

## Usage
```shell
Usage:
media-get [OPTIONS]

Application Options:
-u, --url= Url from website. Start with http[s]://
-o, --out= The output file will be place to here(dir/filename). Default: current dir
-t, --type= The resource type you want to get [auto/audio/video/all] (default: auto)
--addMediaTag Add media tag into file from meta information. Default: false
-m, --metaOnly Output meta info only. Would not download audio
--metaFormat= Support plain/json. Default: plain

Help Options:
-h, --help Show this help message
```

## Build
```shell
# linux
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build main.go

# windows
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build main.go

# macos
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build main.go
```


## Thanks
- Netease Encrypt Method: https://github.com/872409/music-get

0 comments on commit e5e51d8

Please sign in to comment.