I want to be able to input metadata in a structured way.
Update Feb 2021:
This is a prerequisite for Table / spreadsheet functionality (when interpreted like modeling notion database features) and Ability to use logical operators for searching (Queries).
Roam seems to do it with ::
as well. (I don’t know for sure, I never used it.)
Current State: RemNote Templates
Maybe this can be done with the current features already, but the obvious way using templates and ::
is not satisfactory for me because it overlaps with the flashcard functionality.
Here is how it currently works (how I understand it):
- A rem has 2 parts: the key|name (front side, before
::
) and a value|content (back side, after::
) (named differently internally|in API). - Tagging a rem R with a tag T makes R an instance of type T.
- All slots of T are suggested to be inserted for R.
- If you insert a slot in R it is referenced automatically to the slot definition in T.
- You are supposed to (I think) use this as the front of the flashcard, write
::
after and add a value, turning this slot instance to a descriptor.- This always turns the rem into a flashcard which might not be useful. I don’t want to learn the release year of books or in which related keywords I have assigned which are useful for certain queries.
- If this reference (or any reference unrelated to a template slot) is the last element of a rem, it is implicitly tagged with that reference.
- It shows up in the markup as a data tag.
- You can see and delete this implicit relation using the little x (What’s the little x after a reference for?).
- I don’t know if this has any other implications. It does not show up for example when searching for a tag normally with a search portal.
- But you can search for this reference like any other reference.
- It can be awkward because RemNote inserts spaces all the time, probably as a quick&dirty fix for some editor issues.
The problem with this approach is that you can either chose to use ::
to split the rem key/value and have a potentially unnecessary flashcard which clutters remnote.io/cards or not use ::
but then you have to manually extract the value from the key later.
Is there already a best practice for this which I don’t know?
The semantically best thing for querying I can come up with be to use plain tags because they are not part of the rem text. But Sönke Ahrens #author
is harder to read than Author: Sönke Ahrens
.
I have not used Roam queries so I don’t know if there are methods/conventions to comfortable query without a metadata/attribute format and do more powerful stuff than “show me all rem which contain those references”.
QoL: Multiplicity of slots
You can have a slot multiple times, e.g. for multiple authors or keywords. It would be nice if there was a for format to still have everything on one line. On the other hand you could just search like value.includes("search term")
instead of value == "search term"
if future queries support string matching. Not sure yet.
Sidenote on Querying with Templates
I have not yet made up my mind how to input data regarding how I want to query my knowledge base in the future. Using templates locks you into a hierarchical structure. For example if I would have two templates for #Book
and #Article
, both having an author
then Book > author
is different from Article > author
and when I want to search for all author I’d have to create a union to find all authors. But then I’d have to know all types having an author
(oops I forgot #Paper
).
-
I could use tag inheritance and create a superclass
#Publication
with aauthor
slot and tag/inherit likeBook #Publication
. Or go full overboard and have traits/mixins like#authorable
.
-
Or I don’t use the template mechanism at all and just paste literal templates (using a third party tool). Which reference a top specific rems of my choice (e.g. a top-level rem
Author
). But built-in templates are more portable when switching devices.
Any suggestions on how to use templates/references/tags to best prepare for queries?