Keep in mind that those instructions assume that you have tiddlywiki on
node.js installed globally.
Here's a script/command line example:
tiddlywiki --load tw-with-images.html \
--output test4 \
--savetiddlers [is[image]] images \
--setfield [is[image]] "_canonical_uri" \
"$:/core/templates/canonical-uri-external-image" \
"text/plain" \
--setfield "[is[image]]" "text" "" "text/plain" \
--rendertiddler "$:/core/save/all" "tw-external.html" "text/plain"
where tw-with-images.html is your source file, "images" is the name of the
image directory, test4 is a directory where the output (images and html)
will go, and tw-external.html is the new TW file where images have been
replaced with external image links.
The caveat is that I think you can only run this once against your source
file. I'm not sure what will happen with to images that have already been
replaced with external uris. Likewise, double check any of your source
image tiddlers that you have already replaced by hand with _canonical_uri
paths. I'm sure someone smarter than me could improve the filtering in the
above so that it skips images that use the _canonical_uri field.
Be sure to make backups before trying this!
Good luck!
On Saturday, July 3, 2021 at 3:00:43 AM UTC-7 [email protected] wrote:
> Can't do it, the instruction doesn't work
> https://groups.google.com/g/tiddlywiki/c/PueCb0KGmvM
>
> суббота, 3 июля 2021 г. в 04:05:56 UTC+3, Mark S.:
>
>> If you scroll down on that tiddler the section *Creating external images
>> under Node.js *explains how you can export all your images into a
>> separate folder using node.js. But, of course, first you have to set up and
>> run TiddlyWiki on node.js. After the image files are exported then you can
>> convert your node TW instance back to a single file instance.
>>
>> Using the new (prerelease 24?) and the zip plugin it might be able to
>> come up with a solution that doesn't need node.js, but that would be all
>> new territory.
>>
>> On Friday, July 2, 2021 at 5:11:23 PM UTC-7 [email protected] wrote:
>>
>>> 436 images. But I think the problem is with several very large BMP
>>> files. They even take a few minutes to load like raw text. And now I want
>>> to delete, and make the pictures external.
>>> https://tiddlywiki.com/static/ExternalImages.html
>>>
>>>
>>> пятница, 2 июля 2021 г. в 23:46:44 UTC+3, Mark S.:
>>>
>>>> Congratulations -- when I imported Evernote, I didn't get any images!
>>>>
>>>> I think what's happening is that your TW is jam-packed with images. To
>>>> verify this theory, go to the "Filter" tab of the advanced search and try
>>>> this filter:
>>>>
>>>> [all[tiddlers]get[type]prefix[image]count[]]
>>>>
>>>> What is the number you see?
>>>>
>>>> In the meanwhile, when using the "More" tab, avoid using the "Recent"
>>>> sub tab which requires a lot of rendering.
>>>>
>>>>
>>>>
>>>>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/74f050c7-61b8-422b-90ba-17e9ba6f5f6en%40googlegroups.com.