Can tiddlywiki.files be used with tid files?

I’m trying to create a wiki node “farm”. But when I try to run it, the tiddlers are not loaded.

Here’s a map of my directory structure:

.
├── notes2020
│   ├── plugins
...
│   │       └── plugin.info
│   ├── tiddlers
│   │   ├── $__build.tid
│   │   ├── $__config_AutoSave.tid
│   │   ├── $__config_BitmapEditor_Colour.tid
...
│   │   ├── ZucchiniPineappleBread
│   │   └── ZucchiniPineappleBread.meta
│   └── tiddlywiki.info
└── wikifarm
    ├── tiddlers
    │   ├── $__StoryList.tid
    │   └── notes2020
    │       └── tiddlywiki.files
    └── tiddlywiki.info

And here’s the conttents of my tiddlywiki.files file, whose position is noted above:

{
    "directories": [
        {
            "path": "../../../notes2020/tiddlers",
            "filesRegExp": "^.*\\.tid$",
            "isTiddlerFile": true,
            "fields": {
                "tags": ["_notes2020"],
                "title" : {"prefix" : "_notes2020/"} ,
            }
        }
    ]
}

When I run node just above “wikifarm” the node instance runs fine, but doesn’t load any of the tiddlers referenced in the tiiddlywiki.files file. It doesn’t post any error messages even in verbose mode. Possibly this method can’t load tids ? I’ve looked at all the tiddlywiki.files files on github that contained the directories object, but couldn’t see anything different from what I’m doing other than that this project is loading .tid files.

So, what am I missing?

Thanks!

Hi @Mark_S it looks like the path is wrong – relative paths are interpreted as relative to the directory containing the tiddlywiki.info file.

Right. That’s why I included the map of the directory structure, so that it could be verified that I’m using a correct pathing. AFAIKT, the path is correct. But if I’ve made a mistake, please indicate what relative path I should have used. Note that there are two notes2020 directories – I’m trying to path back out to the one higher up.

Apologies @Mark_S you’re quite right, I misread the code you provided. I’ll investigate when I am back at my desk

Hi @Mark_S to explore this problem I experimented with the core file editions/tw.org/tiddlers/_tw_shared/tiddlywiki.files. Its current content is:

{
	"directories": [
		"../../../tw5.com/tiddlers/_tw_shared"
}

I tried replacing it with the following content derived from your example:

{
	"directories": [
		{
			"path": "../../../tw5.com/tiddlers/_tw_shared",
			"filesRegExp": "^.*\\.tid$",
			"isTiddlerFile": true,
			"fields": {
				"tags": ["_notes2020"],
				"title" : {"prefix" : "_notes2020/"}
			}
		}
	]
}

As expected, the .tid files from the directory _tw_shared were imported with the specified prefix.

I can’t see any significant differences between the two examples and so there must be something subtle going on…