1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-04-06 18:56:56 +00:00

Docs updates

This commit is contained in:
Jermolene 2013-12-19 10:08:14 +00:00
parent a4d063e884
commit 6b51a51609
7 changed files with 146 additions and 85 deletions

View File

@ -1,10 +1,10 @@
created: 20131202102427114
modified: 20131212094500689
modified: 20131219100250559
tags: howto
title: Upgrading
type: text/vnd.tiddlywiki
There are several methods for upgrading an existing TiddlyWiki document to a new release.
There are several methods for upgrading an existing TiddlyWiki document to a new release. There is a [[different procedure|Upgrading TiddlyWiki on Node.js]] for upgrading [[TiddlyWiki on Node.js]].
! Online upgrading

View File

@ -0,0 +1,22 @@
created: 20131219100608529
modified: 20131219100621831
tags: howto
title: Installing TiddlyWiki on Node.js
type: text/vnd.tiddlywiki
# Install [[Node.js]] from http://npmjs.org
# Open a command line terminal and type:
#> `npm -g install tiddlywiki`
# Check TiddlyWiki is installed by typing:
#> `tiddlywiki --version`
# In response, you should see TiddlyWiki report its current version (eg `5.0.4-beta`; you may also see other debugging information reported)
# Try it out:
## `mkdir mywiki` to create a folder for a new wiki
## `cd mywiki` to move into the new folder
## `tiddlywiki --server` to start TiddlyWiki
## Visit http://0.0.0.0:8080/ in your browser
## Try editing and creating tiddlers
The `-g` flag causes TiddlyWiki to be installed globally. Without it, TiddlyWiki will only be available in the directory where you installed it.
A slightly different method for installation is recommended if you plan on forking the source code in order to study it or contribute to it. See [[Working with the TiddlyWiki5 repository]].

View File

@ -0,0 +1,61 @@
created: 20131219100637788
modified: 20131219100657540
tags: howto dev
title: Scripts for TiddlyWiki on Node.js
type: text/vnd.tiddlywiki
! Script Files
The TiddlyWiki5 repo contains several scripts that are used to build and deploy TiddlyWiki5 (.sh for *nix and .cmd for Windows). They can serve as a useful starting point for your own scripts.
!! `bld`: builds tw5.com
This script builds several variants of TiddlyWiki5 for deployment on tiddlywiki.com.
By default, files are output to a folder called `jermolene.github.com`, sibling to the TiddlyWiki5 repo directory. For example:
```
/TiddlyWork/ - Directory for working with TiddlyWiki5
/TiddlyWiki5/ - Directory containing the TiddlyWiki5 repo from GitHub
/jermolene.github.com/ - Directory for output files
```
You can override the build output directory by defining the environment variable `TW5_BUILD_OUTPUT`. The easiest way to do this is to create a personal batch file to invoke TiddlyWiki5 that first sets the environment variable and then invokes `bld`.
The files output by `bld` are:
* `readme.md` main readme file, output to the TiddlyWiki5 directory
* `index.html` TiddlyWiki5 standalone HTML file with content from the `tw5.com` edition
* `empty.html` TiddlyWiki5 standalone HTML file with no content
* `encrypted.html` TiddlyWiki5 standalone HTML file encrypted with the password `password`
* `test.html` TiddlyWiki5 browser-based test suite (see TestingMechanism)
* `static.html` static HTML version of the DefaultTiddlers of the `tw5.com` edition
* `static/*.html` and `static/static.css` static HTML versions of individual tiddlers
`bld` also runs the TiddlyWiki5 Node.js-based test suite (see TestingMechanism)
!! `serve`: serves tw5.com
```
serve.sh <username> [<password>]
```
Or:
```
serve.cmd <username> [<password>]
```
This script starts TiddlyWiki5 running as an HTTP server with the content from the `clientserver` edition. By default, the Node.js serves on port 8080. If the optional `username` parameter is provided, it is used for signing edits. If the `password` is provided then HTTP basic authentication is used.
To experiment with this configuration, run the script and then visit `http://0.0.0.0:8080` in a browser.
Changes made in the browser propagate to the server over HTTP (use the browser developer console to see these requests). The server then syncs changes to the file system (and logs each change to the screen).
!! `wbld`: builds TiddlyWiki5 for TiddlyWeb
This script builds and deploys the code for [[TiddlyWiki5 in the Sky for TiddlyWeb]]. If you want to experiment with your own builds of TiddlyWiki5 for TiddlyWeb you could use this batch file as a base.
!! `2bld`: builds TiddlyWiki 2.6.5
This script builds TiddlyWiki 2.6.5 from the original source and then displays the differences between them (`diff` is used for *nix, `fc` for Windows).

View File

@ -1,18 +1,28 @@
created: 20131129094353704
modified: 20131212094217023
modified: 20131219100410583
title: TiddlyWiki on Node.js
type: text/vnd.tiddlywiki
Running TiddlyWiki on [[Node.js]] brings several important benefits over and above the single file version:
* You can edit your content on any suitably compatible HTML5 browser, including smartphones and tablets
* Individual tiddlers are stored in separate files, which you can organise as you wish
* The ability to build multiple wikis that blend different combinations of shared and unique content
! Installation
For working on the command line with Node.js, you can install TiddlyWiki via [[npm|http://npmjs.org]]:
{{Installing TiddlyWiki on Node.js}}
```
npm -g install tiddlywiki
```
! Usage
The `-g` flag causes TiddlyWiki to be installed globally.
{{Using TiddlyWiki on Node.js}}
! Working with the TiddlyWiki5 repository
! Upgrading
[[Working with the TiddlyWiki5 repository]] is recommended if you plan on forking the TiddlyWiki5 source code.
{{Upgrading TiddlyWiki on Node.js}}
! Commands
The following commands are available:
<ul><$list filter="[tag[command]]"><li><$link to={{!!title}}><$view field="title"/></$link></li></$list></ul>

View File

@ -0,0 +1,11 @@
created: 20131219100544073
modified: 20131219100558017
tags: howto
title: Upgrading TiddlyWiki on Node.js
type: text/vnd.tiddlywiki
If you've installed [[TiddlyWiki on Node.js]] on the usual way, when a new version is released you can upgrade it with this command:
```
sudo npm -g upgrade tiddlywiki
```

View File

@ -0,0 +1,23 @@
created: 20131219100520659
modified: 20131219100534483
tags: howto
title: Using TiddlyWiki on Node.js
type: text/vnd.tiddlywiki
TiddlyWiki5 can be used on the command line to perform an extensive set of operations based on TiddlyWikiFolders, TiddlerFiles and TiddlyWikiFiles.
For example, the following command loads the tiddlers from a TiddlyWiki HTML file and then saves one of them in static HTML:
```
tiddlywiki --verbose --load mywiki.html --rendertiddler ReadMe ./readme.html
```
Running `tiddlywiki` from the command line boots the TiddlyWiki kernel, loads the core plugins and establishes an empty wiki store. It then sequentially processes the command line arguments from left to right. The arguments are separated with spaces.
The first argument is the optional path to the [[TiddlyWikiFolder|TiddlyWikiFolders]] to be loaded. If not present, then the current directory is used.
The commands and their individual arguments follow, each command being identified by the prefix `--`.
```
node tiddlywiki.js [<wikipath>] [--<command> [<arg>[,<arg>]]]
```

View File

@ -1,80 +1,14 @@
created: 20130825214500000
modified: 20131129095206930
tags: edition
created: 20131219100444289
modified: 20131219100506819
tags: dev howto
title: Working with the TiddlyWiki5 repository
type: text/vnd.tiddlywiki
TiddlyWiki5 can be used on the command line to perform an extensive set of operations based on tiddlers, TiddlyWikiFolders, TiddlerFiles and TiddlyWikiFiles. For example, the following command loads the tiddlers from a TiddlyWiki HTML file and then saves one of them in HTML:
If you plan on working with the TiddlyWiki5 source code then follow these steps:
```
node tiddlywiki.js --verbose --load mywiki.html --rendertiddler ReadMe ./readme.html
```
# Fork the TiddlyWiki5 GitHub repository from https://github.com/Jermolene/TiddlyWiki5
# Clone a local copy of the repo
# Open a command line terminal and change the current working directory to the root of the repo
# Type `sudo npm link` to tell [[npm]] to use this copy of the repo as the globally installed one
In order to use TiddlyWiki5 on the command line you must first install node.js from http://nodejs.org/
!!Usage
Running `tiddlywiki.js` from the command line boots the TiddlyWiki kernel, loads the core plugins and establishes an empty wiki store. It then sequentially processes the command line arguments from left to right. The arguments are separated with spaces.
The first argument is the optional path to the [[TiddlyWikiFolder|TiddlyWikiFolders]] to be loaded. If not present, then the current directory is used.
The commands and their individual arguments follow, each command being identified by the prefix `--`.
```
node tiddlywiki.js [<wikipath>] [--<command> [<arg>[,<arg>]]]
```
!! Script Files
For trying TiddlyWiki5 out under Node.js, several scripts are provided (.sh for *nix and .cmd for Windows):
!!! `bld`: builds tw5.com
This script builds several variants of TiddlyWiki5 for deployment on tiddlywiki.com.
By default, files are output to a folder called `jermolene.github.com`, sibling to the TiddlyWiki5 source directory. For example:
```
/TiddlyWork/ - Directory for working with TiddlyWiki5
/TiddlyWiki5/ - Directory containing the TiddlyWiki5 repo from GitHub
/jermolene.github.com/ - Directory for output files
```
You can override the build output directory by defining the environment variable `TW5_BUILD_OUTPUT`. The easiest way to do this is to create a personal batch file to invoke TiddlyWiki5 that first sets the environment variable and then invokes `bld`.
The files output by `bld` are:
* `readme.md` main readme file, output to the TiddlyWiki5 directory
* `index.html` TiddlyWiki5 standalone HTML file with content from the `tw5.com` edition
* `empty.html` TiddlyWiki5 standalone HTML file with no content
* `encrypted.html` TiddlyWiki5 standalone HTML file encrypted with the password `password`
* `test.html` TiddlyWiki5 browser-based test suite (see TestingMechanism)
* `static.html` static HTML version of the DefaultTiddlers of the `tw5.com` edition
* `static/*.html` and `static/static.css` static HTML versions of individual tiddlers
`bld` also runs the TiddlyWiki5 Node.js-based test suite (see TestingMechanism)
!!! `serve.sh <username>` or `serve.cmd <username>`: serves tw5.com
This script starts TiddlyWiki5 running as an HTTP server with the content from the `clientserver` edition. By default, the Node.js serves on port 8080. If the optional `username` parameter is provided, it is used for signing edits.
To experiment with this configuration, run the script and then visit `http://0.0.0.0:8080` in a browser.
Changes made in the browser propagate to the server over HTTP (use the browser developer console to see these requests). The server then syncs changes to the file system (and logs each change to the screen).
!!! `wbld`: builds TiddlyWiki5 for TiddlyWeb
This script builds and deploys the code for [[TiddlyWiki5 in the Sky for TiddlyWeb]]. If you want to experiment with your own builds of TiddlyWiki5 for TiddlyWeb you could use this batch file as a base.
!!! `2bld`: builds TiddlyWiki 2.6.5
This script builds TiddlyWiki 2.6.5 from the original source and then displays the differences between them (`diff` is used for *nix, `fc` for Windows).
!!Commands
The following commands are available:
<$list filter="[tag[command]sort[title]]">
!!! <$view field="title" format="link"/>
<$transclude />
</$list>
After this procedure you can work with TiddlyWiki5 via [[npm]] as though it were installed in the usual way with `npm -g install tiddlywiki`. See also [[Scripts for TiddlyWiki on Node.js]].