Hi,
I want to find videos again I have watched by specific creators which is why I usually tag the videos with their title and creator. Unfortunately, logseq doesn’t create a separate page for videos, so I can’t use the filter. Otoh, roam does have this feature.
Has anyone found a workaround yet?
logseq: {{video https://youtu.be/R8uxmXmtOrk}}
roam: {{[[video]]: https://youtu.be/R8uxmXmtOrk}}
Welcome. Try a query like this one:
#+BEGIN_QUERY
{:title "Blocks that contain string youtu"
:query [:find (pull ?b [*])
:where
[?b :block/content ?content]
[(clojure.string/includes? ?content "youtu")]
]
}
#+END_QUERY
- Such a query can be slow in big graphs.
- As soon as you get the results, proceed to tag them (e.g. with
#video
).
- That way you will get the separate page
video
with all of them.
1 Like
If there are a lot of such videos in your graph, consider writing your own script to automate the entire workflow:
- Script processes all markdown files
- Extract a
{{video }}
block using regex
- Get HTML content from YouTube link
- Get title and creator info from HTML content
- Writes the info as tags (or properties) back to the markdown file, in a way that Logseq recognizes
1 Like