1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-26 01:50:28 +00:00

Merge branch 'master' of https://github.com/asampal/TiddlyWiki5 into asampal-master

This commit is contained in:
Jermolene 2013-11-20 21:46:38 +00:00
commit 113b48d046
14 changed files with 263 additions and 34 deletions

32
2bld.cmd Normal file
View File

@ -0,0 +1,32 @@
@echo off
rem build TiddlyWiki 2.x
rem create a temporary directory if it doesn't already exist
setlocal enableextensions
mkdir tmp\tw2
setlocal disableextensions
rem Delete any existing content
del /q /s tmp\tw2
echo.
rem Prepare the readme file from the revelant content in the tw5.com wiki
node .\tiddlywiki.js ^
editions\tw5.com ^
--verbose ^
--rendertiddler TiddlyWiki2ReadMe editions\tw2\readme.md text/html ^
|| exit 1
rem cook the TiddlyWiki 2.x.x index file
node .\tiddlywiki.js ^
editions\tw2 ^
--verbose ^
--load editions\tw2\source\tiddlywiki.com\index.html.recipe ^
--rendertiddler $:/core/templates/tiddlywiki2.template.html .\tmp\tw2\index.html text/plain ^
|| exit 1
fc tmp\tw2\index.html editions\tw2\target\prebuilt.html

96
bld.cmd Normal file
View File

@ -0,0 +1,96 @@
@echo off
rem build TiddlyWiki5 for five.tiddlywiki.com
rem Set up the build output directory
if "x%TW5_BUILD_OUTPUT%" == "x" (set TW5_BUILD_OUTPUT=..\jermolene.github.com)
if not exist %TW5_BUILD_OUTPUT%\nul echo A valid TW5_BUILD_OUTPUT environment variable must be set
echo Using TW5_BUILD_OUTPUT as %TW5_BUILD_OUTPUT%
echo.
rem Create the `static` directory if necessary
setlocal enableextensions
mkdir %TW5_BUILD_OUTPUT%\static
setlocal disableextensions
rem Delete any existing content
del /q /s %TW5_BUILD_OUTPUT%\static
rem First,
rem readme.md: the readme file for GitHub
rem index.html: the main file, including content
rem static.html: the static version of the default tiddlers
node .\tiddlywiki.js ^
.\editions\tw5.com ^
--verbose ^
--rendertiddler ReadMe .\readme.md text/html ^
--rendertiddler ContributingTemplate .\contributing.md text/html ^
--rendertiddler $:/core/templates/tiddlywiki5.template.html %TW5_BUILD_OUTPUT%\index.html text/plain ^
--rendertiddler $:/core/templates/static.template.html %TW5_BUILD_OUTPUT%\static.html text/plain ^
--rendertiddler $:/core/templates/static.template.css %TW5_BUILD_OUTPUT%\static\static.css text/plain ^
--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html %TW5_BUILD_OUTPUT%\static text/plain ^
|| exit 1
rem Second, encrypted.html: a version of the main file encrypted with the password "password"
node .\tiddlywiki.js ^
.\editions\tw5.com ^
--verbose ^
--password password ^
--rendertiddler $:/core/templates/tiddlywiki5.template.html %TW5_BUILD_OUTPUT%\encrypted.html text/plain ^
|| exit 1
rem Third, empty.html: empty wiki for reuse
node .\tiddlywiki.js ^
.\editions\empty ^
--verbose ^
--rendertiddler $:/core/templates/tiddlywiki5.template.html %TW5_BUILD_OUTPUT%\empty.html text/plain ^
|| exit 1
rem Fourth, tahoelafs.html: empty wiki with plugin for Tahoe-LAFS
node .\tiddlywiki.js ^
.\editions\tahoelafs ^
--verbose ^
--rendertiddler $:/core/templates/tiddlywiki5.template.html %TW5_BUILD_OUTPUT%\tahoelafs.html text/plain ^
|| exit 1
rem Fifth, d3demo.html: wiki to demo d3 plugin
node .\tiddlywiki.js ^
.\editions\d3demo ^
--verbose ^
--rendertiddler $:/core/templates/tiddlywiki5.template.html %TW5_BUILD_OUTPUT%\d3demo.html text/plain ^
|| exit 1
rem Sixth, codemirrordemo.html: wiki to demo codemirror plugin
node .\tiddlywiki.js ^
.\editions\codemirrordemo ^
--verbose ^
--rendertiddler $:/core/templates/tiddlywiki5.template.html %TW5_BUILD_OUTPUT%\codemirrordemo.html text/plain ^
|| exit 1
rem Seventh, codemirrordemo.html: wiki to demo codemirror plugin
node .\tiddlywiki.js ^
.\editions\markdowndemo ^
--verbose ^
--rendertiddler $:/core/templates/tiddlywiki5.template.html %TW5_BUILD_OUTPUT%\markdowndemo.html text/plain ^
|| exit 1
rem Make the CNAME file that GitHub Pages requires
echo five.tiddlywiki.com > %TW5_BUILD_OUTPUT%\CNAME
rem Eighth, run the test edition to run the Node.js tests and to generate test.html for tests in the browser
.\test.cmd

2
bld.sh
View File

@ -92,6 +92,6 @@ node ./tiddlywiki.js \
--rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/markdowndemo.html text/plain \ --rendertiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/markdowndemo.html text/plain \
|| exit 1 || exit 1
# Eighth, run the test edition to run the node.js tests and to generate test.html for tests in the browser # Eighth, run the test edition to run the Node.js tests and to generate test.html for tests in the browser
./test.sh ./test.sh

17
deploy.cmd Normal file
View File

@ -0,0 +1,17 @@
@echo
rem Publish to NPM
npm publish || exit 1
rem Deploy latest build to github
pushd ..\mytiddlywiki.github.com
git add --all || exit 1
git commit -m "Updates" || exit 1
git push origin || exit 1
popd

View File

@ -1,12 +1,12 @@
created: 201308221702000 created: 201308221702000
creator: JeremyRuston creator: JeremyRuston
modified: 201311091512009 modified: 201311171740
modifier: JeremyRuston modifier: AdrianSampaleanu
tags: introduction tags: introduction
title: HelloThere title: HelloThere
type: text/vnd.tiddlywiki type: text/vnd.tiddlywiki
Welcome to TiddlyWiki5, a reboot of TiddlyWiki, the non-linear personal web notebook first released in 2004. It is a complete interactive wiki in JavaScript that can be run from a single HTML file in the browser or as a powerful [[node.js application|node.js]]. Welcome to TiddlyWiki5, a reboot of TiddlyWiki, the non-linear personal web notebook first released in 2004. It is a complete interactive wiki in JavaScript that can be run from a single HTML file in the browser or as a powerful [[Node.js application|node.js]].
This is TiddlyWiki5 version //<<version>>//. It is drawing to the end of the alpha phase, meaning it is almost ready for everyday use. It is a great time to get involved and support its [[future development|RoadMap]]: This is TiddlyWiki5 version //<<version>>//. It is drawing to the end of the alpha phase, meaning it is almost ready for everyday use. It is a great time to get involved and support its [[future development|RoadMap]]:

View File

@ -1,7 +1,7 @@
created: 201308252145 created: 201308252145
creator: JeremyRuston creator: JeremyRuston
modified: 201308252145 modified: 201311171740
modifier: JeremyRuston modifier: AdrianSampaleanu
tags: edition tags: edition
title: TiddlyWiki5 Node Edition title: TiddlyWiki5 Node Edition
@ -25,25 +25,25 @@ The commands and their individual arguments follow, each command being identifie
node tiddlywiki.js [<wikipath>] [--<command> [<arg>[,<arg>]]] node tiddlywiki.js [<wikipath>] [--<command> [<arg>[,<arg>]]]
``` ```
!! Batch Files !! Script Files
For trying TiddlyWiki5 out under node.js, several batch files are provided: For trying TiddlyWiki5 out under Node.js, several scripts are provided (.sh for *nix and .cmd for Windows):
!!! `bld.sh` builds tw5.com !!! `bld`: builds tw5.com
This batch file builds several variants of TiddlyWiki5 for deployment on tiddlywiki.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` in the same directory as the main TiddlyWiki5 directory. You will need to create the directory before running the batch file. For example: By default, files are output to a folder called `jermolene.github.com`, sibling to the to the TiddlyWiki5 source directory. For example:
``` ```
* /TiddlyWork/ - Directory for working with TiddlyWiki5 /TiddlyWork/ - Directory for working with TiddlyWiki5
* /TiddlyWork/TiddlyWiki5/ - Directory containing the TiddlyWiki5 repo from GitHub /TiddlyWiki5/ - Directory containing the TiddlyWiki5 repo from GitHub
* /TiddlyWork/jermolene.github.com/ - Directory for output files /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.sh`. 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.sh` are: The files output by `bld` are:
* `readme.md` main readme file, output to the TiddlyWiki5 directory * `readme.md` main readme file, output to the TiddlyWiki5 directory
* `index.html` TiddlyWiki5 standalone HTML file with content from the `tw5.com` edition * `index.html` TiddlyWiki5 standalone HTML file with content from the `tw5.com` edition
@ -53,29 +53,23 @@ The files output by `bld.sh` are:
* `static.html` static HTML version of the DefaultTiddlers of the `tw5.com` edition * `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 * `static/*.html` and `static/static.css` static HTML versions of individual tiddlers
`bld.sh` also runs the TiddlyWiki5 node.js-based test suite (see TestingMechanism) `bld` also runs the TiddlyWiki5 Node.js-based test suite (see TestingMechanism)
!!! `serve.sh` serves tw5.com !!! `serve.sh <username>` or `serve.cmd <username>`: serves tw5.com
This batch file starts TiddlyWiki5 running as an HTTP server with the content from the `clientserver` edition. By default, the script serves on port 8080. 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.
```
./server.sh UserName
```
The single parameter to the script is the username to use for signing edits.
To experiment with this configuration, run the script and then visit `http://0.0.0.0:8080` in a browser. 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). 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.sh` builds TiddlyWiki5 for TiddlyWeb !!! `wbld`: builds TiddlyWiki5 for TiddlyWeb
This batch file 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. 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.sh` builds TiddlyWiki 2.6.5 !!! `2bld`: builds TiddlyWiki 2.6.5
This batch file builds TiddlyWiki 2.6.5 from the original source and then uses the `opendiff` program to display the differences between them. 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 !!Commands

View File

@ -5,7 +5,7 @@ title: ReadMe
{{HelloThere}} {{HelloThere}}
! Getting started with TiddlyWiki under node.js ! Getting started with TiddlyWiki under Node.js
{{TiddlyWiki5 Node Edition}} {{TiddlyWiki5 Node Edition}}

15
ginsu.cmd Normal file
View File

@ -0,0 +1,15 @@
@echo
rem Split the tiddlers out of a TiddlyWiki file
setlocal enableextensions
mkdir tmp\ginsu
setlocal disableextensions
node .\tiddlywiki.js ^
.\editions\empty ^
--verbose ^
--load %1 ^
--rendertiddler $:/core/templates/split-recipe tmp\ginsu\split.recipe text/plain ^
--rendertiddlers [!is[system]] $:/core/templates/tid-tiddler tmp\ginsu text/plain .tid ^
|| exit 1

View File

@ -116,3 +116,6 @@ Tobias Beer, @tobibeer, 2013/09/21
Nate Cain, @natecain, 2013/09/30 Nate Cain, @natecain, 2013/09/30
Bob Robison, @grayeul, 2013/11/11 Bob Robison, @grayeul, 2013/11/11
Adrian Sampaleanu, @asampal, 2013/11/17

File diff suppressed because one or more lines are too long

11
serve.cmd Normal file
View File

@ -0,0 +1,11 @@
@echo off
rem serve TiddlyWiki5 over HTTP
rem Optional parameter is the username for signing edits
node .\tiddlywiki.js ^
editions\clientserver ^
--verbose ^
--server 8080 $:/core/templates/tiddlywiki5.template.html text/plain text/html %1^
|| exit 1

19
test.cmd Normal file
View File

@ -0,0 +1,19 @@
@echo off
rem test TiddlyWiki5 for five.tiddlywiki.com
rem Set up the build output directory
if "x%TW5_BUILD_OUTPUT%" == "x" (set TW5_BUILD_OUTPUT=%TMP%\mytiddlywiki.github.com)
if not exist %TW5_BUILD_OUTPUT%\nul echo A valid TW5_BUILD_OUTPUT environment variable must be set
echo Using TW5_BUILD_OUTPUT as %TW5_BUILD_OUTPUT%
rem Run the test edition to run the node.js tests and to generate test.html for tests in the browser
node .\tiddlywiki.js ^
.\editions\test ^
--verbose ^
--rendertiddler $:/core/templates/tiddlywiki5.template.html %TW5_BUILD_OUTPUT%\test.html text/plain ^
|| exit 1

13
verbump.cmd Normal file
View File

@ -0,0 +1,13 @@
@echo
rem Bump to a new version number
if "x%1" == "x" echo "Missing version (eg '5.0.0-alpha.99')" && exit 1
rem Set the new version number (will also commit and tag the release)
npm version %1 -m "Version update" || exit 1
rem Make sure our tags are pushed to the origin server
git push origin --tags || exit 1

29
wbld.cmd Normal file
View File

@ -0,0 +1,29 @@
@echo
rem build the TiddlyWeb edition of TiddlyWiki5 and upload it to TiddlySpace. Requires the TiddlySpace credentials
rem of a member of the tw5tiddlyweb space
rem usage:
rem .\wbld.cmd <tiddlyspace username> <tiddlyspace password>
rem Create the tmp directory if needed
mkdir tmp
rem Open the tw5tiddlyweb edition in TW5 and save the template for the main HTML file
node .\tiddlywiki.js ^
editions\tw5tiddlyweb ^
--verbose ^
--rendertiddler $:/core/templates/tiddlywiki5.template.html tmp\tiddlyweb.html text/plain ^
|| exit 1
rem Prepend the type information that TiddlyWeb needs to turn the .html file into a .tid file
echo "type: text/html" > tmp\tiddlerforupload.txt
echo "" >> tmp\tiddlerforupload.txt
type tmp\tiddlyweb.html >> tmp\tiddlerforupload.txt
rem Upload the tiddler file
curl -u %1:%2 -X PUT -H "content-type: text/plain" http://tw5tiddlyweb.tiddlyspace.com/bags/tw5tiddlyweb_public/tiddlers/tw5 --data-binary @tmp/tiddlerforupload.txt