Initial support for YouTube/Invidious videos as Tiddlers.
This commit is contained in:
parent
e9b199f77f
commit
8422570ebd
23
repository/TiddlyWiki/WebVideo.extension.st
Normal file
23
repository/TiddlyWiki/WebVideo.extension.st
Normal 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
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user