I have created notes on various book that I have read with each note containing the following front matter:
Created: <% tp.file.creation_date(“dddd Do MMMM YYYY HH:mm:ss”) %>
Each note has a section where I have typed quotes from the book in the simple format:
“This is a quote” (Pg.1)
“This is a mother quote” (Pg.2)
I would now like to create a data view query on another note that will query all the book notes and return only quotes from a specific author. I would like the query to display the author, quote, book and page number of each quote in a table.
So far I can pull in the author and book but how can I pull in the quotes from the note. My query so far:
TABLE Author, Book_Title as "Book Title"
where author = “insert_name_of_author”
What I’m trying to do
Dataview is not designed to pull out chunks of text from your file; Obsidian’s core Search plugin is a better fit for that. You can embed a search query just like a dataview. I do not know the exact syntax but if you search for
line("Author: insert_name_of_author") that should get you the correct list of files.
Pinging @CawlinTeffid or one of the other forum residents with embedded search expertise!
@scholarInTraining ok thanks I did not know you could embed core Search queries so this looks promising. I will research the exact syntax
Hi @cheesycrips ! Did you manage to do what you wanted? I’m trying to do something very similar. In my case, I have a tag I use to identify every question my professor makes in class and I type it right after the question, in the same line. I’d like to know if it’s possible to query only these lines of text in a separate document. I also have them numbered in the beginning, so I think it could be sorted.
Okay, wow. I think this is more-or-less what I want; now, how do I reference these quotes, with attribution, in other notes?
The Dataview result is dynamic and it is not a file. Therefore, you cannot reference these quotes directly with attribution in other notes.
CASE 1: These quotes are dynamic
- Suppose that these quotes are dynamic and will be updated at times. Moreover, you would like to add a link to a block in an original note.
- The basic solution is to use Link to blocks in your original notes.
CASE 2: These quotes are static
- Suppose that these quotes are static and will be updated no longer. Moreover, you would not like to add a link to a block in an original note.
- You can copy the Dataview result into a markdown note which is named
- You can add a link to a block in the
Greek Alphabet : ![[Quotes_19831231#^f6b3c2]]
Turkish characters : ![[Quotes_19831231#^79387c]]
- filename :
## Author: someone
### Some Book
- "One quote"
- "Another quote"
- "Some quote"
### Another Book
- "One quote" (Pg.1)
- "This is some quote." (Pg.20)
- "It is another quote." (Pg.30)
- "αβγδεζηθικλμνξοπρςστυφχψω" ^f6b3c2
- "ÇçĞğıİÖöŞşÜü" ^79387c