TW on node.js -- How do we list versions available? How to select version?

135 views
Skip to first unread message

Mark S.

unread,
Mar 26, 2020, 3:53:25 PM3/26/20
to TiddlyWiki

The instructions say how to install versions of TW, but not how to invoke them. Is there a way to do that?
Also, is there a way to list all the versions of TW that you have currently installed?

Thanks!


Jeremy Ruston

unread,
Mar 27, 2020, 7:10:28 AM3/27/20
to TiddlyWiki
Hi Mark

“Installing” in the context of a Node.js app like TiddlyWiki 5 really just means unpacking the ZIP of files and folders in a particular location. One then tells node which version to run by referencing the tiddlywiki.js file in the root of the repo:

node ./tiddlywiki.js --version

The code in tiddlywiki.js then reaches into the other files and folders as it loads TiddlyWiki.

The wrinkle in all this is the ability to install an application globally. That just means that the app is copied to a location managed by the system, and then a shortcut is created so that running “tiddlywiki” is the same as if one ran “node <path-to-tw>/tiddlywiki.js”.

(It’s also possible to use the “npm link” command to specify a custom installation of TiddlyWiki as the global one; this is documented on tiddlywiki.com).

So, if you want to work with multiple versions of TW5 at the same time, just install them in different folders and reference them via the node command as above.

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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/b14ffd7e-02cd-44b9-bbb6-4eefe2ff33a2%40googlegroups.com.

Mohammad

unread,
Mar 27, 2020, 9:19:18 AM3/27/20
to TiddlyWiki
Hi Jeremy,

For using plugins with a specific version of Tiddlywiki, there is some instruction here


My question is setting  TIDDLYWIKI_PLUGIN_PATH  global variable (for example in Windows 10) means Tiddlywiki will load all plugins from this path
or this is extra to plugins/tiddlywiki  folder?

For example I have installed 
  • Tiddlywiki prerelease in  D:\Tiddlywiki5.1.22p
  • So, I have D:\Tiddlywiki5.1.22p\plugins folder
  • Then TIDDLYWIKI_PLUGIN_PATH=D:\Tiddlywiki\Custom_Plugins

--Mohammad

PMario

unread,
Mar 27, 2020, 10:34:23 AM3/27/20
to TiddlyWiki
On Friday, March 27, 2020 at 2:19:18 PM UTC+1, Mohammad wrote:
My question is setting  TIDDLYWIKI_PLUGIN_PATH  global variable (for example in Windows 10) means Tiddlywiki will load all plugins from this path
or this is extra to plugins/tiddlywiki  folder?

For example I have installed 
  • Tiddlywiki prerelease in  D:\Tiddlywiki5.1.22p
  • So, I have D:\Tiddlywiki5.1.22p\plugins folder
  • Then TIDDLYWIKI_PLUGIN_PATH=D:\Tiddlywiki\Custom_Plugins
This variable make it easy, that TW will find 3rd party plugins. eg:

I don my plugins in a completely different structure as TWs directory structure.

My TIDDLYWIKI_PLUGIN_PATH=D:\path\to\my\plugins ... 

The whole structure is: D:\path\to\my\plugins\wikilabs\<plugin-name>

This makes it possible to add one of my plugins into tiddlywik.info like so:


{
    "description": "Server configuration of the wikilabs edition",
    "plugins": [
        "tiddlywiki/tiddlyweb",
        "tiddlywiki/filesystem",
        "wikilabs/link-to-tabs",
        "wikilabs/info-session",
        "wikilabs/advanced-search-plus"
    ],
    "themes": [
    ],
    "includeWikis": [
        "../link-to-tabs"
    ],
    "config": {
        "default-tiddler-location": "../link-to-tabs/tiddlers"
    }
}


This makes development much easier, since I don't need to add the full directory name.

The environment variables can have several paths, with are  separated by a semicolon ";" in windows and a colon ":" for unix-like systems

have fun!
mario

Mohammad

unread,
Mar 27, 2020, 1:09:57 PM3/27/20
to TiddlyWiki
Hi Mario,
 Many thanks for clarification!

--Mohammad

Mohammad

unread,
Mar 28, 2020, 6:16:37 AM3/28/20
to TiddlyWiki
Mario,
 Does the plugins in  TIDDLYWIKI_PLUGIN_PATH can be used in making plugin library? See the below tiddlywiki.info used for making Kookma library



"build": {
"library": [
"--makelibrary","$:/UpgradeLibrary",
    "--savelibrarytiddlers","$:/UpgradeLibrary","[prefix[$:/]] +[prefix[$:/plugins/kookma]]", "recipes/library/tiddlers/",
                                                "$:/UpgradeLibrary/List",
    "--savetiddler","$:/UpgradeLibrary/List","recipes/library/tiddlers.json",
"--rendertiddler","$:/plugins/tiddlywiki/pluginlibrary/library.template.html","index.html","text/plain"]
}


but it cannot find or does not include plugin from TIDDLYWIKI_PLUGIN_PATH.

Note: I can create new wiki and use my third party plugin as you described in your post and it is working fine.


--Mohammad


On Friday, March 27, 2020 at 7:04:23 PM UTC+4:30, PMario wrote:

Mohammad

unread,
Mar 30, 2020, 8:53:20 AM3/30/20
to TiddlyWiki
In https://tiddlywiki.com/prerelease/#MakeLibraryCommand

It syas:

The upgrade library is formatted as an ordinary plugin tiddler with the plugin type library. It contains a copy of each of the plugins, themes and language packs available within the TiddlyWiki5 repository.


Regarding the third party plugin can be put in other path using TIDDLYWIKI_PLUGIN_PATH

How one can make the library from those located in TIDDLYWIKI_PLUGIN_PATH

--Mohammad


On Friday, March 27, 2020 at 7:04:23 PM UTC+4:30, PMario wrote:

TonyM

unread,
Mar 31, 2020, 12:01:42 AM3/31/20
to TiddlyWiki
Mohammad,

Slightly off topic but related.

From what you said I have tried to create a library via the single file wiki. I have however identified more to it than

The upgrade library is formatted as an ordinary plugin tiddler with the plugin type library. It contains a copy of each of the plugins, themes and language packs available within the TiddlyWiki5 repository.

I believe once the "library" (payload) tiddler (containing plugins) is created it needs to be exported and placed at a url, then you need a tiddler (link to payload url) containing that url into the wiki, that wants access to the library. 

I am still working on it, but there are quite a few tiddlers involved in this.

I have being hacking existing import and plugin mechanisms and have come up with a number of new and helpful workflows, and have not publish much yet because this area can be a little "verbose".

Libraries are a key part of this plugin and distribution process.

Regards
Tony
Reply all
Reply to author
Forward
0 new messages