Customising Tiddler File Naming - running Node.js on 64-bit Windows 7 platform - is that broken?

123 views
Skip to first unread message

ch

unread,
Aug 23, 2016, 9:50:11 AM8/23/16
to tiddl...@googlegroups.com
hi,


i've tried to get customised tiddler file naming to work when running Node.js on 64-bit Windows 7 platform... but it doesn't work... :-(

however, on linux platform it works :-) so i'm wondering if somebody else have had this issue on a Windows platform before? if so, how did you get it to work!

i've tried several versions of the required software to get it to work, without any luck...

on linux, i have a working installation with the following versions:

nodejs ver 4.4.7-dfsg-2, running debian - of course ;-)
npm ver 1.4.21+ds-2, same
tiddlywiki 5.1.13

on windows platform, i've tried several versions...

Node.js v4.1.2 (npm 2.14.4), v4.5.0 (npm 2.15.9), v6.4.0 (npm 3.10.3)
tiddlywiki 5.1.13

i've be using the following configuration in "FileSystemPaths.tid":

[is[system]removeprefix[$:/config/EditToolbarButtons/Visibility/$:/]addprefix[_system/config/EditToolbarButtons/Visibility/_system/]]
[is[system]removeprefix[$:/config/PageControlButtons/Visibility/$:/]addprefix[_system/config/PageControlButtons/Visibility/_system/]]
[is[system]removeprefix[$:/config/ViewToolbarButtons/Visibility/$:/]addprefix[_system/config/ViewToolbarButtons/Visibility/_system/]]
[is[system]removeprefix[$:/]addprefix[_system/]]
[!has[draft.of]]

...and, the symtom of the problem (what i've seen so far) is that the system file "$:/StoryList.tid" (and any other system file) only get translated to "_system_StoryList.tid", so it seems that tiddlywiki (Node.js) reads the "FileSystemPaths.tid" correctly - but fails to translate the directory separator, so it ends up with an underscore "_" instead, i.e. the file is stored under the "tiddlers/" directory.

- any clues how to solve this issue?

ch

ch

unread,
Aug 24, 2016, 5:30:13 AM8/24/16
to tiddl...@googlegroups.com
[TW5]

hi again,

i've done extensive testing on this issue - and i can confirm that the new feature "Customising Tiddler File Naming" is broken (not working properly) on the windows platform.

conclusion:

removeprefix[] and addprefix[] works, but the directory separator is always translated to underscore "_" for new files. Old files already stored in a directory structure is not affected, they can even be updated and will continue to be stored in the correct directory.

- this bug exist on 64-bit Windows 7 platform running TiddlyWiki 5.1.13 with Node.js v4.5.0 (npm ver 2.15.9)

i don't know if this can have something to do with it, but the "rename" command in Windows Command Prompt can't handle to "move" a file to another directory - which unix "mv" actually can... i.e. in unix you can move a file from current directory to another: "mv tiddler.tid another-directory/" - however, a Windows "move" command was later introduced starting with Windows 2000 which works more like unix "mv" command - is that used by Node.js on Windows?

ch

Eucaly J

unread,
Aug 24, 2016, 8:44:03 AM8/24/16
to TiddlyWiki
Hi,

Look at the pull request allow backslash as path separator in filesystemadaptor - https://github.com/Jermolene/TiddlyWiki5/pull/2541

Before the solution merged to the next release. You can import the attached file to your TiddlyWiki as a patch.


In order to re-locate already existing files, I would suggest below

* make sure node server is not running
* backup TiddlerFolder or make a separate copy
* move those files out of TiddlerFolder

* launch node server, and open the wiki in browser
* drag those files to browser to import them

Hope that helps.
filesystemadaptor.js.tid

ch

unread,
Aug 24, 2016, 11:43:48 AM8/24/16
to tiddl...@googlegroups.com
hi eucaly,

this is great news!! :-) i will try your patch this evening

christian

--
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 tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
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/0025277e-43fb-4b79-8435-7f9e9cfceb4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages