pb/README.md

88 lines
1.9 KiB
Markdown
Raw Permalink Normal View History

2022-11-03 17:08:12 +00:00
pb ![calver](https://img.shields.io/badge/calver-2022.11.03-22bfda.svg?style=flat-square) [![Build Status](https://drone.tildegit.org/api/badges/tomasino/pb/status.svg)](https://drone.tildegit.org/tomasino/pb) ![license](https://img.shields.io/badge/license-GPL3-blue.svg?style=flat-square)
2018-08-15 03:28:59 +00:00
------
**pb** is a helper utility for using 0x0 pastebin services
2018-08-15 04:00:46 +00:00
pb provides an easy-to-use interface for uploading images or piping output to a 0x0
pastebin service. While it comes pre-configured with a specific pastebin, the service
endpoint can be overridden.
2018-08-15 04:03:30 +00:00
## Usage Examples
2018-08-15 03:28:59 +00:00
2018-10-10 00:48:48 +00:00
Upload 'scores.txt' to the pastebin
2018-08-15 03:28:59 +00:00
```bash
2018-08-15 04:00:46 +00:00
pb scores.txt
2018-08-15 04:03:30 +00:00
```
2018-10-10 00:48:48 +00:00
Upload piped output to the pastebin
2018-08-15 04:00:46 +00:00
2018-08-15 04:03:30 +00:00
```bash
2018-08-15 04:00:46 +00:00
echo 'Secret info' | pb
2018-08-15 04:03:30 +00:00
```
2018-08-15 03:28:59 +00:00
2018-10-10 00:48:48 +00:00
Upload a list of javascript files to the pastebin individually
2018-08-15 04:03:30 +00:00
```bash
2018-08-15 04:00:46 +00:00
find . -type f -name '*.js' -print | pb -f
```
2018-08-15 03:28:59 +00:00
2018-10-10 00:48:48 +00:00
Upload a file to a different pastebin endpoint
2018-08-15 04:03:30 +00:00
```bash
pb -s http://0x0.st scores.txt
```
Re-upload an image from the web
```bash
curl -s https://tildegit.org/_/static/img/gitea-lg.png | pb -e "png"
```
2018-08-15 04:00:46 +00:00
### Options
```bash
2022-11-03 17:08:12 +00:00
-h | --help) Show this help
-v | --version) Show current version number
-f | --file) Explicitly interpret stdin as filename
-c | --color) Pretty color output
-s | --server server_address) Use alternative pastebin server address
-e | --extension bin_extension) Specify file extension used in the upload
2018-08-15 03:28:59 +00:00
```
2018-08-15 03:43:31 +00:00
### Install
2020-06-10 22:53:17 +00:00
On GNU systems:
```sh
sudo make install
```
2018-08-15 03:43:31 +00:00
2020-06-10 22:53:17 +00:00
On BSD systems:
2020-07-05 12:31:10 +00:00
The man-path `/usr/local/share/man` is not indexed by default on openbsd. Using the `/usr` prefix works around this issue.
2020-06-10 22:53:17 +00:00
```sh
2020-07-05 12:31:10 +00:00
doas make PREFIX=/usr install
2020-06-10 22:53:17 +00:00
```
2018-08-15 03:43:31 +00:00
### Uninstall
```sh
sudo make uninstall
```
On BSD systems:
```sh
2020-07-05 12:31:10 +00:00
doas make PREFIX=/usr uninstall
```
2018-08-15 03:43:31 +00:00
2018-08-15 03:28:59 +00:00
## Contributing
Pull requests are welcome. For major changes, please open an issue first to
discuss what you would like to change.
## License
[GPL3](LICENSE)