this post was submitted on 21 Jun 2023
8 points (100.0% liked)
ObsidianMD
4068 readers
1 users here now
Unofficial Lemmy community for https://obsidian.md
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Just to make sure I understand, you want your Author notes to have a Dataview table containing all the books they've written?
For each Book note, do you have a field (either in YAML or inline Dataview) pointing to the Author note? What I personally do is have an inline field that links to the Author note:
Author:: [[Stephen King]]
Then in the Author note I'll have this:
table without id link(file.link,title) AS Book, Year FROM "BOOK FOLDER" WHERE contains(Author, this.file.link)
Replace BOOK FOLDER with wherever your books are. Then you can paste this into all your Author notes. Even better, make an Author template so you don't have to type it each time you make an Author note.
Thanks a lot for your promt reply. Obviously I was not so clear in explaining what I'm looking for, sorry. I already have an "author folder" with the same output you indicate (one note for each author. I have also an "Author Gallery" with a list of all the authors with this dataview code:
TABLE genre as Genere FROM "autori" SORT file.name
I wish to have, instead of genre a list of all "my" books from this author. Could this be possible?Do you want to do something like this?
The only thing you would need to change in this code is the Book Folder and Author Folder.
But if you would like it to be a more visually appealing gallery, there may be some community plug ins you'll have to try.
Just a question: if a book have more than one author, how do you suggest to modify your code or the YAML in order to show the books?