~fluix/pastry

A paste service with HTML and terminal syntax highlighting
Add upload page
Implement minimal upload features
Set default view count to 0

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~fluix/pastry
read/write
git@git.sr.ht:~fluix/pastry

You can also use your local clone with git send-email.

#Pastry

A paste and file upload service with HTML and terminal syntax highlighting.

#TL;DR

$ curl -F'file=@path.ext' p.cats.sh
https://p.cats.sh/abcd

#GET

Retrieve uploaded content through the endpoints below. Terminal syntax highlighting returns pastes highlighted using terminal escape sequences making it great for command-line use (e.g. curl). The canonical paths are as follows:

GET /<id>         raw
GET /<id>.        guessed HTML syntax highlighting
GET /<id>.<lang>  forced HTML syntax highlighting for language <lang>
GET /<id>+        guessed terminal syntax highlighting
GET /<id>+<lang>  forced terminal syntax highlighting for language <lang>

The following paths also exist for compatability[^1] with other paste services (e.g. ix.io) or ease of use:

GET /<id>/         -->  /<id>.
GET /<id>/<lang>   -->  /<id>.<lang>
GET /<id>.+        -->  /<id>+
GET /<id>.<lang>+  -->  /<id>+<lang>

[^1]: Compatability only in URL paths and some parameters (improvements welcome). Highlighting output will not be identical.

#Configuration

Pastry can accept configuration options from environment variables or a configuration file located at /etc/pastry/pastry.conf. The configuration file uses the same KEY=VALUE format as environment variables. Environment variables take priority over those set in configuration files.

See the defaults.conf file for configuration options.

#License

AGPLv3, see LICENSE.

Copyright © 2022-2023 Steven Guikal