Bob Tips #3 -- Basics for Windows users

284 views
Skip to first unread message

@TiddlyTweeter

unread,
May 2, 2019, 11:02:16 AM5/2/19
to tiddl...@googlegroups.com
Jed's BobEXE is immensely rich. Its possible usage is vast. I think there is room for secondary utility notes like these.

If I know they are helpful I'll happily make a more permanent website for them. 

I also think its useful for Jed to see as he doesn't use Windows much, but its all I use ...

So here are my revised tips based on the more recent releases of Bob. Most relate to configuration.

Best, Josiah



Read this to get an overview of Bob setup! (read in Bob)


$:/plugins/OokTech/Bob/Configuration gives basic details on settings that is very helpful to understand the richness & flexibility of Bob.


It is very helpful to refer to.



Ensure Bob is portable (use in Bob)


(update--Pending clarification. Currently leave the "wikiPathBase" alone.)

$:/plugins/OokTech/Bob/ManualSettingsTab change the default path to the Bob executable from the absolute to the relative "wikiPathBase": ".",


Portability for Bob is excellent. Just make sure you only enter relative paths.



How to launch Bob from the PortableApps platform


Simple: Just install BobWin.exe in a directory under PortableApps. The only issue with this is that your wikis will be inside the executable area of PortableApps.


Sophisticated: If you want to launch Bob from PortableApps but locate it outside it, so your wikis are not inside the executables area of PA, then you can do so by compiling a batch file to launch it.


PortableApps don't see batch files as executable so you need to create a batch file and compile it.


A good Windows batch file compiler is: Bat to Exe.


Once you have a compiled batch file for launching Bob then simply place it in a PortableApps program directory and it will appear (on refresh) as a menu option.


The next item gives an example batch file for launching Bob.



How to launch Bob from a batch file and why?


(This section has been updated. The revised batch file code displays more useful info in the console)

Below is a bob.bat batch file is an example of how to launch Bob within a command processor.


The advantages are ...


1 -- IF Bob exits without warning it can return any closing error message that the parent command processor can display that otherwise would be lost.


2 -- Lets you invoke Bob from a different place than the executable. Useful for adding Bob to menuing systems.


The paths in this example Windows batch file are relative to where the batch file is located. Change "title" line as needed (this displays on the console title bar).


:: see https://ss64.com/nt/cmd.html for batch file guidance :: paths below use relative addressing @echo off color 0E mode con: cols=140 echo: && echo: echo ^>^> BOB IS EXCELLENT ^<^< echo: && echo: echo --- MOVE TO BOB EXECUTABLE DIRECTORY --- cd ..\..\..\tw5\bob_123a3\ echo: echo change to: ..\..\..\tw5\bob_123a3 echo result: %cd% echo: echo --- BOB EXECUTABLE DIRECTORY LISTING --- echo: dir echo: echo --- TITLE ^& LAUNCH BOB ----------------- echo: echo title BobEXE 1.2.3a3 echo: echo cmd /K "BobWin.exe" echo: echo --- BOB CONSOLE ------------------------ echo: title BobEXE 1.2.3a3 cmd /K "BobWin.exe"


If its working correctly it should look like this ...

Annotation 2019-05-16 131442.jpg



Pathing & Bob scripts


"Scripts" in Bob provide a gateway to the OS ... Defined under: 'Bob Settings > Manual Settings > "scripts"' in the MAIN wiki. These are usable from any Wiki run by Bob... For example, in a wiki you launch a "script" via...


<$action-websocketmessage $type=runScript name=xxxxx opt1=yy opt2=zz .... />

The "runScript" action is executed always in the directory where the Bob executable is (WBEI). This means that relative pathing to a program you are invoking is always reliably relative to WBEI.


NOTE: Something you need to notice is that the program invoked may run itself in WBEI. But it may NOT. It depends on the program. Some Windows programs will only execute in their home directories, not in WBEI. What is the significance? It means if you are using relative addressing, if you pass parameters on "files to use" to the program, the path to them needs to vary according to whether they run in WBEI or from their home directory.



Relative paths & Bob's "buildHTMLWiki"


Its worth noting that ...


<$action-websocketmessage $type='buildHTMLWiki' outputFolder=<<sfTo>> outputName=<<sfName>> excludeList=<<getSetting excludeList>> />

... the "outputFolder" is created through an address "Relative to the Wiki" being built, NOT relative to the executable that runs Bob.



The benefit of the "suppressBrowser" setting


Lets say you have five TW created in Bob ... But you only work with them in Firefox–even though your default browser is Chrome.


Its easy to set up so Chrome won't get in the way.


In FF open all the Bob TW you want to use. Set it to "Open last session on startup". If you initiate Bob first, before the FF browser starts, FF will load them on start.


Once you can see it works add this to Bob settings ... "suppressBrowser": "true".


----


Any comments to improve these notes would be appreciated.

Message has been deleted

Ste Wilson

unread,
May 2, 2019, 1:11:26 PM5/2/19
to TiddlyWiki
Wow! All good stuff!

TonyM

unread,
May 2, 2019, 8:06:22 PM5/2/19
to TiddlyWiki
Josiah,

Thanks for this very helpful. If you have used other features of Bob on Windows could you please share the basic usage on Windows. I am thinking of handling shared plugins and files, tiddlers that are stored in one location but appear in multiple wikis etc...


Thanks
Tony


On Friday, May 3, 2019 at 1:02:16 AM UTC+10, @TiddlyTweeter wrote:
Jed's BobEXE is immensely rich. Its possible usage is vast. I think there is room for secondary utility notes like these.

If I know they are helpful I'll happily make a more permanent website for them. 

I also think its useful for Jed to see as he doesn't use Windows much, but its all I use ...

So here are my revised tips based on the more recent releases of Bob. Most relate to configuration.

Best, Josiah



Read this to get an overview of Bob setup! (read in Bob)


$:/plugins/OokTech/Bob/Configuration gives basic details on settings that is very helpful to understand the richness & flexibility of Bob.


It is very helpful to refer to.



Ensure Bob is portable (use in Bob)


$:/plugins/OokTech/Bob/ManualSettingsTab change the default path to the Bob executable from the absolute to the relative "wikiPathBase": ".",


Portability for Bob is excellent. Just make sure you only enter relative paths.



How to launch Bob from the PortableApps platform


Simple: Just install BobWin.exe in a directory under PortableApps. The only issue with this is that your wikis will be inside the executable area of PortableApps.


Sophisticated: If you want to launch Bob from PortableApps but locate it outside it, so your wikis are not inside the executables area of PA, then you can do so by compiling a batch file to launch it.


PortableApps don't see batch files as executable so you need to create a batch file and compile it.


A good Windows batch file compiler is: Bat to Exe.


Once you have a compiled batch file for launching Bob then simply place it in a PortableApps program directory and it will appear (on refresh) as a menu option.


The next item gives an example batch file for launching Bob.



How to launch Bob from a batch file and why?


Below is a bob.bat batch file is an example of how to launch Bob within a command processor.


The advantage is that IF Bob exits without warning it can return any closing error message that the parent command processor can display that otherwise would be lost.


The paths in this example Windows batch file are relative.


::[see https://ss64.com/nt/cmd.html for batch file options]
@echo off
color
0E
mode con
: cols=150
echo
:
echo --- Change to Bob's directory from PortableApps ---
cd ..\..\..\tw5\bob\
cd
echo:
echo --- Launch BobEXE ---------------------------------
title BobEXE: TiddlyWiki Server
cmd /K "BobWin.exe"

@TiddlyTweeter

unread,
May 14, 2019, 6:21:43 AM5/14/19
to TiddlyWiki
I updated the original post to ...

-- provide a slightly improved batch file to launch Bob;

-- indicate that there may be a minor issue with Bob "portability" I overlooked and need to get clearer about.

@TiddlyTweeter

unread,
May 16, 2019, 7:25:44 AM5/16/19
to TiddlyWiki
Updated the batch file in the original post to launch Bob and give a screen shot of it in practice.
Reply all
Reply to author
Forward
0 new messages