Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/enter-tainer/rspb
pastebin written in pure rust. A rewrite of ptpb/pb.
https://github.com/enter-tainer/rspb
pastebin pastebin-service pb ptpb rust
Last synced: 21 days ago
JSON representation
pastebin written in pure rust. A rewrite of ptpb/pb.
- Host: GitHub
- URL: https://github.com/enter-tainer/rspb
- Owner: Enter-tainer
- License: mit
- Created: 2021-01-10T15:25:10.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-11-28T22:04:58.000Z (almost 2 years ago)
- Last Synced: 2024-10-03T12:23:35.960Z (about 1 month ago)
- Topics: pastebin, pastebin-service, pb, ptpb, rust
- Language: Rust
- Homepage: https://pb.mgt.moe
- Size: 153 KB
- Stars: 43
- Watchers: 4
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rspb
rust fork of [ptpb/pb](https://pb.mgt.moe)
## TL;DR
Create a new paste from the output of cmd:
```
cmd | curl -F c=@- https://pb.mgt.moe/
```
## Usage
### Creating pastes
```
> echo hi | curl -F c=@- https://pb.mgt.moe/
date: 2021-01-16 03:26:09.614299435 UTC
digest: 0b8b60248fad7ac6dfac221b7e01a8b91c772421a15b387dd1fb2d6a94aee438
short: e74l
size: 3
url: http://pb.mgt.moe/e74l
status: created
uuid: 7535e567-173f-4ba0-98ce-71cdd8f02d69
```
### Updating pastes
```
> curl -X PUT -F c=@- pb.mgt.moe/7535e567-173f-4ba0-98ce-71cdd8f02d69 < config.yamlhttp://pb.mgt.moe/e74l updated
```
### Using mimetypesAppend '.pdf' to hint at browsers that they should probably display a pdf document:
```
https://pb.mgt.moe/ullp.pdf
```
### Deleting pastes
```
> curl -X DELETE pb.mgt.moe/7535e567-173f-4ba0-98ce-71cdd8f02d69deleted 7535e567-173f-4ba0-98ce-71cdd8f02d69
```
### Shortening URLs```
> echo http://google.com | curl -F c=@- pb.mgt.moe/u
date: 2021-01-16 03:29:13.865511999 UTC
digest: a1adc32c271516bfb33069304087db349649146f24744b4028d2f975697fd707
short: 1unf
size: 11
url: http://pb.mgt.moe/1unf
status: created
uuid: b87dcc37-a4c2-4d18-a3a3-c2d875912cde
```
### Syntax highlighting
add '.rs' to the url to highlight rust source
```
http://pb.mgt.moe/1e6d.rs
```### Vanity pastes
```
> echo nin | curl -F c=@- https://pb.mgt.moe/mom
date: 2021-01-16 03:34:22.359830934 UTC
digest: e2f55e5ed88dee2a50c9bb255ad87657e7f173e2560e27ceec8b206e2bc4afaf
short: 20ko
size: 4
url: http://pb.mgt.moe/mom
status: created
uuid: bac23f0c-0f06-4525-8ae4-624268485ef7
```### Sunsetting pastes
```
> echo "This message will self-destruct in 5 seconds" | curl -F sunset=5 -F c=@- pb.mgt.moe
date: 2021-01-16 03:32:33.225306167 UTC
digest: 15cefec0e22ce1b1bfc1d06c77620cc41f8d6f1664edb023a8d63b5d0b6ef5a7
short: 19vl
size: 45
url: http://pb.mgt.moe/19vl
status: created
uuid: 7ede8735-7af3-4ee7-87bb-fc63d2a39306
> curl http://pb.mgt.moe/19vl
This message will self-destruct in 5 seconds
> sleep 5
> curl http://pb.mgt.moe/19vl
expired
```
Expire in (secs):
## Deploy
Download release and then run docker-compose up