You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/usage.md
+15-3Lines changed: 15 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,19 +16,31 @@ If the above line is present in one of your notes, this plugin will detect it, a
16
16
17
17
```
18
18
<!-- QueryToSerialize: LIST FROM #quotes WHERE public_note = true SORT file.name ASC -->
19
-
<!-- SerializedQuery: LIST FROM #quotes WHERE public_note = true SORT file.name ASC -->
19
+
<!-- SerializedQuery: -->
20
20
- [[20 years from now, the only people who will remember that you worked late are your kids]]
21
21
- [[A beautiful book is a victory won in all the battlefields of human thought.md|A beautiful book is a victory won in all the battlefields of human thought]]
22
22
- [[A busy mind accelerates the perceived passage of time. Buy more time by cultivating peace of mind]]
23
23
...
24
24
<!-- SerializedQuery: END -->
25
25
```
26
26
27
-
As you can see above, the result of the query gets added as Markdown below the query. Notice that the serialized version is surrounded by `<!-- SerializedQuery: <query> -->` and `<!-- SerializedQuery END -->`. Those allow the plugin to know what to replace. They should not be removed.
27
+
As you can see above, the result of the query gets added as Markdown below the query. Notice that the serialized version is surrounded by `<!-- SerializedQuery: -->` and `<!-- SerializedQuery END -->` to delimit the serialized query.
28
28
29
29
Whenever you update that note, the query will be executed and serialized, replacing the previous serialized version.
30
30
31
-
WARNING: For now, the queries can only be put on a single line. Take a look at [this issue](https://github.com/dsebastien/obsidian-dataview-serializer/issues/12) for details/updates.
31
+
Multiple line queries are now supported, here is an example:
32
+
```
33
+
<!-- QueryToSerialize:
34
+
TABLE
35
+
dateformat(release-date, "yyyy-MM-dd") AS "Release Date",
36
+
dateformat(started-date, "yyyy-MM-dd") AS "Started Date",
37
+
dateformat(finished-date, "yyyy-MM-dd") AS "Finished Date",
38
+
rating-out-of-ten + choice(recommended, " ❤️", "") AS "Note"
39
+
FROM "Y. Content/Games" OR "03 - Resources/Games"
40
+
WHERE file.name != "🏠 Games"
41
+
SORT finished-date DESC
42
+
-->
43
+
```
32
44
33
45
Note that a single note can include multiple queries. As soon as a file is modified, this plugin reads it and tries to locate queries to serialize. It starts by removing all the serialized queries, recognized by the `<!--SerializedQuery: END -->`line. Then, it serializes all the found queries to Markdown and saves the file again.
0 commit comments