Open mbaltrusitis opened 1 year ago
I'm not sure if this applies to Reader only or Readwise in general. In my case, it's an issue with notes created in Reader. Because I can't seem to use an if
block with a someString.contains()
method or use RegEx to manually extract a domain name, I am stuck with having "reader" as the source, when I actually want the original source domain.
There are also other metadata attributes which are visible in Reader, but not accessible in templates. The other notable one is type
.
Thanks for this thread, I've wondered as well. Jinja examples for this Readwise - Obsidian interface are few and far between. Also check the Readwise API docs - https://readwise.io/api_deets
it seems we need to split the source_url into pieces and then parse out the domain. For me, I only want URL's for web addresses (not Kindle books, for example), so you may want to filter with an if. Try something like this - note this is off the cuff... I'm days away from my desktop.
{% if source == "web_clipper" -%} {% set weburl = source_url.split('.') %} {% endif %}
-- split by each period in the url -- concatenate items 1 and 2 (0 is the http stuff) -- tilde is the concatenate function
{% mydomain = weburl[1] ~ weburl[2] %}
Hope this helps.
user story.
As an Obsidian user I want to enter the domain of a URL as part of my document metadata so that I may explore the relationships between my notes and which sites I am most often using as reference or source material.
example.
Given the following Jinja template:
And the following document input:
I want the following output:
supplemental information.