Users should be able to link to other entries #9

Open
opened 3 years ago by isthisnagee · 1 comments
Owner

Not really sure how to best reflect this in a TUI. Might be useful for searching?

Not really sure how to best reflect this in a TUI. Might be useful for searching?
Poster
Owner

Say [[[note]]] is how notes are referenced.

There are a few things to decide:

  1. what goes in the brackets.
  2. How does it get linked.

For 1, I think we should support a few different ways, and we'll start with id. For example

This references the first note [[[id:1]]]

For 2, we should parse the text for all [[[note]]]. References get created in a table that maps a note id to another note id. When a note gets updated, we need to look for all the notes that it references and update accordingly.

For example, the note could initially look like this:

This references the first note [[[id:1]]], and this the second [[[id:2]]]

The table would look like:

source|target
3     | 1
3     | 2

Say an update is made:

This references the first note [[[id:1]]]

The table should be updated to reflect the deletion of that note

source|target
3     | 1
3     | 2
Say `[[[note]]]` is how notes are referenced. There are a few things to decide: 1. what goes in the brackets. 2. How does it get linked. For 1, I think we should support a few different ways, and we'll start with `id`. For example ``` This references the first note [[[id:1]]] ``` For 2, we should parse the text for all `[[[note]]]`. References get created in a table that maps a note id to another note id. When a note gets updated, we need to look for all the notes that it references and update accordingly. For example, the note could initially look like this: ``` This references the first note [[[id:1]]], and this the second [[[id:2]]] ``` The table would look like: ``` source|target 3 | 1 3 | 2 ``` Say an update is made: ``` This references the first note [[[id:1]]] ``` The table should be updated to reflect the deletion of that note ``` source|target 3 | 1 3 | 2 ```
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: isthisnagee/diary#9
Loading…
There is no content yet.