Few questions about tiddlywiki.info Files

227 views
Skip to first unread message

Riz

unread,
Dec 18, 2017, 1:57:08 AM12/18/17
to TiddlyWiki
1. What is the real use of "default-tiddler-location" option in the configuration?

  I set it to a folder called "./files". As expected, the newly  created tiddlers were saved into that folder. So far so good. However, when I restarted the node server, I got a blank TW. The tiddlers are still there in the "files" folder, but it is not being read from it. More than that, if I create tiddlers with the same name as those already existing in the folders, they are written to the folder as "mytiddler(1).tid" and so on. I assume this is not the expected behavior. Is there some other option I have to set to load tiddlers from the new "default-tiddler-location"? Or is it a bug?

OS:Ubuntu
TW5 version: 5.1.15
Node version: 8.4.0


2. The "includeWiki" documentation specifies that path should be given relative to the wiki folder. That did not wok for me. What worked is relative path to the tiddlywiki info file. There are two possibilities here, either mine is an individual experience and a bug, or "tiddlers" folder is called as wiki folder now. Barring these two, may be there is a need to correct the documentation.

3. A little more information regarding "retain-original-tiddler-path" options please. I mean, the documentation says what does it do. However, it fails to mention what is the advantage of setting the option. Is the user missing out anything by not setting it? What is the use case of said option - as in, what can the user achieve by setting that option?


Finally, not a question - merely an suggestion to consider for the next higher edition. The configuration provided by $:/config/FileSystemPaths should be a part of .info file too. File naming and rearanging should start from the get go, rather than setting it after the story list tiddler (at least) is created in file system. If possible, it should be able to be effective retroactively - renaming the files appropriately on the next reload if the user is changing setting somewhat down the lane.

Jeremy Ruston

unread,
Dec 18, 2017, 4:30:50 AM12/18/17
to tiddl...@googlegroups.com
Hi Riz

1. What is the real use of "default-tiddler-location" option in the configuration?

The primary use case is illustrated by the "tw5.com" and "tw5.com-server” editions in the TW5 repo. The "tw5.com” edition is an ordinary self-contained wiki folder. The "tw5.com-server” edition includes the additional components required for editing the wiki via the client-server configuration.  "tw5.com-server" uses the “includeWiki” option to pull in the tiddlers from "tw5.com”. The “includeWiki” option on its own doesn’t affect where tiddlers are written, though; they still get written to “tw5.com-server”. It gives “copy-on-write” semantics.

"tw5.com-server” also uses the “default-tiddler-location” option to override where tiddlers are written, causing them to be saved back to the “tw5.com” edition.

In many cases these two options would be used together, but we get more flexibility by having them separate. For example, I often use “default-tiddler-location” to redirect newly written tiddlers to a special “new” folder within the “tiddlers” folder.

More than that, if I create tiddlers with the same name as those already existing in the folders, they are written to the folder as "mytiddler(1).tid" and so on. I assume this is not the expected behavior. Is there some other option I have to set to load tiddlers from the new "default-tiddler-location"? Or is it a bug?

I wasn’t able to reproduce that problem. Can it be reproduced using the tw5.com and tw5.com-server editions?

2. The "includeWiki" documentation specifies that path should be given relative to the wiki folder. That did not wok for me. What worked is relative path to the tiddlywiki info file.

Aren’t those two the same? The tiddlywiki.info file is in the root of the wiki folder.

There are two possibilities here, either mine is an individual experience and a bug, or "tiddlers" folder is called as wiki folder now. Barring these two, may be there is a need to correct the documentation. 

3. A little more information regarding "retain-original-tiddler-path" options please. I mean, the documentation says what does it do. However, it fails to mention what is the advantage of setting the option. Is the user missing out anything by not setting it? What is the use case of said option - as in, what can the user achieve by setting that option?

That option was added to enable support for the pink “edit on github” banner that you see on https://tiddlywiki.com. It’s useful for other wikis that want to offer the same feature.

Finally, not a question - merely an suggestion to consider for the next higher edition. The configuration provided by $:/config/FileSystemPaths should be a part of .info file too.

That could certainly be a useful option.

File naming and rearanging should start from the get go, rather than setting it after the story list tiddler (at least) is created in file system. If possible, it should be able to be effective retroactively - renaming the files appropriately on the next reload if the user is changing setting somewhat down the lane.

Similarly, I can imagine that would be useful. However, the code for loading tiddlers under Node.js would need a significant overhaul to work around the fact that the current implementation is really about *loading* tiddlers (boot.js), with support for *saving* layered over the top (filesystemadaptor), rather than being a single module with full synchronisation between the file system and the tiddler store.

Best wishes

Jeremy.


--
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+...@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/1a11259f-8ac7-44db-8556-564d8330c137%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Riz

unread,
Dec 18, 2017, 11:27:59 PM12/18/17
to TiddlyWiki
Hi Jeremy,

Thanks for the detailed reply.

As it is obvious, I was unaware of the specific relation between "includeWiki" and "default-tiddler-location". Also I was under the wrong assumption that tiddlywiki will automatically load tiddlers from the location given as "default-tiddler-location". Thank you for clearing that up.


I wasn’t able to reproduce that problem. Can it be reproduced using the tw5.com and tw5.com-server editions?

Well, it was stemmed from the same point as above. I merely added "default-tiddler-location" and not "includeWiki". if you do that, everytime you restart the server, you will get a new copy of "$___StoryList.tid" in the filesystem as $___StoryList 1.tid, $___StoryList 2.tid and so on.

Before you answered the question, I played around further and found that if I set the config/filepath to save all tiddlers to another folder, and include all of those tiddlers using "tiddlywiki.files" file, that would work too. Rather clunky, but useful if you want to save a particular group of tiddlers outside the "tiddler" folder and not in another wiki.


Aren’t those two the same? The tiddlywiki.info file is in the root of the wiki folder.

I guess it is just a semantic issue. If I have two wikis named "mywiki1" and "mywiki2"

 - mywiki1
      - tiddlers
      - tiddlywiki.info
 - mywiki2

Relative to the mywiki1 (which is the wiki folder), I would give the path of mywiki2 as "./mywiki2". However, relative to the "tiddlywiki.info" file, I would have to specify the path as "../mywiki2". Is there a gap in my understanding?


 

That option was added to enable support for the pink “edit on github” banner that you see on https://tiddlywiki.com. It’s useful for other wikis that want to offer the same feature.


Thank you, that is a very useful piece of information. Never really had a reason to check out "$:/ContributionBanner"


Meanwhile, pinging eminent documentation people to try and include these points Jeremy pointed in a generalised manner that can be used by community.

Thanks
Riz

Tobias Beer

unread,
Dec 19, 2017, 1:52:37 AM12/19/17
to TiddlyWiki
Hi Riz,

i think it would be great if you could make a PR on doc changes in the end. It seems a few changes / additions might clear things up a little

Esp. "relative to the wiki folder" appears to be wrong. It's really "relative to the tiddlywiki.info file" in it.

best --tb 
Reply all
Reply to author
Forward
0 new messages