``` ██████╗ ██╗ █████╗ ██╗ ██╗ ██╔══██╗██║ ██╔══██╗██║ ██╔╝ ██████╔╝██║ ███████║█████╔╝ ██╔═══╝ ██║ ██╔══██║██╔═██╗ ██║ ███████╗██║ ██║██║ ██╗ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ``` # plak Plak is one long page to paste into and copy from, on the fly. Text, Markdown, a screenshot, a piece of code, a CSV from a spreadsheet: put it here, and take it out again when you need it. There is nothing to open and nothing to save. Plak saves while you type and keeps everything of the last 14 days. Type or paste at the bottom. The end of the page always sits in the middle of the window, so you can start at once. Markdown stays as you type it; plak shows it as plain text, so you copy out exactly what you put in. Plak starts with a welcome text. Delete it whenever you like: Plak Help in the menu bar adds the help text at the end of the page. ## Open and hide `⌘N` shows plak from any app, on the desktop you are on. It also pops up when an app is in fullscreen: plak shows over it, so you never have to leave that app first. Press `⌘N` again, or `Esc`, and you are back in the app you came from, with its caret ready. `⌘W` hides plak too. Plak lives in the menu bar, not in the Dock. Its menu has Show Plak, Hide Plak, Plak Help and Quit Plak. ## Images Paste a screenshot or a copied image with `⌘V`, or drag image files from Finder onto the page. The caret shows where the image will land, and each image goes on its own line. Backspace deletes an image, `⌘Z` brings it back. Copy an image with the text around it, and a paste back into plak gives the image again. ## Code and tables Paste code and plak turns it into a code block by itself: PHP, JSON and XML are recognised the moment you paste them, and show with syntax colours. JSON on one line is made readable. Click a code block to edit it in place; `Esc` ends the edit. ```json { "app": "plak", "pages": 1, "saves": "while you type" } ``` Paste a CSV and it becomes a table. Click a cell and move with the arrows or `Tab`. Type to replace a value, `Enter` to edit it. `Enter` on the last row adds a row, `Tab` on the last column adds a column. `⌘⌫` deletes a row, `⌥⌘⌫` deletes a column. Want the text, not the object? Paste with `⌥⇧⌘V`. ## Shortcuts | Keys | Action | | --- | --- | | `⌘N` | show or hide plak | | `Esc` or `⌘W` | hide plak | | `⌘V` | paste text / image / code / CSV | | `⌥⇧⌘V` | paste as plain text | | `⌘Z` / `⇧⌘Z` | undo / redo | | `⌘↓` / `⌘↑` | end / start of the page | | `⌘+` / `⌘−` / `⌘0` | text bigger / smaller / default | | `⌘.` / `⌘,` | column wider / narrower | | `⌘`-click | open a link | | `⌘Q` | quit plak | ## Bookmarks A bookmark marks a place on the page, so you can find it again. Type an `=` at the very start of a line, directly followed by a title, as `=meeting notes` or `=todo`. No space after the `=`, and only one `=`. The line shows in bold orange; put the caret on it and it shows as you typed it. Plak builds an index from the bookmarks. The last 10 bookmarks of the page are always listed at the top left, each with its title and the date of its block. The index stays in place while you scroll; click an entry and plak jumps to that bookmark. Click `end`, the last entry, and plak jumps to the end of the page. ## From other apps Other apps, scripts and Shortcuts add to the page with a `plak://` address. What they send lands at the end of the page as a new block, and plak shows it. PHP, JSON and XML become a code block and a CSV becomes a table, as with `⌘V`. ```bash open 'plak://append?text=hello%20world' open 'plak://paste' ``` The first adds the text. The second adds what is on the clipboard: text, an image, or a CSV that turns into a table. ## Filler text Type `#lorem` at the start of a line and it turns into filler text: a sentence, two paragraphs, and made-up telephone numbers, addresses and e-mail addresses. `⌘Z` brings back `#lorem`. ## Links A web or mail address is a link, as https://www.blijnder.nl. Hold `⌘` and click it to open it. ## Where it lives The page is one plain text file: `~/Library/Application Support/plak/page.md`. Images go in the `images` folder next to it. Each block remembers when you made it; the index shows that date for a bookmark. Each time plak starts, it removes every block that is more than 14 days old, every block without a date, and the images that the page no longer uses. A removed block is gone for good, so keep elsewhere what you need longer. ## Local development ```bash scripts/run.sh scripts/test.sh scripts/bundle.sh --install ```