1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-09-08 22:06:05 +00:00

Move scripts into bin directory

Fixes #807
This commit is contained in:
Jermolene
2014-09-08 16:32:32 +01:00
parent 1c1a5c7252
commit 6e9cd59437
33 changed files with 53 additions and 28 deletions

24
bin/2bld.cmd Normal file
View File

@@ -0,0 +1,24 @@
@echo off
rem build TiddlyWiki 2.x
rem Prepare the readme file from the revelant content in the tw5.com wiki
node .\tiddlywiki.js ^
editions\tw5.com ^
--verbose ^
--output editions\tw2 ^
--rendertiddler TiddlyWiki2ReadMe readme.md text/html ^
|| exit 1
rem cook the TiddlyWiki 2.x.x index file
node .\tiddlywiki.js ^
editions\tw2 ^
--verbose ^
--output tmp\tw2 ^
--load editions\tw2\source\tiddlywiki.com\index.html.recipe ^
--rendertiddler $:/core/templates/tiddlywiki2.template.html index.html text/plain ^
|| exit 1
fc tmp\tw2\index.html editions\tw2\target\prebuilt.html

24
bin/2bld.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
# build TiddlyWiki 2.x
# Prepare the readme file from the revelant content in the tw5.com wiki
node ./tiddlywiki.js \
editions/tw5.com \
--verbose \
--output editions/tw2 \
--rendertiddler TiddlyWiki2ReadMe readme.md text/html \
|| exit 1
# cook the TiddlyWiki 2.x.x index file
node ./tiddlywiki.js \
editions/tw2 \
--verbose \
--output tmp/tw2 \
--load editions/tw2/source/tiddlywiki.com/index.html.recipe \
--rendertiddler $:/core/templates/tiddlywiki2.template.html index.html text/plain \
|| exit 1
diff -q tmp/tw2/index.html editions/tw2/target/prebuilt.html

56
bin/bld-languages.sh Normal file
View File

@@ -0,0 +1,56 @@
#!/bin/bash
# Abbreviated version of bld.sh for quicker builds
# Set up the build output directory
if [ -z "$TW5_BUILD_OUTPUT" ]; then
TW5_BUILD_OUTPUT=../jermolene.github.com
fi
if [ ! -d "$TW5_BUILD_OUTPUT" ]; then
echo 'A valid TW5_BUILD_OUTPUT environment variable must be set'
exit 1
fi
echo "Using TW5_BUILD_OUTPUT as [$TW5_BUILD_OUTPUT]"
# Make the CNAME file that GitHub Pages requires
echo "tiddlywiki.com" > $TW5_BUILD_OUTPUT/CNAME
# The tw5.com wiki
# index.html: the main file, including content
node ./tiddlywiki.js \
./editions/de-AT-DE \
--verbose \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all de-AT-DE.html text/plain \
--savetiddler $:/favicon.ico favicon.ico \
|| exit 1
node ./tiddlywiki.js \
./editions/zh-Hant \
--verbose \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all zh-Hant.html text/plain \
--savetiddler $:/favicon.ico favicon.ico \
|| exit 1
node ./tiddlywiki.js \
./editions/zh-Hans \
--verbose \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all zh-Hans.html text/plain \
--savetiddler $:/favicon.ico favicon.ico \
|| exit 1
node ./tiddlywiki.js \
./editions/fr-FR \
--verbose \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all fr-FR.html text/plain \
--savetiddler $:/favicon.ico favicon.ico \
|| exit 1

121
bin/bld.cmd Normal file
View File

@@ -0,0 +1,121 @@
@echo off
rem build TiddlyWiki5 for 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
exit 1
)
echo Using TW5_BUILD_OUTPUT as %TW5_BUILD_OUTPUT%
echo.
rem Create the `static` directories if necessary
setlocal enableextensions
mkdir %TW5_BUILD_OUTPUT%\static
setlocal disableextensions
rem Delete any existing content
del /q /s %TW5_BUILD_OUTPUT%\static
rem The tw5.com wiki
rem index.html: the main file, including content
rem empty.html: the main file, excluding content
rem static.html: the static version of the default tiddlers
node .\tiddlywiki.js ^
.\editions\tw5.com ^
--verbose ^
--output . ^
--build readmes ^
--output %TW5_BUILD_OUTPUT% ^
--build favicon empty static index ^
|| exit 1
rem upgrade.html: custom edition for handling upgrades
node .\tiddlywiki.js ^
.\editions\upgrade ^
--verbose ^
--output %TW5_BUILD_OUTPUT% ^
--build upgrade ^
|| exit 1
rem encrypted.html: a version of the main file encrypted with the password "password"
node .\tiddlywiki.js ^
.\editions\tw5.com ^
--verbose ^
--output %TW5_BUILD_OUTPUT% ^
--build encrypted ^
|| exit 1
rem tahoelafs.html: empty wiki with plugin for Tahoe-LAFS
node .\tiddlywiki.js ^
.\editions\tahoelafs ^
--verbose ^
--output %TW5_BUILD_OUTPUT% ^
--rendertiddler $:/core/save/all tahoelafs.html text/plain ^
|| exit 1
rem d3demo.html: wiki to demo d3 plugin
node .\tiddlywiki.js ^
.\editions\d3demo ^
--verbose ^
--output %TW5_BUILD_OUTPUT% ^
--rendertiddler $:/core/save/all d3demo.html text/plain ^
|| exit 1
rem codemirrordemo.html: wiki to demo codemirror plugin
node .\tiddlywiki.js ^
.\editions\codemirrordemo ^
--verbose ^
--output %TW5_BUILD_OUTPUT% ^
--rendertiddler $:/core/save/all codemirrordemo.html text/plain ^
|| exit 1
rem markdowndemo.html: wiki to demo markdown plugin
node .\tiddlywiki.js ^
.\editions\markdowndemo ^
--verbose ^
--output %TW5_BUILD_OUTPUT% ^
--rendertiddler $:/core/save/all markdowndemo.html text/plain ^
|| exit 1
rem classicparserdemo.html: wiki to demo classicparser plugin
node .\tiddlywiki.js ^
.\editions\classicparserdemo ^
--verbose ^
--output %TW5_BUILD_OUTPUT% ^
--rendertiddler $:/core/save/all classicparserdemo.html text/plain ^
|| exit 1
rem highlightdemo.html: wiki to demo highlight plugin
node .\tiddlywiki.js ^
.\editions\highlightdemo ^
--verbose ^
--output %TW5_BUILD_OUTPUT% ^
--rendertiddler $:/core/save/all highlightdemo.html text/plain ^
|| exit 1
rem Make the CNAME file that GitHub Pages requires
echo tiddlywiki.com > %TW5_BUILD_OUTPUT%\CNAME
rem Run the test edition to run the Node.js tests and to generate test.html for tests in the browser
.\bin\test.cmd

118
bin/bld.sh Executable file
View File

@@ -0,0 +1,118 @@
#!/bin/bash
# build TiddlyWiki5 for tiddlywiki.com
# Set up the build output directory
if [ -z "$TW5_BUILD_OUTPUT" ]; then
TW5_BUILD_OUTPUT=../jermolene.github.com
fi
if [ ! -d "$TW5_BUILD_OUTPUT" ]; then
echo 'A valid TW5_BUILD_OUTPUT environment variable must be set'
exit 1
fi
echo "Using TW5_BUILD_OUTPUT as [$TW5_BUILD_OUTPUT]"
# Make the CNAME file that GitHub Pages requires
echo "tiddlywiki.com" > $TW5_BUILD_OUTPUT/CNAME
# Create the `static` directories if necessary
mkdir -p $TW5_BUILD_OUTPUT/static
# Delete any existing content
rm $TW5_BUILD_OUTPUT/static/*
# The tw5.com wiki
# index.html: the main file, including content
# empty.html: the main file, excluding content
# static.html: the static version of the default tiddlers
node ./tiddlywiki.js \
./editions/tw5.com \
--verbose \
--output . \
--build readmes \
--output $TW5_BUILD_OUTPUT \
--build favicon empty static index \
|| exit 1
# upgrade.html: custom edition for handling upgrades
node ./tiddlywiki.js \
./editions/upgrade \
--verbose \
--output $TW5_BUILD_OUTPUT \
--build upgrade \
|| exit 1
# encrypted.html: a version of the main file encrypted with the password "password"
node ./tiddlywiki.js \
./editions/tw5.com \
--verbose \
--output $TW5_BUILD_OUTPUT \
--build encrypted \
|| exit 1
# tahoelafs.html: empty wiki with plugin for Tahoe-LAFS
node ./tiddlywiki.js \
./editions/tahoelafs \
--verbose \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all tahoelafs.html text/plain \
|| exit 1
# d3demo.html: wiki to demo d3 plugin
node ./tiddlywiki.js \
./editions/d3demo \
--verbose \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all d3demo.html text/plain \
|| exit 1
# codemirrordemo.html: wiki to demo codemirror plugin
node ./tiddlywiki.js \
./editions/codemirrordemo \
--verbose \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all codemirrordemo.html text/plain \
|| exit 1
# markdowndemo.html: wiki to demo markdown plugin
node ./tiddlywiki.js \
./editions/markdowndemo \
--verbose \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all markdowndemo.html text/plain \
|| exit 1
# classicparserdemo.html: wiki to demo classicparser plugin
node ./tiddlywiki.js \
./editions/classicparserdemo \
--verbose \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all classicparserdemo.html text/plain \
|| exit 1
# highlightdemo.html: wiki to demo highlight plugin
node ./tiddlywiki.js \
./editions/highlightdemo \
--verbose \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all highlightdemo.html text/plain \
|| exit 1
# Run the test edition to run the Node.js tests and to generate test.html for tests in the browser
./bin/test.sh

17
bin/deploy.cmd Normal file
View File

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

17
bin/deploy.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
# Publish to NPM
npm publish || exit 1
# Deploy latest build to github
pushd ../jermolene.github.com
git add --all || exit 1
git commit -m "Updates" || exit 1
git push origin || exit 1
popd

12
bin/ginsu.cmd Normal file
View File

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

12
bin/ginsu.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
# Split the tiddlers out of a TiddlyWiki file
node ./tiddlywiki.js \
./editions/empty \
--verbose \
--load $1 \
--output tmp \
--rendertiddlers [!is[system]] $:/core/templates/tid-tiddler ginsu text/plain .tid \
--rendertiddler $:/core/templates/split-recipe ginsu/split.recipe text/plain \
|| exit 1

11
bin/lazy.cmd Normal file
View File

@@ -0,0 +1,11 @@
@echo off
rem serve TiddlyWiki5 over HTTP with lazily loaded images
rem Optional parameter is the username for signing edits
node .\tiddlywiki.js ^
editions\server ^
--verbose ^
--server 8080 $:/core/save/lazy-images text/plain text/html %1 %2^
|| exit 1

11
bin/lazy.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
# serve TiddlyWiki5 over HTTP with lazily loaded images
# Optional parameter is the username for signing edits
node ./tiddlywiki.js \
editions/server \
--verbose \
--server 8080 $:/core/save/lazy-images text/plain text/html $1 $2\
|| exit 1

28
bin/qbld.cmd Normal file
View File

@@ -0,0 +1,28 @@
@echo off
rem Abbreviated version of bld.sh for quicker builds
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
exit 1
)
echo Using TW5_BUILD_OUTPUT as %TW5_BUILD_OUTPUT%
echo.
rem The tw5.com wiki
rem index.html: the main file, including content
node .\tiddlywiki.js ^
.\editions\tw5.com ^
--verbose ^
--output %TW5_BUILD_OUTPUT% ^
--rendertiddler $:/core/save/all index.html text/plain ^
--savetiddler $:/favicon.ico favicon.ico ^
|| exit 1

30
bin/qbld.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
# Abbreviated version of bld.sh for quicker builds
# Set up the build output directory
if [ -z "$TW5_BUILD_OUTPUT" ]; then
TW5_BUILD_OUTPUT=../jermolene.github.com
fi
if [ ! -d "$TW5_BUILD_OUTPUT" ]; then
echo 'A valid TW5_BUILD_OUTPUT environment variable must be set'
exit 1
fi
echo "Using TW5_BUILD_OUTPUT as [$TW5_BUILD_OUTPUT]"
# Make the CNAME file that GitHub Pages requires
echo "tiddlywiki.com" > $TW5_BUILD_OUTPUT/CNAME
# The tw5.com wiki
# index.html: the main file, including content
node ./tiddlywiki.js \
./editions/tw5.com \
--verbose \
--output $TW5_BUILD_OUTPUT \
--build index favicon \
|| exit 1

6
bin/readme.md Normal file

File diff suppressed because one or more lines are too long

11
bin/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\tw5.com-server ^
--verbose ^
--server 8080 $:/core/save/all text/plain text/html %1 %2^
|| exit 1

11
bin/serve.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
# serve TiddlyWiki5 over HTTP
# Optional parameter is the username for signing edits
node ./tiddlywiki.js \
editions/tw5.com-server \
--verbose \
--server 8080 $:/core/save/all text/plain text/html $1 $2\
|| exit 1

20
bin/tankbld.cmd Normal file
View File

@@ -0,0 +1,20 @@
@echo off
rem build the Tank edition of TiddlyWiki
rem See https://tank.peermore.com
rem Open the tank edition in TW5 and save the template for the main HTML file
node .\tiddlywiki.js ^
editions\tw5tank ^
--verbose ^
--output tmp ^
--rendertiddler $:/core/save/all app.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\app.txt
echo "" >> tmp\app.txt
type tmp\app.html >> tmp\app.txt

20
bin/tankbld.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
# build the Tank edition of TiddlyWiki
# See https://tank.peermore.com
# Open the tank edition in TW5 and save the template for the main HTML file
node ./tiddlywiki.js \
editions/tw5tank \
--verbose \
--output tmp \
--rendertiddler $:/core/save/all app.html text/plain \
|| exit 1
# Prepend the type information that TiddlyWeb needs to turn the .html file into a .tid file
echo "type: text/html" > tmp/app.txt
echo "" >> tmp/app.txt
cat tmp/app.html >> tmp/app.txt

25
bin/test.cmd Normal file
View File

@@ -0,0 +1,25 @@
@echo off
rem test TiddlyWiki5 for 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
exit 1
)
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 ^
--output %TW5_BUILD_OUTPUT% ^
--verbose ^
--rendertiddler $:/core/save/all test.html text/plain ^
|| exit 1

25
bin/test.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
# test TiddlyWiki5 for tiddlywiki.com
# Set up the build output directory
if [ -z "$TW5_BUILD_OUTPUT" ]; then
TW5_BUILD_OUTPUT=../jermolene.github.com
fi
if [ ! -d "$TW5_BUILD_OUTPUT" ]; then
echo 'A valid TW5_BUILD_OUTPUT environment variable must be set'
exit 1
fi
echo "Using TW5_BUILD_OUTPUT as [$TW5_BUILD_OUTPUT]"
# 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 \
--output $TW5_BUILD_OUTPUT \
--rendertiddler $:/core/save/all test.html text/plain \
|| exit 1

16
bin/verbump.cmd Normal file
View File

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

17
bin/verbump.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
# Bump to a new version number
if [ -z "$1" ]
then
echo "Missing version (eg '5.0.0-alpha')"
exit 1
fi
# Set the new version number (will also commit and tag the release)
npm version $1 -m "Version number update for $1" || exit 1
# Make sure our tags are pushed to the origin server
git push origin --tags || exit 1

26
bin/wbld.cmd Normal file
View File

@@ -0,0 +1,26 @@
@echo off
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 Open the tw5tiddlyweb edition in TW5 and save the template for the main HTML file
node .\tiddlywiki.js ^
editions\tw5tiddlyweb ^
--verbose ^
--output tmp ^
--rendertiddler $:/core/save/all 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

30
bin/wbld.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
# build the TiddlyWeb edition of TiddlyWiki5 and upload it to TiddlySpace. Requires the TiddlySpace credentials
# of a member of the tw5tiddlyweb space
# usage:
# ./wbld.sh <tiddlyspace username> <tiddlyspace password>
# Create the tmp directory if needed
mkdir -p tmp
# Open the tw5tiddlyweb edition in TW5 and save the template for the main HTML file
node ./tiddlywiki.js \
editions/tw5tiddlyweb \
--verbose \
--output tmp \
--rendertiddler $:/core/save/all tiddlyweb.html text/plain \
|| exit 1
# 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
cat tmp/tiddlyweb.html >> tmp/tiddlerforupload.txt
# 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