I have this idea that I could use node.js and standalone interchangeably by converting back and forth between forms.
To convert a standalone TW I used the --savewikifolder command. I was surprised/worried how slow the resulting node.js version worked.
When I saved back to the standalone, I was even more surprised that my wiki file size had increased 10 fold!
So, it turns out that when you use --savewikifolder, it automatically imports as embeded tiddlers everything in your external files directory. It does not do any mapping to your existing _canonical_uri tiddlers.
I guess my main comment is that this is not documented, and somewhat unexpected. To make it useful, you would have to spend a great deal of time remapping your existing links to the new tiddlers. But if you’re converting back and forth, this would not be practical.
Now that I know it is happening, I can just delete the tiddlers to prevent bloating. It seems like it would be better if there was a switch to turn off this behaviour, but maybe not enough of us use this command to matter.
Could you expand on that a little? I assume that your HTML file has _canonical_uri tiddlers that point into your files directory? And the behaviour you are seeing is that the binary image files from that folder are being imported and turned into tiddlers?
Looking at the code for the savewikifolder command, it doesn’t perform any special processing with _canonical_uri tiddlers, and I can’t see a mechanism that would import the files that they point to.
The resulting node.js instance now has 13 new binary tiddlers in the tiddlers directory. All of them are titled starting with the complete path name to the original tiddler.
One thing I’m wondering, is if there could be some unexpected interaction with the external attachments plugin. That’s the only plugin in the collection that might work with external files
I think you are saying that you have a single file wiki that includes an [ext[]] link to a resource in the files directory alongside wiki, and that in the process of running savewikifolder the actual content of the resource is imported as a tiddler.
I just don’t see how the savewikifolder command can be accessing the files folder at all. It just deals with the contents of a single HTML file, and doesn’t perform any other file access.
Are there any plugins involved? It might be helpful to see the complete command line that is being used.
Where is your /files directory ? – I did have a similar problem lately. Everytime I did edit and save an image.png which contained an _canonical_uri the tiddler was messed up. That’s why I did ask, how your directory structure looks like.
I’m not sure if it’s relevant at this point (see prior post about --load), but my files/ directory was in the same directory as the TW file I wished to import.