1
0
mirror of https://tildegit.org/tomasino/pb.git synced 2025-01-10 12:16:43 +01:00
tomasino-pb/README.md

71 lines
1.6 KiB
Markdown
Raw Normal View History

2020-01-20 12:33:49 +00:00
pb ![calver](https://img.shields.io/badge/calver-2020.01.20-22bfda.svg?style=flat-square) ![status](https://img.shields.io/badge/status-working-green.svg?style=flat-square) ![license](https://img.shields.io/badge/license-GPL3-blue.svg?style=flat-square)
2018-08-14 23:28:59 -04:00
------
**pb** is a helper utility for using 0x0 pastebin services
2018-08-15 00:00:46 -04: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 00:03:30 -04:00
## Usage Examples
2018-08-14 23:28:59 -04:00
2018-10-09 20:48:48 -04:00
Upload 'scores.txt' to the pastebin
2018-08-14 23:28:59 -04:00
```bash
2018-08-15 00:00:46 -04:00
pb scores.txt
2018-08-15 00:03:30 -04:00
```
2018-10-09 20:48:48 -04:00
Upload piped output to the pastebin
2018-08-15 00:00:46 -04:00
2018-08-15 00:03:30 -04:00
```bash
2018-08-15 00:00:46 -04:00
echo 'Secret info' | pb
2018-08-15 00:03:30 -04:00
```
2018-08-14 23:28:59 -04:00
2018-10-09 20:48:48 -04:00
Upload a list of javascript files to the pastebin individually
2018-08-15 00:03:30 -04:00
```bash
2018-08-15 00:00:46 -04:00
find . -type f -name '*.js' -print | pb -f
```
2018-08-14 23:28:59 -04:00
2018-10-09 20:48:48 -04:00
Upload a file to a different pastebin endpoint
2018-08-15 00:03:30 -04:00
```bash
pb -s http://0x0.st scores.txt
```
2018-10-09 20:48:48 -04:00
Shorten a URL
2018-08-15 00:03:30 -04:00
2018-10-09 20:21:18 -04:00
```bash
pb -u https://google.com
```
2018-08-15 00:00:46 -04:00
### Options
```bash
2018-10-09 20:21:18 -04:00
-h Show this help
-v Show current version number
2018-08-14 23:28:59 -04:00
-f Explicitly interpret stdin as filename
-c Pretty color output
2018-10-09 20:21:18 -04:00
-u Shorten URL
-s server_address Use alternative pastebin server address
2018-08-14 23:28:59 -04:00
```
2018-08-14 23:43:31 -04:00
### Install
`sudo make install`
_Note: On systems without admin access the binary can be run directly from the
git repo, but will lack `man` support and command completion._
### Uninstall
`sudo make uninstall`
2018-08-14 23:28:59 -04: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)