Problem with TiddlyWiki 5 after importing EverNote.

207 views
Skip to first unread message

Mike Andyl

unread,
Jul 2, 2021, 7:34:53 AM7/2/21
to TiddlyWiki
I have two notebooks in total 80MB. I imported them and now TiddlyWiki  doesn't work well. Number of tiddlers 629.
1. I see a lot of entries that are pictures and it distracts me. Is it possible to hide them somehow? There are a lot of them and, of course, I don’t want to do it with my hands with each one!
2. Now the main file is processed for a long time on loading and uploading. How can I put all pictures in a folder so that they do not interfere with the database?
3. Many commands for checking on the "More" tab now freeze the browser.
What can be done here?

Mark S.

unread,
Jul 2, 2021, 4:46:44 PM7/2/21
to TiddlyWiki
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.



Mike Andyl

unread,
Jul 2, 2021, 8:11:23 PM7/2/21
to TiddlyWiki
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.:

Mark S.

unread,
Jul 2, 2021, 9:05:56 PM7/2/21
to TiddlyWiki
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.

Mike Andyl

unread,
Jul 3, 2021, 6:00:43 AM7/3/21
to TiddlyWiki
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.:

Mark S.

unread,
Jul 3, 2021, 12:27:31 PM7/3/21
to TiddlyWiki
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!

Mike Andyl

unread,
Jul 4, 2021, 10:50:17 AM7/4/21
to TiddlyWiki
https://i.imgur.com/CnyMBI4.jpg
quotes not help me

суббота, 3 июля 2021 г. в 19:27:31 UTC+3, Mark S.:

Mike Andyl

unread,
Jul 4, 2021, 11:00:18 AM7/4/21
to TiddlyWiki
This is the only way it works, but I want to delete on the right one without garbage! )))
https://i.imgur.com/SCtyQFC.jpg
воскресенье, 4 июля 2021 г. в 17:50:17 UTC+3, Mike Andyl:

Mark S.

unread,
Jul 4, 2021, 2:20:48 PM7/4/21
to TiddlyWiki
I'm not sure why it's throwing an error. But instead of running it from the command line, you can use the kit already built into node.

Assuming you are in the same directory as your TW file, you can create a temporary empty node instance which will install the externalimages build command for you:

tiddlywiki test4 --init empty

Then run something like:

tiddlywiki test4 --load tw-with-images.html --output test4 --build externalimages

Where tw-with-images.html is your source file with images. Now your new TW file will appear  in "test4" directory like:

test4/externalimages.html
test4/images/<the image files extracted>

Hopefully this will get you past the errors that occur at the command line.

Mike Andyl

unread,
Jul 4, 2021, 5:44:43 PM7/4/21
to TiddlyWiki
Yes it works!
But now I understand these words :(

"when I imported Evernote, I didn't get any images!"

When exporting, Evernote removes all normal links to images. And instead of them goes this:
<en-media alt="Как лечить укусы насекомых подручными средствами" hash="0b63a644a5981ba32ed511b6172605a1" height="343"

And
<resource-attributes>
<file-name>shutterstock_56797648.jpg</file-name>
<source-url>
en-cache://tokenKey****0b63a644a5981ba32ed511b6172605a1****
</source-url>
</resource-attributes>

In theory, the import plugin should restore this. For example, in Joplin there is no such problem as it were.

воскресенье, 4 июля 2021 г. в 21:20:48 UTC+3, Mark S.:

Mark S.

unread,
Jul 4, 2021, 7:11:10 PM7/4/21
to TiddlyWiki
Are there images in the images directory?

Mike Andyl

unread,
Jul 5, 2021, 8:46:58 AM7/5/21
to TiddlyWiki
Yes, it seems that all the images are in place. No links or <> tags lead to them. Only  <en-media>. And without this, the import turned out to be almost useless.

понедельник, 5 июля 2021 г. в 02:11:10 UTC+3, Mark S.:
Reply all
Reply to author
Forward
0 new messages