mirror of
https://github.com/narrrl/narl-workspace.git
synced 2026-11-03 16:41:27 +01:00
files: a file belongs to a node, and a document holds its own
An upload while writing is now a file node of the document, through
POST /nodes/{id}/files, instead of a loose row of media that only the media
browser listed. It moves, seals, goes to the trash and comes back with the
document. Migration 0029 gives every embedded upload that had no node a
place under the document that embeds it (a living one before a trashed
one), keeping its media id, so no body changes; the sealed-folder triggers
now ask a document's folder for the files under it.
- nodes: `holds` and `place_for` say what may go where; a document holds
files and nothing else, in moves, uploads and restores from the trash.
A loaded document carries its files and whether its folder seals them.
- seal: a document moving into a sealed folder seals its files first.
- media: POST /media, GET /media and DELETE /media/{id} are gone, and with
them MediaBrowser and :media.
- import: `plan/` beside `plan.md` comes back as the document's files, the
shape export writes; an older export's media/ goes to the first document
that embeds each file.
- sftp: a document's files are `<slug>/` beside its `.md`, listed once it
has any, holding files only, moving with the `.md`.
- web: paste, drop and :upload while reading go to the document; the info
sheet has a files section (Enter opens, i embeds, y copies how); the list
shows +N on a document, za folds its files open, p drops marked files in.
This commit is contained in:
1 parent
2233fa41a6
commit
d8e72c688d
29 files changed
+869
-490
No files matched your search
+2
-3
@@ -50,11 +50,10 @@ sealed or not.
|
||||
| `GET`/`POST` | `/api/backup` | Proton Drive mirror: status / run now |
|
||||
| `POST`/`DELETE` | `/api/backup/login` | log the mirror in to Proton, body `{"username","password"}` / forget its session |
|
||||
| `POST` | `/api/backup/login/totp`, `/api/backup/login/captcha` | the two-factor code `{"code"}`, or the solved human check `{"token"}`, a waiting login asked for |
|
||||
| `GET`/`POST` | `/api/media` | list / upload (multipart) |
|
||||
| `GET`/`DELETE` | `/api/media/{id}` | serve (with `Range`) / delete a file nothing in the tree owns |
|
||||
| `GET` | `/api/media/{id}` | serve a file's bytes (with `Range`) |
|
||||
| `POST` | `/api/typst` | `{source}` of a ` ```typst ` block → `{svg}`, or `{error}` as typst words it |
|
||||
| `GET` | `/api/spaces/overview` | every space with what was last written in it |
|
||||
| `POST` | `/api/nodes/{id}/files` | upload files into this folder as file nodes (`?encrypt=true` seals them) |
|
||||
| `POST` | `/api/nodes/{id}/files` | upload files (multipart) into a space or folder, or to a document as its own; `?encrypt=true` seals them, and a sealed folder always does |
|
||||
| `POST` | `/api/nodes/{id}/inspect` | what a certificate, key or keystore file holds (`{password}` opens a protected one) |
|
||||
| `POST` | `/api/nodes/{id}/encrypt`, `/decrypt` | seal a file, or a folder for good — what is in it and what lands later — or take it out |
|
||||
| `GET`/`POST`/`PUT` | `/api/vault` | status / set the password once / change it |
|
||||
|
||||
@@ -41,6 +41,7 @@ arguments and `↑` / `↓` recall earlier lines.
|
||||
| `i · a` | edit the open document |
|
||||
| `R` | rename what is under the cursor — document, folder or card — starting from its name |
|
||||
| `m / p` | pick nodes up, then drop them all into the folder you walk to |
|
||||
| `za` | a document's own files, folded open under it in the list — again folds them away; p drops marked files in there |
|
||||
| `M` | pick up the whole folder — again puts it all back |
|
||||
| `Ctrl / Shift-click` | pick a row up · every row up to it — drag them onto a folder |
|
||||
| `S` | the board, the agenda and the calendar, tiled ahead of what is open with the board focused — S again puts every view away |
|
||||
@@ -191,7 +192,7 @@ do: `:w!`, `:space! <name>`, `:import!`.
|
||||
| `:cards` | the cards about the open document — its own, and the ones whose summary links here: j/k picks the one :due, :label, Space and H/L act on, Enter turns it over on its board (gc) |
|
||||
| `:source` | show an open markdown file as written, or rendered again |
|
||||
| `:outline, :toc` | the open document's headings to pick from — gO, in the editor too |
|
||||
| `:info [outline\|history\|backlinks\|cards\|share]` | what is known about the open document: its headings, earlier versions, backlinks, cards and sharing — Tab between them (gi) |
|
||||
| `:info [outline\|history\|backlinks\|cards\|files\|share]` | what is known about the open document: its headings, earlier versions, backlinks, cards, files and sharing — Tab between them (gi) |
|
||||
| `:search, :se [text]` | full-text search in this space (empty clears) |
|
||||
| `:search!` | full-text search across every space — Ctrl-P |
|
||||
| `:clear, :noh` | clear the search filter |
|
||||
@@ -223,9 +224,8 @@ do: `:w!`, `:space! <name>`, `:import!`.
|
||||
| `:name, :title, :rename <text>` | rename what is under the cursor — document, folder, or card on a board; bare, while writing, into the title |
|
||||
| `:name!` | rename the space you are in — on the board, the list under the cursor |
|
||||
| `:date <yyyy-mm-dd>` | re-date the open document |
|
||||
| `:upload, :up` | while writing, attach files at the cursor — otherwise put files into this folder |
|
||||
| `:upload, :up` | files for the open document — while writing, embedded at the cursor — or, from the list, into this folder |
|
||||
| `:upload!` | put files into this folder sealed in the vault — encrypted before they touch the disk |
|
||||
| `:media` | browse everything you have uploaded — j/k, i inserts it while writing, y copies its address, x deletes |
|
||||
|
||||
### Sharing & export
|
||||
|
||||
|
||||
@@ -3,13 +3,20 @@
|
||||
## Files
|
||||
|
||||
A file is a node like a document, only with bytes instead of text. It sits in a
|
||||
folder beside the notes about it, shows its size in the list, and `Enter` opens
|
||||
it.
|
||||
folder beside the notes about it, or belongs to a document, shows its size in
|
||||
the list, and `Enter` opens it.
|
||||
|
||||
A document's own files are the ones pasted or dropped into it while writing,
|
||||
and the ones `:upload` puts in while reading it. They move, seal, go to the
|
||||
trash and come back with the document. A document with files says `+2` in the
|
||||
list; `za` folds them open under it, and `:info files` lists them too. With
|
||||
the cursor among them, `p` drops files picked up elsewhere in.
|
||||
|
||||
Put files in:
|
||||
|
||||
- drop them onto the list;
|
||||
- `:upload` picks files for the folder you are in;
|
||||
- `:upload` picks files for the folder you are in, or for the document you
|
||||
are reading;
|
||||
- `:import` uploads a whole folder, and `:import!` a zip
|
||||
(see [Not losing things](Not-Losing-Things.md#import));
|
||||
- copy them in over the [SFTP mount](SFTP.md).
|
||||
|
||||
@@ -33,6 +33,9 @@ directory.
|
||||
different first heading back renames it.
|
||||
- Files sit beside the documents under their own names. A later file with the
|
||||
same name is told apart by its id: `slides (42).pdf`.
|
||||
- A document's own files are in `<slug>/`, beside its `.md`. The directory is
|
||||
listed once the document has a file, and can be copied into either way. It
|
||||
holds files and nothing else, and moves when the `.md` is renamed.
|
||||
- Anything copied in that is not a `.md` becomes a file, and its text is
|
||||
indexed for search.
|
||||
- `rm` and `rmdir` put things in the trash, as a delete in the browser does.
|
||||
|
||||
@@ -79,6 +79,7 @@ reader:
|
||||
| `gi` | the info sheet |
|
||||
| `gO` | the headings as a list to jump to |
|
||||
| `zl` / `zh` | scroll a wide table or code block sideways |
|
||||
| `za` | fold a document's own files open under it in the list |
|
||||
| `F` | a letter over every link and button in view; type it to follow |
|
||||
| `gh` | earlier versions |
|
||||
| `gb` | the documents that link here |
|
||||
|
||||
@@ -28,9 +28,11 @@ note in the scratchpad are written in it too, and behave the same way.
|
||||
back on. On a touch screen they start off.
|
||||
|
||||
Drag, drop or paste an image, a video or a sound file into the text and it is
|
||||
uploaded and embedded where the cursor is. `:upload` picks files to embed, and
|
||||
`:media` lists every upload: `Enter` embeds the one under the cursor, `y`
|
||||
copies its address.
|
||||
uploaded and embedded where the cursor is. `:upload` picks files to embed. Each
|
||||
one becomes a file of the document: it moves, seals, goes to the trash and
|
||||
comes back with it. `:info files` lists them: `Enter` opens one, `i` embeds it
|
||||
at the cursor, `y` copies how to embed it in another document. In the list a
|
||||
document with files says `+2`, and `za` folds them open under it.
|
||||
|
||||
## Saving
|
||||
|
||||
|
||||
Reference in new issue
Block a user