First, search the help docs and this forum. Maybe your question has been answered! The debugging steps can help, too. Still stuck? Delete this line and proceed.
What I’m trying to do
Things I have tried
About 3 months ago I started with Obsidian and frequently use Web Clipper.
Also found nice templates for specific sites, like Wikipedia, LinkedIn and Youtube.
For Yoube I found a nice template but want to use it as a source for modification into my own Youtbue-notes preferences:
The easy part was removing the time-stamp from property “” created" and limited it to a Dutch formatted date dd-mm-yyyy.
Then I wanted to modify the duration, from seconds to H:mm:ss.
Followed the Obsidian help: Help → Obsidian Web Clipper → Filters → duration:
"Converts ISO 8601 duration strings or seconds into formatted time strings. Uses tokens: HH (padded hours), H (hours), mm (padded minutes), m (minutes), ss (padded seconds), s (seconds).
“PT1H30M”|duration:“HH:mm:ss” returns “01:30:00”.
“3665”|duration:“H:mm:ss” returns “1:01:05”.
Setting duration without any parameters uses HH:mm:ss over 1 hour, mm:ss under 1 hour.
Supports both ISO 8601 duration strings (e.g., PT6702S, PT1H30M) and plain seconds."
Ended up in nearly endless number of permutations of number and place of quotation marks. and get it partially wordkinG: But I’m afraid to have to give up.
Tested this by duplicating the "duration"in the orgianal JSON-file and plying around with that “Format duration” property:
{
"name": "duration",
"value": "{{schema:@VideoObject:duration|replace:\\\"PT\\\",\\\"\\\",\\\"S\\\",\\\"\\\"}}",
"type": "text"
},
{
"name": "format duration",
"value": "{{schema:@VideoObject:duration|duration:H:mm:ss}}",
"type": "text"
},
What do I do wrong?
Used this video, with duration of 1:58:56 (exactly the format I’m trying to achieve): https://www.youtube.com/watch?v=YWo3v8uw3WA
What I get in my note is this:
duration 7137
format duration 1:00:7137
Any help appreciated!
