https://github.com/crossoverjie/btb
☄️ A cli tool for blog toolbox.
https://github.com/crossoverjie/btb
blog blog-toolbox cli golang
Last synced: 5 months ago
JSON representation
☄️ A cli tool for blog toolbox.
- Host: GitHub
- URL: https://github.com/crossoverjie/btb
- Owner: crossoverJie
- Created: 2020-12-01T18:04:20.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-23T06:20:34.000Z (almost 5 years ago)
- Last Synced: 2025-04-23T04:19:05.412Z (9 months ago)
- Topics: blog, blog-toolbox, cli, golang
- Language: Go
- Homepage:
- Size: 32.2 KB
- Stars: 18
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
☄️A command line tool for blog toolbox.
> Version of `Java`: [https://github.com/crossoverJie/blog.toolbox](https://github.com/crossoverJie/blog.toolbox)
```shell script
$ btb -m b -mp "/opt/data/md/" -dp "/opt/data/md/images/"
DownLoading: /Users/chenjie/Downloads/movie/test1/cicada5.md 2 / 2 <-------------------------------------> 0 p/s 100.00%
DownLoading: /Users/chenjie/Downloads/movie/cicada4.md 2 / 2 <-------------------------------------------> 0 p/s 100.00%
DownLoading: /Users/chenjie/Downloads/movie/cicada1.md 3 / 3 <-------------------------------------------> 1 p/s 100.00%
DownLoading: /Users/chenjie/Downloads/movie/cicada2.md 3 / 3 <-------------------------------------------> 1 p/s 100.00%
DownLoading: /Users/chenjie/Downloads/movie/cicada3.md 3 / 3 <-------------------------------------------> 1 p/s 100.00%
DownLoading: /Users/chenjie/Downloads/movie/test1/cicada6.md 3 / 3 <-------------------------------------> 1 p/s 100.00%
Successful handling of [6] files.
```
[](https://asciinema.org/a/ftFt2WZDx3PV4VQFzZZyw0wSl)
# Install
```shell script
curl -fsSL https://raw.githubusercontent.com/crossoverJie/btb/master/install.sh | bash
```
## Local installation
```shell script
git clone https://github.com/crossoverJie/btb.git
cd btb
make release
```

It will generate binary files for different platforms.
# Usage
## MacOS & Linux
```shell script
# Backup
btb -m b -mp "/opt/data/md/" -dp "/opt/data/images/"
# Replace
btb -m r -mp "/opt/data/md/" -dp "/opt/data/images/" -tk "abc123"
```
## Windows
```shell script
# Backup
./btb.exe -m b -mp "/opt/data/md/" -dp "/opt/data/images/"
# Replace
./btb.exe -m r -mp "/opt/data/md/" -dp "/opt/data/images/" -tk "abc123"
```
# Help
```shell script
NAME:
btb - Help you backup and replace your blog's images
USAGE:
btb [global options] command [command options] [arguments...]
COMMANDS:
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--model value, -m value Operating mode; r:replace, b:backup (default: b)
--download-path value, --dp value The path where the image is stored (default: "/opt/data")
--markdown-path value, --mp value The path where the markdown file is stored (default: "/opt/data")
--token value, --tk value Upload token (default: "/opt/data")
--help, -h show help (default: false)
2021/02/23 14:10:17 Required flags "model, dp, mp, tk" not set
```