You only need the bookmarklet if the path to your files contains spaces.
--
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+unsubscribe@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/8dd770a1-0ace-4520-8801-0a08761d738e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I would tell them to run it using "node server" rather than "npm server" unless you have a reason for doing it otherwise.
You only need the bookmarklet if the path to your files contains spaces.Technically you only need it if the URL shown in the address bar once you open the file contains spaces or the percent sign. This should be fixed in TW5.1.15. File paths specified in settings.json are unrelated to this problem. It is only the URL that the browser uses that has the problem.The reason for this is that the put saver URI encodes the browser location string again before using it, which results in a double URI encoded string.It's hard to know how to differentiate between the two when writing instructions but I thought I'd point it out.
My only other question is whether you considered using the bundled version and what your thoughts are on that. There are several reasons for using the bundled version.
- All the plugin tiddlers (including core) are compiled into one JSON file per plugin. This drastically improves the load time for data folders, especially on slower spinning disks, since it cuts down on the number of files that need to be read.
- It does not include the editions folder -- which contains 2000+ files -- since none of them are needed for TiddlyServer to operate. This cuts down on the file count and makes it much more portable.
- All node_modules dependancies are included (except dev dependencies) so "npm install" is not required.
Thanks again for your work on this. It looks nice and is well laid out. If you would like to edit the README on the Github repository, you're welcome to.
I'll try to get to your pull request here soon.
Thanks,Arlen
On Fri, Sep 22, 2017 at 6:05 AM, RichardWilliamSmith <richardwi...@gmail.com> wrote:
Hi all,I wrote a short tutorial on Tiddlyserver: https://www.didaxy.com/introduction-to-tiddlyserverTiddlyserver is awesome and I want to try and make sure as many people as possible can use it, as effortlessly as possible, so I'd really value your feedback on anything that you think can be made clearer.I'd obviously especially value Arlen's feedback and input - I hope you don't mind?Regards,Richard
--
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 unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscribe@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/5866b68d-a629-4368-b428-e087a0c930b9%40googlegroups.com.
I wrote a short tutorial on Tiddlyserver: https://www.didaxy.com/introduction-to-tiddlyserver
You need to install Node.js, which you can do just like any other app, from here: https://nodejs.org (the LTS, "Long Term Support" version will be best for most people)
Then you need to download and install Tiddlyserver itself. The best way to do so is to go here:https://github.com/Arlen22/TiddlyServer/releases and download the most recent zip file, then unzip it.
On my mac, it unzips into my download directory. I figure I should move it someplace, so I sent the whole directory to my Documents folder.
If you would prefer to use git and have it installed, you can do git clone https://github.com/Arlen22/TiddlyServer from the command line, or use Github Desktop for an easier alternative. If use git, you'll also need to run npm install from the main directory to install the dependencies. Note also that the git repo contains a lot of unused files and the stable release (zip file) contains other optimisations that also make it run faster.
Now we need to create a settings file, in the directory we just created, which will be called settings.json. You can either follow the steps and reasoning outlined below, or just create a file with that name, skip to the next section (settings.json), and give it the content listed there.
In the folder you just created, you can find the file example-settings.json and open it in an editor.
If you don't normally use an editor, you probably nevertheless have one installed and 'double-clicking' the file may well open it in a suitable app that shouldn't be too hard to use.
We need to change a lot of things in this file. To begin with, it looks like this:
{
// all comments need to be removed from this file
"tree": {
"dropbox": "C:\\Users\\Someone\\Dropbox\\TiddlyWiki",
"tiddlywiki": "C:\\TiddlyWiki5-5.1.14",
"relative": "../relative_to_settings_file",
"branch": {
"twig1": "C:/Some Folder",
"twig2": "C:/Some Other Folder"
}
},
//this is the default value if types is not specified
//this only applies to the directory listing
//specifies file extensions for each icon in the files folder
"types":{
"htmlfile": ["htm", "html"]
},
"username": "",
"password": "",
//127.0.0.1 (the default) serves on localhost, 0.0.0.0 serves on all network connections.
"host": "127.0.0.1",
"port": 8080,
//remove or set to an empty string to disable backups when saving single-file wikis
"backupDirectory": "backup"
}
As it says, we need to remove all the comments.
We also need to change the entries in the 'tree' at the top to match the places on our filing system we want to serve files from.
If we want to serve files to the whole network, we should change 127.0.0.1 to 0.0.0.0 (we've done this below but you can leave it as 127.0.0.1 if you want to restrict access to just your own machine.
If we want to, we can change the port number to something else (if you don't know what this means, there's very little chance you would need to change it).
To avoid a current quirk, which prevents saving, we also need to either create a directory called 'backup', to save backups in, or delete the value 'backup' from the last line.
I'm not sure where the "backup" directory should go, I initially placed it inside Documents - but it failed to work (probably because I allowed this folder to be placed on the iCloud drive and my paths aren't working), since moved to a newly created Docs folder: /Users/jwh/Docs
Once we've made the changes we need to save this file with a different name (usually 'save as' or similar'). It needs to be called settings.json.
The result should look like this looks like this: settings.json
{
"tree": {
"mac_everybody": "/Users",
"windows_everybody": "C:\\Users",
},
"types":{
"htmlfile": ["htm", "html"]
},
"username": "",
"password": "",
"host": "0.0.0.0",
"port": 8080,
"backupDirectory": ""
}
Note that the only difference between Windows and Unix/Mac is the style of the paths. I've included an example of each here, you should delete the one that doesn't apply.
You can add as many entries as you like and they can be nested too, as shown in example-settings.json, but they don't need to be. The simplest configuration is a single entry.
Now we can run Tiddlyserver.
I think that if you're using Windows(tm), you should be able to double-click start.cmd and the process should run. (is that right?)
If you're using a Mac, a similar mechanism is also possible, but the file you need isn't included yet (I sent a pull request: Hi Arlen!)
To run the app from the command line, in the top directory of the repository (where you will already be, if you did npm install above) just type;
node server
I don't know what is meant by the top directory of the repository. I did not use Git - I unzipped from the Arlen link and created a directory for it. In terminal, I CD (Change Directory) and get to /Users/jwh/Docs directory, run "node server" and get a parsing error at location 75 (wherever that is). I recreate settings.json and copy it into every possible location throughout the directory tree and try again
module.js:471
throw err;
^
Error: Cannot find module '/Users/jwh/Docs/server'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:502:3
So I copy server.js to /Users/jwh/Docs and rerun node server - and now it wants /lib files... I realize that I should be in directory /Users/jwh/Docs/TiddlyServer-2.0.6
And I get my original parse error at location 75
You should see a message in your terminal, telling you that Tiddlyserver has started. It will give you the ip address and port that it's running on, which you can enter in the address bar of your browser to see the main file-explorer view.
On my mac, it unzips into my download directory. I figure I should move it someplace, so I sent the whole directory to my Documents folder.
I'm not sure where the "backup" directory should go, I initially placed it inside Documents - but it failed to work (probably because I allowed this folder to be placed on the iCloud drive and my paths aren't working), since moved to a newly created Docs folder: /Users/jwh/Docs
I don't know what is meant by the top directory of the repository. I did not use Git - I unzipped from the Arlen link and created a directory for it. In terminal, I CD (Change Directory) and get to /Users/jwh/Docs directory, run "node server" and get a parsing error at location 75 (wherever that is). I recreate settings.json and copy it into every possible location throughout the directory tree and try again
module.js:471 throw err; ^ Error: Cannot find module '/Users/jwh/Docs/server' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:389:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:502:3
So I copy server.js to /Users/jwh/Docs and rerun node server - and now it wants /lib files... I realize that I should be in directory /Users/jwh/Docs/TiddlyServer-2.0.6
And I get my original parse error at location 75
{"tree": {"dropbox": "/Users/jwh/Dropbox/TW5"
}},"types":{"htmlfile": ["htm", "html"]},"username": "","password": "","host": "0.0.0.0","port": 8080}
JWH-MBA:TiddlyServer jwh$ node server
Settings file: /Users/jwh/Docs/TiddlyServer/settings.json
The settings file could not be parsed correctly
SyntaxError: Unexpected token , in JSON at position 75
at Object.parse (native)
at Object.<anonymous> (/Users/jwh/Docs/TiddlyServer/server.js:29:21)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:502:3
caught process uncaughtException
--
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+unsubscribe@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/3a2f6845-5507-4de5-9480-2248d4083f34%40googlegroups.com.
{
"tree": {
"dropbox": "/Users/jwh/Dropbox/TW5"
}
},
"types":{
"htmlfile": ["htm", "html"]
},
"username": "",
"password": "",
"host": "0.0.0.0",
"port": 8080
}
@JWH - Arlen pulled in a request that I made that adds a file called Tiddlyserver.app (for Mac), which I have also attached here. If you want to try it, you should be able to put this is the Tiddlyserver folder (at the top level) and 'double click' to launch the server. It's just a little wrapper to run the shell script, but it should mean we can avoid the command line altogether if we figure out the settings file. Thank you for your help in getting the instructions right - we obviously still have a few wrinkles to iron out. Thanks for your patience.
Open your browser and type in one of the following:
Although the second one only locks up every browser, the first link does work. I can then start digging into my Dropbox directories to find the file I'm after. It works in any browser and even on my ipad or iphone.
Apparently I must keep terminal active or the "server" is gone.
How can I start terminal (and the server) using only my ipad? Should I load a terminal emulator? Do you have one you recommend?
Again thank you - I love it already.
JWH
https://github.com/Arlen22/TiddlyServer/tree/master/Tiddlyserver.app/Contents/MacOSIt works! Thank you for your patience with me.I'm not sure what the github link is supposed to do (or how to utilize it, or if its for me or developers...)
When I open terminal, get to the correct directory, and type node server - I get the following instructions:Open your browser and type in one of the following:
Apparently I must keep terminal active or the "server" is gone.
How can I start terminal (and the server) using only my ipad? Should I load a terminal emulator? Do you have one you recommend?
Again thank you - I love it already.
JWH
"backupDirectory": "backup"
In the settings.json file.
But you can also write a full path in there, like so
"backupDirectory": "/Users/didaxy/backups"
{"tree": {"dropbox": "/Dropbox"
},"types":{"htmlfile": ["htm", "html"]},"username": "","password": "","host": "0.0.0.0",
"port": 8080,"backupDirectory": "backup"}
Name Type Size dropbox error Fix Put Saver Bookmarklet
TiddlyServer v2.0.6
--
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+unsubscribe@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/70efbf8d-d737-46ad-bc69-fe78552f2669%40googlegroups.com.