Initial support for YouTube/Invidious videos as Tiddlers.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-01-09 11:47:28 -05:00
parent e9b199f77f
commit 8422570ebd

View File

@ -0,0 +1,23 @@
Extension { #name : #WebVideo }
{ #category : #'*TiddlyWiki' }
WebVideo >> asTiddler [
| tiddler body |
tiddler := Tiddler new
title: self title.
tiddler customFields
at: 'uid' put: self videoId;
at: 'author' put: self author;
at: 'authorId' put: self authorId;
at: 'duration' put: self duration.
body := '' writeStream.
body
nextPutAll: '<<richlink "https://www.youtube.com/watch?v=', self videoId ,'">>';
nextPutAll: '
* ''''Duración:'''' {{!!duration}}
* ''''Autor/a:'''' {{!!author}}'.
tiddler text: body contents.
^ tiddler
]