From 8422570ebddad0585cdaea91fe845bde65b3d2d1 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Mon, 9 Jan 2023 11:47:28 -0500 Subject: [PATCH] Initial support for YouTube/Invidious videos as Tiddlers. --- repository/TiddlyWiki/WebVideo.extension.st | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 repository/TiddlyWiki/WebVideo.extension.st diff --git a/repository/TiddlyWiki/WebVideo.extension.st b/repository/TiddlyWiki/WebVideo.extension.st new file mode 100644 index 0000000..4943c91 --- /dev/null +++ b/repository/TiddlyWiki/WebVideo.extension.st @@ -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: '<>'; + nextPutAll: ' + +* ''''DuraciĆ³n:'''' {{!!duration}} +* ''''Autor/a:'''' {{!!author}}'. + tiddler text: body contents. + + ^ tiddler +]