Hi Jed, Mark, Jeremy and Tony, Well, I finally did it. Created a macro borrowing a couple of lines from the FileSystemAdaptor.prototype.generateTiddlerBaseFilepath you suggested.
Although it does what I needed, I realized it is not as general as one could wish, since different tiddler titles could have the same "sanitized" result, so for other uses one would need to extend it with additional code, or treat the resulting string outside of the macro. This drawback considered, should it be of interest to someone else, where would it be better to post it? Regards, Marcio. On Sunday, May 6, 2018 at 7:53:41 PM UTC-3, Marcio Augusto wrote: > > It seems this module is for saving the whole wiki as HTML. > Six months ago, I tried to follow the calls in the source code from the > "export tiddler" button on, but may have missed the trail at some branch. > Spent some more hours on this yesterday, again no luck. > To have this sorted out for now, I shall follow your previous advice and > put together a dozen lines Javascript macro, using the code in > FileSystemAdaptor.prototype.generateTiddlerBaseFilepath. > Thanks for your kind help! > > On Saturday, May 5, 2018 at 9:36:45 PM UTC-3, Mark S. wrote: >> >> It appears that the export/saving occurs in : >> >> $:/core/modules/savers/download.js >> >> However, it also appears that the conversion to a safe file system name >> is done by the browser. So it's not available unless there's an equivalent >> javascript file name conversion function out there somewhere. >> >> Good luck! >> -- Mark >> >> On Saturday, May 5, 2018 at 11:57:22 AM UTC-7, Marcio Augusto wrote: >>> >>> Only if portability is a requirement (which is indeed my case). However, >>> if someone uses TW only on Linux, there would be no need to worry about >>> invalid characters in Windows filenames. >>> Digressions apart, I would like to find the function that does the >>> character conversion on the filename when the "export tiddler" is used, do >>> you have any sugestions? >>> >>> On Saturday, May 5, 2018 at 3:44:57 PM UTC-3, Mark S. wrote: >>>> >>>> It has to make names that will be valid everywhere. Characters ? and : >>>> aren't valid in Windows filenames. >>>> >>>> On Saturday, May 5, 2018 at 9:34:08 AM UTC-7, Marcio Augusto wrote: >>>>> >>>>> Anyway, the code you pointed out does exactly what I need. I just >>>>> could not find it in the standard TW. >>>>> Maybe the TW just passes the tiddler title "as is" to the browser, >>>>> which in turn does the invalid character replacement? Although on Linux, >>>>> even valid characters (like : and ?) gets replaced by "_". >>>>> >>>>> -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/61a11c79-89ca-4b6f-a9eb-330d2ef5c7d0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

