Beter zo
This commit is contained in:
17 files changed
+253
-237
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# Pastable
|
||||
# Pastabble
|
||||
|
||||
Pastable is a free and open-source Plabble initiative for sharing text, code, short links, and one-time secrets.
|
||||
Pastabble is a free and open-source Plabble initiative for sharing text, code, short links, and one-time secrets.
|
||||
|
||||
## Run locally
|
||||
|
||||
@@ -24,11 +24,11 @@ Route handlers can access the shared database pool with the `State(pool): State<
|
||||
|
||||
## Browser app
|
||||
|
||||
Open `/gui` for the browser workspace. Create text pastes, one-time secrets, and short links; choose custom IDs, languages, expiry, and view limits. After saving, a dialog prominently displays the returned link for copying or opening. Opening a share navigates directly to its page or redirect.
|
||||
Open `/` for the browser workspace. Create text pastes, one-time secrets, and short links; choose custom IDs, languages, expiry, and view limits. After saving, a dialog prominently displays the returned link for copying or opening. Opening a share navigates directly to its page or redirect.
|
||||
|
||||
The language dropdown is populated from irosashi's supported grammars. The home page renders this README as HTML and shares the browser app's logo, navigation, and styling.
|
||||
The language dropdown is populated from irosashi's supported grammars. The documentation page at `/docs` renders this README as HTML and shares the browser app's logo, navigation, and styling.
|
||||
|
||||
Sign in with HTTP Basic credentials to browse, filter, edit, and delete your own shares. A new username creates an account. Credentials stay in page memory and are cleared on sign-out or reload. Creating and managing shares uses the existing API without page reloads.
|
||||
Sign in with HTTP Basic credentials to browse, filter, edit, and delete your own shares. A new username creates an account. Credentials are stored in localStorage to keep you signed in across page reloads and browser restarts. Signing out removes the saved credentials. Creating and managing shares uses the existing API without page reloads.
|
||||
|
||||
Opening a paste or following a short link counts as a view. Listing records and loading them into the editor do not. Updates preserve omitted options and view counters.
|
||||
|
||||
@@ -66,7 +66,7 @@ All paths are relative to the server URL. `{id}` is a path parameter containing
|
||||
|
||||
**Returns:** the assigned ID as plain text. This is an ID, not a full URL. Always use the returned ID, since a requested custom ID may already be taken.
|
||||
|
||||
Generated IDs contain exactly 8 alphanumeric characters, generated in Rust with `rand`. Confusing characters (`0`, `1`, `I`, `L`, `O`, `i`, `l`, `o`) are excluded. IDs are shared by pastes and short links. Reserved route names (`gui`, `list`, `once`, `to`, and `static`) and IDs containing `/` are unavailable as custom IDs; these also receive a generated ID.
|
||||
Generated IDs contain exactly 8 alphanumeric characters, generated in Rust with `rand`. Confusing characters (`0`, `1`, `I`, `L`, `O`, `i`, `l`, `o`) are excluded. IDs are shared by pastes and short links. Reserved route names (`docs`, `list`, `once`, `to`, and `static`) and IDs containing `/` are unavailable as custom IDs; these also receive a generated ID.
|
||||
|
||||
Create a paste from raw text:
|
||||
|
||||
@@ -106,7 +106,7 @@ curl --request POST 'http://localhost:3000/once/my-secret' \
|
||||
|
||||
HTML paste pages show the view counter, including the current read, and the maximum when set. HTML and plain-text responses include `X-Paste-Views` and, when limited, `X-Paste-Max-Views` response headers, so displaying the counter does not require another read.
|
||||
|
||||
The HTML page includes a **Copy raw code** button that preserves the original content and whitespace without another request or view. If clipboard access is unavailable, the raw text is selected for manual copying.
|
||||
The HTML page includes a **Copy** button that preserves the original content and whitespace without another request or view. If clipboard access is unavailable, the raw text is selected for manual copying.
|
||||
|
||||
Each successful read increments `views`. The final permitted read returns the content and deletes the paste. Missing, expired, and exhausted pastes return `404`. Expired and exhausted records are also cleaned up in the background every minute.
|
||||
|
||||
@@ -198,4 +198,6 @@ curl --user 'alice:example-password' 'http://localhost:3000/list'
|
||||
|
||||
### Home page
|
||||
|
||||
`GET /` returns the home page.
|
||||
`GET /` returns a plain-text welcome message with a link to `/docs` by default, including via curl. With `Accept: text/html`, it returns the browser workspace.
|
||||
|
||||
`GET /docs` returns the README as Markdown by default, including via curl. With `Accept: text/html`, it returns the documentation page as HTML.
|
||||
Reference in new issue
Block a user