Paws is a simple Markdown pastebin proxy! https://pawty.cc/api/docs/paws_proxy/index.html
Go to file
hkau 0404b38ca1 [add] markdown: <theme>, <hue>, <sat>, <lit> 2024-03-31 19:40:23 -04:00
examples/paws Initial 2024-03-31 18:55:36 -04:00
src [add] markdown: <theme>, <hue>, <sat>, <lit> 2024-03-31 19:40:23 -04:00
static Initial 2024-03-31 18:55:36 -04:00
templates [add] markdown: <theme>, <hue>, <sat>, <lit> 2024-03-31 19:40:23 -04:00
.gitignore Initial 2024-03-31 18:55:36 -04:00
Cargo.toml Initial 2024-03-31 18:55:36 -04:00
LICENSE Initial 2024-03-31 18:55:36 -04:00
README.md Initial 2024-03-31 18:55:36 -04:00
justfile Initial 2024-03-31 18:55:36 -04:00
package.json Initial 2024-03-31 18:55:36 -04:00
static_build.ts Initial 2024-03-31 18:55:36 -04:00
tsconfig.json Initial 2024-03-31 18:55:36 -04:00

README.md

🐾 paws

Paws is a simple Markdown pastebin proxy!

User authentication is handled by Guppy!

Guppy only supports the board-orientated markup features of Bundlrs.

Guppy is designed to be able to interface with the same database as a Bundlrs instance! It will use existing users from the Users table and existing posts from the Logs table.

Configuration

Paws requires the following environment variables to integrate with the other required services:

  • GUPPY_ROOT - root address of the guppy server
  • BUNDLRS_ROOT - root address of the bundlrs server (used for markdown rendering since some pastebins use a CSRF token)

The rest of the configuration (for databases) can be found in the Bundlrs README.

Example Paw

Paws uses simple "paw" files to transcribe API endpoints of different services to one unified API. Paws (referring to the files) are written in TOML, so they should be easy enough to write manually. You just need a few simple endpoints!

  • get - Get existing paste
  • new - Create new paste
  • edit - Edit existing paste
  • delete - Delete existing paste
  • render - Render Markdown content
  • exists - Check if a custom URL is already taken

You can provide a translation guide in the endpoint description that allows Paws (referring to the server) to transcribe its endpoints to the endpoints of the target platform with a simple syntax:

You can use ? to represent an API endpoint parameter field (filled in order):

...
# /api/new
body = "{ \"custom_url\":\"?\", \"edit_password\":\"?\", ... }"

Aaaand that's it! That's all you really need to complete simple API endpoints.

Example paws are included in the examples/paws/ directory.

License

You can view the Paws license here. Paws is not meant to circumvent measures set by given platforms and is only a fun experiment!