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