Download for wikis with embedded media via external curl.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-07-31 14:35:47 -05:00
parent eedff7e4cc
commit 1d452d767d

View File

@ -232,13 +232,12 @@ TiddlyWiki >> downloadHTML [
TiddlyWiki >> downloadLink: v into: subfolder [
| filePath fileName semiFilePath |
fileName := v asUrl segments last.
semiFilePath := subfolder , fileName.
filePath := (FileLocator temp / semiFilePath) fullName.
filePath := subfolder / fileName.
GtSubprocessWithInMemoryOutput new
shellCommand: 'curl -L -# ' , v , ' -o ' , filePath;
runAndWait;
stdout.
^ FileLocator temp / semiFilePath
^ semiFilePath
]
{ #category : #accessing }
@ -1034,6 +1033,7 @@ TiddlyWiki >> tiddlersJSONFile [
{ #category : #accessing }
TiddlyWiki >> tiddlersJSONUrl [
self isInTiddlyHost ifTrue: [^ self remote / 'tiddlers.json' ].
self remote ifNil: [^ nil].
]