TiddlyWeb using TW5 on Raspberry Pi

291 views
Skip to first unread message

rich shumaker

unread,
Jan 6, 2015, 5:10:11 PM1/6/15
to tidd...@googlegroups.com
The subject is actually a question.
Can you use TiddlyWeb on a Raspberry Pi and store TiddlyWiki 5's?

I tried to use BidiX simple upload script with TW5 on the Raspberry Pi but ran into an error.
I am trying to set up the Raspberry Pi to use TW5 but it is seeming more difficult than I thought it would be.

Thanks everyone for your help.

Rich Shumaker

chris...@gmail.com

unread,
Jan 7, 2015, 6:42:59 PM1/7/15
to tidd...@googlegroups.com, jeremy...@gmail.com
On Tue, 6 Jan 2015, rich shumaker wrote:

> The subject is actually a question.
> Can you use TiddlyWeb on a Raspberry Pi and store TiddlyWiki 5's?

The answer is "yes" but there are a few different ways to do it and
none of them are straight out of the box. I've cc'd Jeremy so he's
aware of some of the issues related to this.

Just this evening I tried one of the methods I think should be a good
way to have any number of tw5s use a tiddlyweb server as storage for
the tiddler but _not_ for hosting the tw5 html file[1]. There are a
few steps, overview first, followed by some details. This should work
on a rpi as long as you've got python-pip installed. You need to:

* Set up a TiddlyWeb server with a small number of plugins and a
minimal configuration.
* Create some TW5 HTML files with a _modified_ TiddlyWeb adaptor[2]
* Open those HTML files in your brower.

First the TiddlyWeb server. You need three python packages:

Run the following command to install them. Use sudo if you want to
install them globally or create a virtualenv and install the in there:

$ pip install -U tiddlyweb tiddlywebplugins.status tiddlywebplugins.cors

Choose a directory in which you want your TiddlyWeb store to live. In
there create a tiddlywebconfig.py file with the following contents:

config = {
'log_level': 'DEBUG',
'system_plugins': ['tiddlywebplugins.status','tiddlywebplugins.cors'],
'cors.enable_non_simple': True,
'cors.allow_creds': True,
'cors.match_origin': True,
}

Create at least one bag and one recipe[3] with the following commands.
Make sure you do this in the same directory as tiddlywebconfig.py:

$ twanager bag mybag < /dev/null
$ echo "/bags/mybag/tiddlers" | twanager recipe myrecipe

(Recipe mybag and myrecipe with whatever names you like.)

Start the tiddlyweb server and leave it running in the background
using the following command (again from the same directory as
tiddlywebconfig.py):

$ twanager server &

That will start the server on http://0.0.0.0:8080/. Go there to verify
that it is running. You should get a page with links to "bags" and
"recipes".

Now create some TiddlyWiki5 HTML files. Clone a copy of the
TiddlyWiki5 repo:

$ git clone g...@github.com:Jermolene/TiddlyWiki5.git
$ cd TiddlyWiki5

Modify "editions/tw5tank/tiddlers/system/tiddlyweb-host.tid" to
change '/' to 'http://0.0.0.0:8080/'.

Modify 'plugins/tiddlywiki/tiddlyweb/tiddlywebadaptor.js' to reflect
the changes in the diff kept here:
https://tank.peermore.com/tanks/cdent/twadaptor.diff

That is, change this.recipe to have a value of 'myrecipe' (or whatever
name you used for your recipe) and export the adaptor class,
even when loading from 'file:'.

And then build your HTML file by running the command:

$ bin/tankbld.sh

This will create a file 'tmp/app.html'. Open that file in your browser
of choice. Create a new tiddler, it should automatically save to
TiddlyWeb. You can confirm that it did in a variety of ways:

* look in the browser console
* go to the directory where you put tiddlywebconfig.py and run
'twanager ltiddlers'
* look at the 'tiddlyweb.log' in that directory for some web traffic
* reload the browser and check the 'recent' tab

That should get you there, modulo the usual caveats of "computers are
weird" and "I probably left some important step out". Please post
again if you get stuck. I'm happy to help, but may sometimes be a bit
slow to respond.

----

As you can probably see, once that's all working there are ways in
which it could be automated to be quite a bit more smooth. Especially
one can imagine a TW5 file that opens up with no content, but you can
tell it "this is the host I want to use and this is the recipe I want
to use" and it will go and get the tiddlers. Then you can do the edits
and other work you want to do and shut it down. Upon reload of the exact
same TW5 file you could go to an entirely different server and/or recipe
and do your work on different content.

And of course, a really nice thing would be intermixing content from
multiple servers in the same TW5. As long as those servers have
working CORS setup (that's what the tiddlywebplugins.cors plugin
provides) it ought to just work™.

Note there are some issue (some discussed at
https://github.com/Jermolene/TiddlyWiki5/issues/1194) before this is
all perfect and hunky dory, but I don't see anything that's impossible
to overcome. The biggest challenge is dealing with dynamic loading of
plugins (in a secure fashion).

[1] You could easily keep the tw5html files in TiddlyWeb as HTML
tiddlers, but in this particular case I wanted to use local (that is
loaded from 'file:' URIs) TiddlyWikis, to flesh out the issues. It
also means that the TiddlyWeb setup is very simple. If doing this is
exactly what you want, then post again and I'll explain how you might
do that part.

[2] Some of these modifications probably ought to be built in, or
somehow made options during the build process. I suspect with
$:/config[...] tiddlers it could be made flexible.

[3] For more on bags and recipes see the following pages and the other
pages linked there. Bags and recipes allow you to make collections of
tiddlers that are as complex or simple as you like.

http://tiddlyweb.tiddlyspace.com/bag
http://tiddlyweb.tiddlyspace.com/recipe
--
Chris Dent http://burningchrome.com/
[...]

rich shumaker

unread,
Jan 7, 2015, 10:22:24 PM1/7/15
to tidd...@googlegroups.com, jeremy...@gmail.com
Thanks Chris.
I will try this set up next on a RasPi, tomorrow I think.
I was able to get the Node.js version of TiddlyWiki up and running fairly quickly on the Raspberry Pi.

3 Steps with 3 Command Lines to set up RasPi with Node.js TiddlyWiki
1. Set Up RasPi with Raspbian - Tons of tutorials on the Web on doing this.  This takes some time if you have not done it.  Average time with download and set up about 1.5 hours
2. Set up Node.js - 2 commands - About 15 minutes
wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg
-i node_latest_armhf.deb

3. Follow Set Up on TWdotC for Setting up Node.js - 1 command - About another 15 minutes
sudo npm install -g tiddlywiki
tiddlywiki mynewwiki --init server
.
Lots of waiting not a lot of heavy lifting.

Now on to my next issue, serving the data outside the localhost, 127.0.0.1:8080

One command later I am up and running.
I am on my home network so I don't have user names or passwords set up.
tiddlywiki mynewwiki --server 8080 $:/core/save/all text/plain text/html "" "" 192.168.0.117
I know that Node.js does not have the full power that TiddlyWeb has but it does have some already built in advantages as there are some Node.js things for RasPi Camera.

Of course TiddlyWeb being built on Python makes it prime for RasPi as Python is the primary language on the Pi.
I am interested in having both TiddlyWeb and Node.js set up to see the speed and latency issues as well as usage applications.

All this because I couldn't get a simple PHP script to save my TiddlyWiki on a server, d'oh!!!

Thanks again Chris for your help once I have tried what you have posted I will let you know.

Rich Shumaker

rich shumaker

unread,
Jan 8, 2015, 3:15:06 PM1/8/15
to tidd...@googlegroups.com
I have followed the directions so far Chris.
Details that might be necessary.
1. Clean Raspbian without update or upgrade dated 2014-12-24
2. I needed to add PIP and ran these 2 commands

sudo apt-get install python-setuptools
sudo easy_install pip

Now I did the install without sudo and had to redo it with sudo, missed adding it the first time, d'oh!!
sudo pip install -U tiddlyweb tiddlywebplugins.status tiddlywebplugins.corse...
No Error when using sudo.
Now is a big question, where is the best place to put the files?
The note says put the tiddlywebconfig.py file anywhere
I used nano to create the file and put it here
home/pi/TiddlyWeb
I want to run this on the network and when I use LAMP you put stuff in
 vars/www
to allow people to see it on the network and beyond.
So that is why I am asking where the best place to put it is.
Now is where I hit I think is a showstopper Error.
     $ twanager bag mybag < /dev/null
Error
Traceback (most recent call last):
  File "/usr/local/bin/twanager", line 19, in <module>
    handle(args)
  File "/usr/local/lib/python2.7/dist-packages/tiddlyweb/manage.py", line 66, in handle
    from tiddlyweb.config import config
  File "/usr/local/lib/python2.7/dist-packages/tiddlyweb/config.py", line 221, in <module>
    read_config(config)
  File "/usr/local/lib/python2.7/dist-packages/tiddlyweb/util.py", line 80, in read_config
    from tiddlywebconfig import config as custom_config
  File "/home/pi/TiddlyWeb/tiddlywebconfig.py", line 1
    config = {
    ^
IndentationError: unexpected indent



     $ echo "/bags/mybag/tiddlers" | twanager recipe myrecipe 
I Ran the above command even though I had the error above just to see.  I received I think the same error.

Traceback (most recent call last):
  File "/usr/local/bin/twanager", line 19, in <module>
    handle(args)
  File "/usr/local/lib/python2.7/dist-packages/tiddlyweb/manage.py", line 66, in handle
    from tiddlyweb.config import config
  File "/usr/local/lib/python2.7/dist-packages/tiddlyweb/config.py", line 221, in <module>
    read_config(config)
  File "/usr/local/lib/python2.7/dist-packages/tiddlyweb/util.py", line 80, in read_config
    from tiddlywebconfig import config as custom_config
  File "/home/pi/TiddlyWeb/tiddlywebconfig.py", line 1
    config = {
    ^
IndentationError: unexpected indent
So that is where I am and thanks again for all your help with this.

Rich Shumaker

chris...@gmail.com

unread,
Jan 8, 2015, 5:28:08 PM1/8/15
to tidd...@googlegroups.com
On Thu, 8 Jan 2015, rich shumaker wrote:

> Now is a big question, where is the best place to put the files?
> The note says put the tiddlywebconfig.py file anywhere
> I used nano to create the file and put it here
> home/pi/TiddlyWeb
> I want to run this on the network and when I use LAMP you put stuff in
> vars/www
> to allow people to see it on the network and beyond.
> So that is why I am asking where the best place to put it is.

It's really up to you. Since the server is built in it doesn't matter.
There are ways to set TiddlyWeb up with apache and other servers if
you like, but the instructions I gave use the built in. There's more
on using different servers here:

http://tiddlyweb.tiddlyspace.com/Mount%20a%20Server

> Now is where I hit I think is a showstopper Error.

The error that you are seeing is probably because of the way I showed
the config information with leading spaces as follows:


config = {
'log_level': 'DEBUG',
'system_plugins': ['tiddlywebplugins.status','tiddlywebplugins.cors'],
'cors.enable_non_simple': True,
'cors.allow_creds': True,
'cors.match_origin': True,
}

What you need in the file is the first four spaces per line not being
there:

config = {
'log_level': 'DEBUG',
'system_plugins': ['tiddlywebplugins.status','tiddlywebplugins.cors'],
'cors.enable_non_simple': True,
'cors.allow_creds': True,
'cors.match_origin': True,
}


rich shumaker

unread,
Jan 8, 2015, 6:08:18 PM1/8/15
to tidd...@googlegroups.com
That makes perfect sense about the spaces.
Will update that and retry.

It also makes sense that I can put it anywhere.
Just wanted to confirm there might not be a reason to put it somewhere else.
I installed LAMP BUT I don't need to use it.
I needed to test another method while I waited, hopefully LAMP won't interfere but I don't think it will.

Thanks again for your help.

Rich Shumaker

rich shumaker

unread,
Jan 8, 2015, 6:25:28 PM1/8/15
to tidd...@googlegroups.com
Okay so I have made it farther and it is running.
Now I am having an issue with downloading the repository.
Here is the error I am getting.

     $ git clone git@github.com:Jermolene/TiddlyWiki5.git 

Error

pi@raspberrypi
~ $ git clone git@github.com:Jermolene/TiddlyWiki5.git
Cloning into 'TiddlyWiki5'...
The authenticity of host 'github.com (192.30.252.128)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? y
Please type '
yes' or 'no': yes
Warning: Permanently added '
github.com,192.30.252.128' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
pi@raspberrypi ~ $ sudo git clone g...@github.com:Jermolene/TiddlyWiki5.git
Cloning into '
TiddlyWiki5'...
The authenticity of host '
github.com (192.30.252.128)' can't be established.
RSA key fingerprint
is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.252.128' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal
: The remote end hung up unexpectedly

I am going to try to manually grab the data and upload it to the server but if you know what might fix this that would be greatly appreciated.
Thanks again for all the help getting this going.

Rich Shumaker

rich shumaker

unread,
Jan 8, 2015, 9:38:37 PM1/8/15
to tidd...@googlegroups.com
Okay so I have cloned the TiddlyWiki 5 Github directory locally and uploaded it to my RasPi.

I have updated the files on the RasPi

Modify "editions/tw5tank/tiddlers/system/tiddlyweb-host.tid" to
change
'/' to 'http://0.0.0.0:8080/'.

Modify 'plugins/tiddlywiki/tiddlyweb/tiddlywebadaptor.js' to reflect
the changes
in the diff kept here:
https://tank.peermore.com/tanks/cdent/twadaptor.diff


Now I am building my TW and the command is not where I tried it, thought I didn't have the right permissions so I tried it as SUDO as well.


pi@raspberrypi ~/TiddlyWeb/TiddlyWiki5 $ bin/tankbld.sh
-bash: bin/tankbld.sh: Permission denied
pi@raspberrypi ~/TiddlyWeb/TiddlyWiki5 $ sudo bin/tankbld.sh
sudo: bin/tankbld.sh: command not found


Slowly but surely I am getting there.

Your help is greatly appreciated.
I will keep poking around to see if I can figure it out and if I do I will post here.

rich shumaker

unread,
Jan 8, 2015, 9:45:12 PM1/8/15
to tidd...@googlegroups.com
weird weird weird.
I see the file but when I do
$ bin/tankbld.sh
I get the error listed above.

I am sure it is linux 101 I am messing up here.

Rich Shumaker

PMario

unread,
Jan 9, 2015, 8:32:14 AM1/9/15
to tidd...@googlegroups.com, jeremy...@gmail.com


On Thursday, January 8, 2015 at 12:42:59 AM UTC+1, cdent wrote:


Create at least one bag and one recipe[3] with the following commands.
Make sure you do this in the same directory as tiddlywebconfig.py:

     $ twanager bag mybag < /dev/null
     $ echo "/bags/mybag/tiddlers" | twanager recipe myrecipe

(Recipe mybag and myrecipe with whatever names you like.)

@chris
I think, the twanager command is not installed, if you only install tiddlyweb. ...
At least, that was a problem for me a year ago.

-m

chris...@gmail.com

unread,
Jan 9, 2015, 8:42:15 AM1/9/15
to tidd...@googlegroups.com, jeremy...@gmail.com
On Fri, 9 Jan 2015, PMario wrote:

> @chris
> I think, the twanager command is not installed, if you only install
> tiddlyweb. ...
> At least, that was a problem for me a year ago.

twanager has been uilt into the tiddlyweb package from the start,
see this truncated install into a virtenv on a clean fedora vm:

https://tank.peermore.com/tanks/cdent/tiddlywebvirtenv

If twanager doesn't show up when you do an install of tiddlyweb then
something is either wrong with your $PATH or the install went wrong.

chris...@gmail.com

unread,
Jan 9, 2015, 8:44:12 AM1/9/15
to tidd...@googlegroups.com
On Thu, 8 Jan 2015, rich shumaker wrote:

> Okay so I have made it farther and it is running.
> Now I am having an issue with downloading the repository.
> Here is the error I am getting.
>
> $ git clone g...@github.com:Jermolene/TiddlyWiki5.git

I think I probably gave the wrong clone URL, try:

git clone https://github.com/Jermolene/TiddlyWiki5.git

This may address some of the permissions problems you have with your
copy made later in the thread.

chris...@gmail.com

unread,
Jan 9, 2015, 8:44:51 AM1/9/15
to tidd...@googlegroups.com
On Thu, 8 Jan 2015, rich shumaker wrote:

> pi@raspberrypi ~/TiddlyWeb/TiddlyWiki5 $ bin/tankbld.sh
> -bash: bin/tankbld.sh: Permission denied
> pi@raspberrypi ~/TiddlyWeb/TiddlyWiki5 $ sudo bin/tankbld.sh
> sudo: bin/tankbld.sh: command not found

Perhaps try:

chmod 755 bin/tankbld.sh

rich shumaker

unread,
Jan 9, 2015, 2:32:09 PM1/9/15
to tidd...@googlegroups.com
I chmod'd 755 bin/tankbld.sh
File is there and the command went through.

I also double checked for sanity sake and the file is there and I have read it with NANO.
BUT
when I run the command I get an error
pi@raspberrypi ~/TiddlyWeb/TiddlyWiki5 $   chmod 755 bin/tankbld.sh
pi@raspberrypi ~/TiddlyWeb/TiddlyWiki5 $ bin/tankbld.sh
-bash: bin/tankbld.sh: /bin/bash^M: bad interpreter: No such file or directory

I noticed I didn't have the server running so I started that and here is the error again.


pi@raspberrypi ~/TiddlyWeb/TiddlyWiki5/bin $ twanager server &
[1] 3146
pi@raspberrypi ~/TiddlyWeb/TiddlyWiki5/bin $ starting wsgi server at http://0.0.0.0:8080
 bin/tankbld.sh
-bash: bin/tankbld.sh: No such file or directory
pi@raspberrypi ~/TiddlyWeb/TiddlyWiki5/bin $ cd ../
pi@raspberrypi ~/TiddlyWeb/TiddlyWiki5 $  bin/tankbld.sh
-bash: bin/tankbld.sh: /bin/bash^M: bad interpreter: No such file or directory
pi@raspberrypi ~/TiddlyWeb/TiddlyWiki5 $


Thanks Mario for your help and thanks Chris for taking the time to help me work on this.
Let me know any additional steps.

Rich Shumaker

rich shumaker

unread,
Jan 11, 2015, 11:08:47 PM1/11/15
to tidd...@googlegroups.com
I know you are busy Chris I just wanted to find out if anyone has a direction for me to research.

Thank you very much.

Rich Shumaker

chris...@gmail.com

unread,
Jan 12, 2015, 6:08:14 AM1/12/15
to tidd...@googlegroups.com
On Sun, 11 Jan 2015, rich shumaker wrote:

>> -bash: bin/tankbld.sh: No such file or directory
>> pi@raspberrypi ~/TiddlyWeb/TiddlyWiki5/bin $ cd ../
>> pi@raspberrypi ~/TiddlyWeb/TiddlyWiki5 $ bin/tankbld.sh
>> -bash: bin/tankbld.sh: /bin/bash^M: bad interpreter: No such file or
>> directory

This "bad interpreter" and ^M are probably a clue. It looks like
whatever method you used to get the files has injected bad line
endings into your files. The shell is looking for /bin/bash^M when
what it wants is /bin/bash

Earlier in the thread I suggested a second way to git clone the tw5
repo. Try that and see what happens?

rich shumaker

unread,
Jan 13, 2015, 12:44:20 AM1/13/15
to tidd...@googlegroups.com
Sounds Great Chris.
I will have that in the AM as I have a few more things to catch up on.

I will let you know what happens once I try to re-pull the Git Repository the other way.

Rich Shumaker

rich shumaker

unread,
Jan 15, 2015, 1:58:12 PM1/15/15
to tidd...@googlegroups.com
So I am still working on this but I am needing some hardware, SD writer that isn't damaged.

Should be back on course shortly.

Rich Shumaker

rich shumaker

unread,
Jan 19, 2015, 4:54:47 PM1/19/15
to tidd...@googlegroups.com
Found a functioning SD Card Writer and started from scratch.
This time I got a bit farther.
No issues with the Github Clone, thanks for the address help.
OR Modifying the files

Now create some TiddlyWiki5 HTML files. Clone a copy of the TiddlyWiki5 repo:

     $ git clone g...@github.com:Jermolene/TiddlyWiki5.git 
     $ cd TiddlyWiki5 

Modify "editions/tw5tank/tiddlers/system/tiddlyweb-host.tid" to change '/' to 'http://0.0.0.0:8080/'.

Modify 'plugins/tiddlywiki/tiddlyweb/tiddlywebadaptor.js' to reflect the changes in the diff kept here: https://tank.peermore.com/tanks/cdent/twadaptor.diff

That is, change this.recipe to have a value of 'myrecipe' (or whatever name you used for your recipe) and export the adaptor class, even when loading from 'file:'.

This is where I had the issue I ran the command below and received the error listed.
 

And then build your HTML file by running the command:

     $ bin/tankbld.sh 
Error I received below.


pi@raspberrypi ~/tiddlyweb/TiddlyWiki5 $ bin/tankbld.sh
bin/tankbld.sh: line 9: node: command not found


Any help is greatly appreciated and thanks again for all the help so far.

Rich Shumaker

chris...@gmail.com

unread,
Jan 20, 2015, 5:18:57 AM1/20/15
to tidd...@googlegroups.com
On Mon, 19 Jan 2015, rich shumaker wrote:

> This is where I had the issue I ran the command below and received the
> error listed.
>
>> And then build your HTML file by running the command:
>>
>> $ bin/tankbld.sh
>>
>> Error I received below.
>
> pi@raspberrypi ~/tiddlyweb/TiddlyWiki5 $ bin/tankbld.sh
> bin/tankbld.sh: line 9: node: command not found

This is on the tiddlywiki side of things. To build a TiddlyWiki5 from
scratch the code tree, nodejs is required. If you can't or don't want
to install nodejs on your pi, then if you have another machine where
you can, do the tiddlywiki building aspects of the process on that
machine and then use the created file wherever you like.

rich shumaker

unread,
Jan 20, 2015, 11:19:01 AM1/20/15
to tidd...@googlegroups.com
Chris,

I can easily add node.js to the raspi.
What do or can you do if you don't use node.js?
What features are added or subtracted depending on how you look at it, with or without node.js?
Can you somehow put an HTML file into the system?

I am not familiar with TiddlyWeb it is one of the reasons I am putting it on the RasPi.

Thank you very much for the help.

Rich Shumaker

rich shumaker

unread,
Jan 20, 2015, 7:52:40 PM1/20/15
to tidd...@googlegroups.com
I remembered that you are busy Chris so I added Node.js and tried to do some more.

Ran into this issue and I am sure that I did something wrong just not sure what yet.

pi@raspberrypi ~/tiddlyweb/TiddlyWiki5 $ bin/tankbld.sh
Error executing boot module $:/plugins/tiddlywiki/tiddlyweb/tiddlywebadaptor.js:
SyntaxError: Unexpected token )
    at $tw.utils.evalSandboxed (/home/pi/tiddlyweb/TiddlyWiki5/boot/boot.js:440:5)
    at Object.$tw.modules.execute (/home/pi/tiddlyweb/TiddlyWiki5/boot/boot.js:689:15)
    at /home/pi/tiddlyweb/TiddlyWiki5/boot/boot.js:712:30
    at $tw.utils.each (/home/pi/tiddlyweb/TiddlyWiki5/boot/boot.js:77:13)
    at Object.$tw.modules.forEachModuleOfType (/home/pi/tiddlyweb/TiddlyWiki5/boot/boot.js:711:12)
    at Object.exports.startup ($:/core/modules/startup.js:67:14)
    at $tw.boot.executeNextStartupTask (/home/pi/tiddlyweb/TiddlyWiki5/boot/boot.js:1844:10)
    at $tw.boot.executeNextStartupTask (/home/pi/tiddlyweb/TiddlyWiki5/boot/boot.js:1848:21)
    at $tw.boot.executeNextStartupTask (/home/pi/tiddlyweb/TiddlyWiki5/boot/boot.js:1848:21)
    at $tw.boot.startup (/home/pi/tiddlyweb/TiddlyWiki5/boot/boot.js:1810:11)

I am going to look it over to see if I can figure it out.
I have a feeling that the name might be the issue but I am not sure.
Thanks again for all your help.

Rich Shumaker 

chris...@gmail.com

unread,
Jan 21, 2015, 12:01:21 PM1/21/15
to tidd...@googlegroups.com
On Tue, 20 Jan 2015, rich shumaker wrote:

> I remembered that you are busy Chris so I added Node.js and tried to do
> some more.
>
> Ran into this issue and I am sure that I did something wrong just not sure
> what yet.
>
> pi@raspberrypi ~/tiddlyweb/TiddlyWiki5 $ bin/tankbld.sh
> Error executing boot module
> $:/plugins/tiddlywiki/tiddlyweb/tiddlywebadaptor.js:
> SyntaxError: Unexpected token )

Somewhere there's an error in the javascript code, maybe in the way you
made the changes to the tiddlywebadaptor.js file?

rich shumaker

unread,
Jan 21, 2015, 2:53:55 PM1/21/15
to tidd...@googlegroups.com
Thanks Chris I will try to fix the code I put in and double check it.

Rich Shumaker

rich shumaker

unread,
Jan 21, 2015, 3:44:03 PM1/21/15
to tidd...@googlegroups.com
Yep I messed the code up missed the //
+//if($tw.browser && document.location.protocol.substr(0,4) === "http" ) {

Once I added those in it worked correctly.

What is this full url that you write here
This will create a file 'tmp/app.html'. Open that file in your browser of choice. Create a new tiddler, it should automatically save to TiddlyWeb. You can confirm that it did in a variety of ways: 
Here is something I tried that didn't work http://0.0.0.0:8080/tmp/app.html 

Thanks again for all the help.

Rich Shumaker

rich shumaker

unread,
Jan 21, 2015, 3:50:27 PM1/21/15
to tidd...@googlegroups.com


On Wednesday, January 21, 2015 at 12:44:03 PM UTC-8, rich shumaker wrote:
Yep I messed the code up missed the //
+//if($tw.browser && document.location.protocol.substr(0,4) === "http" ) {

Once I added those in it worked correctly.

What is this full url that you write here
This will create a file 'tmp/app.html'. Open that file in your browser of choice. Create a new tiddler, it should automatically save to TiddlyWeb. You can confirm that it did in a variety of ways: 
Here is something I tried that didn't work http://0.0.0.0:8080/tmp/app.html 

d'oh!!! I should have added the boot log as that probably has the location, oh and 0.0.0.0 are actually the web location on my local server.
Boot log:
 
Startup task: load-modules
 
Startup task: info after: load-modules before: startup
 
Startup task: startup after: load-modules
 
Startup task: story after: startup
 
Startup task: commands platforms: node after: story
Executing command: output tmp
Executing command: rendertiddler $:/core/save/all app.html text/plain

Thanks again for the help.

Rich Shumaker

rich shumaker

unread,
Jan 21, 2015, 4:35:22 PM1/21/15
to tidd...@googlegroups.com
Chris you suggested somehow having a TW that helps with this process.

Check out my TiddlyWiki of TiddlyWiki's that I created, would it be possible to do something like that with TiddlyWeb?

It is weird as I can see the tmp directory with the app.html file in it.
I have a feeling I set something incorrectly and it is pointing the server in the wrong place or something like that.

I can see the recipes and bags page and I get an error when I try to go to the location above.

Rich Shumaker

chris...@gmail.com

unread,
Jan 22, 2015, 5:17:46 PM1/22/15
to tidd...@googlegroups.com
On Wed, 21 Jan 2015, rich shumaker wrote:

> It is weird as I can see the tmp directory with the app.html file in it.
> I have a feeling I set something incorrectly and it is pointing the server
> in the wrong place or something like that.

So the idea is not that the tiddlyweb server will provide the
app.html to you, but instead that you will load the app.html file in
your browser directly and it will be preconfigured to talk to the
server that you have started.

So you put the app.html on the computer that has your browser on it
and go to the file menu and choose "open file" and find "app.html"
and load it. It will then try to talk to the web server at the
address that you configured in the 'host' tiddler from earlier in
the thread.

If the browser and the tiddlyweb server are on different machines
you will need to configure both the tiddlyweb server (in
tiddlywebconfig.py) and tiddlywiki5 (in the host tiddler) to use the
IP adddress or host name of the tiddlyweb hosting server and that IP
must be reachable by the machine on which the browser is running.

rich shumaker

unread,
Jan 22, 2015, 8:37:54 PM1/22/15
to tidd...@googlegroups.com
Wow I really didn't understand how Tiddlyweb worked.
Thanks again for the help.

I will try this out later today / tomorrow and see if I can get it to work now that I know the correct way.
I was definitely doing it wrong.
I thought it started a file on the server.

Rich Shumaker

rich shumaker

unread,
Jan 22, 2015, 9:42:09 PM1/22/15
to tidd...@googlegroups.com
I went thru the building process all over again after
I updated the Address from http://0.0.0.0:8080/ to the actual address on the server.

I grabbed the app.html from the tmp folder and loaded it locally.
I am getting this error now.

syncer-browser - 18:38:16 22 1 2015

XMLHttpRequest error code: 0


Any ideas what I might be doing wrong at this point?

Are there any examples online of setting up TiddlyWeb or Tank with different options.
I am trying to get all the power out of this solution and I am not fully grasping it yet.
Reply all
Reply to author
Forward
0 new messages