Using hiveBroker

99 views
Skip to first unread message

AndrewMc

unread,
Dec 7, 2024, 1:05:54 AM12/7/24
to TiddlyWikiClassic
Hi All (especially Okido)

I have installed hiveBroker on my Linux system by downloading the latest release from GitHub, extracting the .zip file into a folder, and then started hiveBroker by running nw from within the extracted folder.

Do all TWc files need to be in the ../data/ folder extracted from the .zip file (or a sub-folder within that folder)?
Or, can I specify a different path for the base folder to search, (for example, ~/Wiki/TiddlyWiki/)?

If I open ace-Plugin.js that came with hiveBroker, then the window has a title bar at the top of the window along with the usual minimise, maximise, and close buttons at the right of the title bar. But, if I open one of my own TWc files, then the window title bar and buttons are absent. Is this normal?

Cheers
Andrew Mc

Okido

unread,
Dec 8, 2024, 1:56:04 PM12/8/24
to TiddlyWikiClassic
Hello Andrew,

Do all TWc files need to be in the ../data/ folder extracted from the .zip file (or a sub-folder within that folder)?
Yes, this the way I coded it because I wanted some separation between the NW.js code and TWC code.
The path to the tiddler that is opened by NW.js is defined in the package.json (main field).
You can open a TWC anywhere on the file system by using something like "file:///Wiki/Tiddlywiki/TWC2Open.html" in the main field.
However this breaks the nwsaver method at the moment.

If I open ace-Plugin.js that came with hiveBroker, then the window has a title bar at the top of the window along with the usual minimise, maximise, and close buttons at the right of the title bar.
But, if I open one of my own TWc files, then the window title bar and buttons are absent. Is this normal?
Yes, that is normal behavior.
When running under NW.js you need a way to minimize, maximize and close your TWC window, that is where the buttons are for.
The buttons come from the nwTWcAppStyle-Plugin.js plugin.
Secondly this plugin provides a drag area, so you can drag the TWC window.
I wanted TWC to look like an application.
At the moment I do a revision of all the code for NW.js that I have. If you need more flexibility please drop your request here.

Have a nice day, Okido

Op zaterdag 7 december 2024 om 07:05:54 UTC+1 schreef AndrewMc:

AndrewMc

unread,
Dec 10, 2024, 1:29:28 AM12/10/24
to TiddlyWikiClassic
Hi Okido

I have been testing hiveBroker and have found an issue with the nwSaver-Plugin - it does not support file names or folder names with spaces in them.
If I have a TWc file with any spaces in the file name, then a series of error messages appear when I click on the [Save] button. After all of the error messages have been dismissed, the plugin reports that "File and backups saved @ (a time in hh:mm format)" but no files were saved or backups created. The same thing happens if I use a folder name with spaces in it under the ../data/ folder (for example, ../data/plugin development/).

The obvious workaround for this issue is to not have spaces in the file or path name for the TW file.

Cheers
Andrew Mc

Okido

unread,
Dec 10, 2024, 1:49:11 PM12/10/24
to TiddlyWikiClassic
Hello Andrew,

You are correct, I used the software in a business environment where we did a lot of processing on file-names and paths automatically and we used Linux and Windows.
As a convention in the TWC environment a banned special characters in file-names and folder names, this to avoid any problems with automated processing and to avoid escaping problems in the various tools.

Have a nice day, Okido

Op dinsdag 10 december 2024 om 07:29:28 UTC+1 schreef AndrewMc:

AndrewMc

unread,
Dec 15, 2024, 12:15:38 AM12/15/24
to TiddlyWikiClassic
Hi Okido

Thank you for the explanation.
I have one thing I am wondering about. Is it possible to enable hiveBroker to zoom the page view? For example, in my web browser I can use the keyboard shortcuts [Ctrl-] and [Ctrl+], or use [Ctrl]+[mouse scroll wheel] to zoom in and out of the page. This does not work in hiveBroker (or TiddlyDesktop). Is this a limitation of NW.js?

Cheers
Andrew Mc

Okido

unread,
Dec 15, 2024, 12:30:31 PM12/15/24
to TiddlyWikiClassic
Hello Andrew,

There is no limitation in NW.js.
In the published code it is not included.
In combination with CaptureKeysMacro it is possible to resize with CTRL + "-" and CTRL + "+", if you like this please let me know.
A simple implementation is easy to do.

Have a nice day, Okido

Op zondag 15 december 2024 om 06:15:38 UTC+1 schreef AndrewMc:

AndrewMc

unread,
Dec 15, 2024, 7:52:20 PM12/15/24
to TiddlyWikiClassic
Hi Okido

Yes, that would be very useful. On a large screen, the text appears small and being able to zoom in would help a lot.

Cheers
Andrew Mc

Okido

unread,
Dec 17, 2024, 2:12:49 PM12/17/24
to TiddlyWikiClassic
Hello Andrew,

I added a complete TWC in qBroker at GitHub in the sandbox.
Download the code from GitHUb and put the TWC fontSize-Zoom.html in the data folder next to where hiveBroker.html is in NW.js.
Open hiveBroker.html and refresh links to external files to add fontSize-Zoom.html.
Open fontSize-Zoom.html and use push tiddlers to push two tiddlers to hiveBroker.html. (push tiddlers does not work in the browser)
Reload hiveBroker.html and the plugins are available in hiveBroker.html. (do not save before reloading)
CTRL + "+" and CTRL + "-" can now be used to zoom the page.

Have a nice day, Okido

Op maandag 16 december 2024 om 01:52:20 UTC+1 schreef AndrewMc:

AndrewMc

unread,
Dec 19, 2024, 1:31:20 AM12/19/24
to TiddlyWikiClassic
Hi Okido

After opening fontSize-Zoom in hiveBroker, when I click on [pushTiddlers] I get an error message:

An error occured in function load of nwSaver-Plugin.js
{
"errno": -2,
"syscall": "open",
"code": "ENOENT",
"path": "home/username/Wiki/hiveBroker/data/GitHub/fontSize-Zoom/fontSize-Zoom.html"
}

I note that the path given is incorrect. It should be:
"home/username/Wiki/hiveBroker/data/fontSize-Zoom.html"

Somehow, there is an extra "GitHub/fontSize-Zoom/" in the path.

CheersGitHub/fontSize-Zoom/
Andrew Mc

Okido

unread,
Dec 19, 2024, 1:13:50 PM12/19/24
to TiddlyWikiClassic
Hello Andrew,

I could replicate the problem, the path is not correct configured in the tiddler "pushTiddlers"
You can change the path in the input box to: "data/hiveBroker.html".
The path in the input box must point to the target tiddler "hiveBroker.html".

I hope this is clear and solves your problem.

Have a nice day, Okido


Op donderdag 19 december 2024 om 07:31:20 UTC+1 schreef AndrewMc:

AndrewMc

unread,
Jan 10, 2025, 11:34:49 PMJan 10
to TiddlyWikiClassic
Hi Okido

Thank you for the helpful instruction. I have now installed the fontSize-Zoom plugin. It took me a while to figure out that I need to use the "-" and "+" keys on the the number pad instead of the regular keys on the keyboard. During my testing of the plugin, I wanted to read the console.log output, but I cannot make the console appear in hiveBroker. I was expecting that the F12 key would show or hide the console. Should this happen with hiveBroker, or is the console disabled somehow?

Cheers
Andrew Mc

Okido

unread,
Jan 11, 2025, 2:27:51 PMJan 11
to TiddlyWikiClassic
Hello Andrew,

The hiveBroker source on GitHub comes with the basic version of NW.js.
If you require the console you need the SDK version of NW.js.
It is simple to install, follow the steps here below:
  1. Go to NW.js website and download the SDK version, you see a large blue button in the center of the site with SDK (from my experience the v0.94.1 works good on Linux)
  2. Unpack the downloaded file
  3. Make sure hiveBroker is not running
  4. Copy all files that you unpacked from the download to the folder were you keep hiveBroker, just overwrite all existing files
  5. Restart hiveBroker
  6. F12 gives you the console and more
Have a nice day, Okido

Op zaterdag 11 januari 2025 om 05:34:49 UTC+1 schreef AndrewMc:

AndrewMc

unread,
Jan 14, 2025, 1:59:34 AMJan 14
to TiddlyWikiClassic
Hi Okido

Thank you for the clear instructions. The process was easier than I thought it would be. I can now open the console using F12.

I have made some small changes.
In CaptureKeysMacro, I changed the keycodes for "MINUS" and "EQUALS". These now allow me to use these keys as shortcuts.

 "MINUS": 189,
 "EQUALS": 187,

In fontSize-Zoom-Source, I changed the definitions for the keys to be used to the following:

  /* Definitions for captureKeys Macro */
  config.macros.captureKeys.captureKey(document, config.macros.fontsize_zoom.min,"NUMPADMINUS",false,false,true);
  config.macros.captureKeys.captureKey(document, config.macros.fontsize_zoom.max,"PLUS",false,false,true);
  config.macros.captureKeys.captureKey(document, config.macros.fontsize_zoom.min,"MINUS",false,false,true);
  config.macros.captureKeys.captureKey(document, config.macros.fontsize_zoom.max,"EQUALS",false,false,true);

This now lets me reduce the zoom by [Ctrl+minus] (using the number pad minus) and [Ctrl+minus] (using the regular minus key - on my keyboard this is next the numeral 0, and includes underscore when [Shift] is pressed).
I can now increase the zoom by [Ctrl+plus] (using the number pad plus) and [Ctrl+equals] (using the '=' key which includes '+' when [Shift] is pressed).
This matches the zoom behaviour of my regular web browser and works nicely.

Lastly, I used the AceEditor to make the changes and your build system to produce the plugin. Both worked very nicely. Thank you for making those available.

Cheers
Andrew Mc

Okido

unread,
Jan 15, 2025, 2:31:31 PMJan 15
to TiddlyWikiClassic
Very good Andrew, if I have some time I will add your changes to the code on GitHub.

Happy coding and have a nice day, Okido

Op dinsdag 14 januari 2025 om 07:59:34 UTC+1 schreef AndrewMc:
Reply all
Reply to author
Forward
0 new messages