mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-22 10:54:46 +00:00
Compare commits
473 Commits
v5.0.8-bet
...
v5.0.12-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aaec1b2854 | ||
|
|
9edebc78e7 | ||
|
|
e228ac42db | ||
|
|
be0bc04929 | ||
|
|
b415b0e90e | ||
|
|
974aecba1f | ||
|
|
47fa18c2e0 | ||
|
|
d5094463f4 | ||
|
|
5951dc5901 | ||
|
|
1d15e4b7d3 | ||
|
|
67e66b4698 | ||
|
|
c00940f2d1 | ||
|
|
81ea326e16 | ||
|
|
c2f52f8a4b | ||
|
|
ca03984663 | ||
|
|
b2ff248d07 | ||
|
|
658bd2b8a3 | ||
|
|
a8b16c9c07 | ||
|
|
157ca0c8aa | ||
|
|
01b3962b2c | ||
|
|
19646c7f95 | ||
|
|
dfb8a07204 | ||
|
|
93566cdc33 | ||
|
|
ad8a20bfed | ||
|
|
00cddd3713 | ||
|
|
23c8902e70 | ||
|
|
818fd598dc | ||
|
|
31e1088aa7 | ||
|
|
f9f8ad725b | ||
|
|
81e1af1d35 | ||
|
|
c9c1b0fbb4 | ||
|
|
f7ce0c0b8d | ||
|
|
92aa1f24be | ||
|
|
e0a6c4e879 | ||
|
|
f72c177ba5 | ||
|
|
9a26c4259a | ||
|
|
6de6a43623 | ||
|
|
2fa3c8a4ed | ||
|
|
295094c9a3 | ||
|
|
da41879fc1 | ||
|
|
f8708874bc | ||
|
|
ad43958571 | ||
|
|
4e07b3335b | ||
|
|
b77d5f9725 | ||
|
|
75fee26b58 | ||
|
|
e8c9d78079 | ||
|
|
d972988a53 | ||
|
|
e83759e86d | ||
|
|
2633247492 | ||
|
|
b3032d452f | ||
|
|
e60fc9f81f | ||
|
|
6ab68e0fca | ||
|
|
e548dd35af | ||
|
|
8b20143b1b | ||
|
|
711b76307c | ||
|
|
b858e9dc69 | ||
|
|
a9411262f7 | ||
|
|
e676156b24 | ||
|
|
c592e658e7 | ||
|
|
6b03789e06 | ||
|
|
51f54b06f9 | ||
|
|
285ab41ccf | ||
|
|
854b739a35 | ||
|
|
abe0ce28b9 | ||
|
|
76e8640c31 | ||
|
|
cc3d44aec1 | ||
|
|
7b6cff0cca | ||
|
|
d1c85f53c0 | ||
|
|
e2b0da0b58 | ||
|
|
7c8c5cf745 | ||
|
|
38c60bd7d4 | ||
|
|
afb92c40fe | ||
|
|
6b45296ca9 | ||
|
|
b84c663215 | ||
|
|
4e101e240c | ||
|
|
56251dc1f8 | ||
|
|
f368175cb0 | ||
|
|
3e49dd65a0 | ||
|
|
f5ada72dac | ||
|
|
986a20b22b | ||
|
|
ffb6c8ab81 | ||
|
|
e58e68fa7c | ||
|
|
95def8b857 | ||
|
|
b24ec8009d | ||
|
|
9965c64b6f | ||
|
|
2a50277219 | ||
|
|
3cce12e13f | ||
|
|
887e9d978b | ||
|
|
a0022a1cd6 | ||
|
|
519e1b4a44 | ||
|
|
b9dec37fb7 | ||
|
|
09156af475 | ||
|
|
5b5621a600 | ||
|
|
78ba57d55d | ||
|
|
749582ede0 | ||
|
|
1c82348edb | ||
|
|
b96aade28a | ||
|
|
2f32621024 | ||
|
|
6ccf02ed96 | ||
|
|
b2c1331c11 | ||
|
|
f81df69395 | ||
|
|
a5e9ef9b5f | ||
|
|
7783378603 | ||
|
|
327b53a641 | ||
|
|
cb914ae853 | ||
|
|
a4294b55f0 | ||
|
|
bced7124e4 | ||
|
|
f5848c395a | ||
|
|
f6bd3b8c37 | ||
|
|
21b2d6fdc7 | ||
|
|
bd3e955821 | ||
|
|
fcb26419a6 | ||
|
|
a6f7da6c1c | ||
|
|
f82f8ae7c6 | ||
|
|
edb8c65d54 | ||
|
|
031c0f4146 | ||
|
|
e8316cf0ac | ||
|
|
0ac4c2b554 | ||
|
|
84cd296c58 | ||
|
|
a90339d1e5 | ||
|
|
d49495ab73 | ||
|
|
5fa6d001f8 | ||
|
|
f17dafefcb | ||
|
|
88314d968a | ||
|
|
28bab707b9 | ||
|
|
075cf544e4 | ||
|
|
a505b6ffc0 | ||
|
|
23a71b433e | ||
|
|
3bbe53a58e | ||
|
|
8556e0ea49 | ||
|
|
3be21853e1 | ||
|
|
d0636f2124 | ||
|
|
5226c7a2fa | ||
|
|
3a78465d2d | ||
|
|
23640d7af4 | ||
|
|
540681b2bc | ||
|
|
8611867930 | ||
|
|
77152ac577 | ||
|
|
f5bd99fa73 | ||
|
|
385c7e207c | ||
|
|
61c204366f | ||
|
|
570cad1c7f | ||
|
|
1d0dc60a2d | ||
|
|
fac0affa7b | ||
|
|
f57241abbd | ||
|
|
e9557b578e | ||
|
|
649f68288a | ||
|
|
37c50bae61 | ||
|
|
9ab31e37ea | ||
|
|
30707e2f19 | ||
|
|
1fb76ae56d | ||
|
|
4008191459 | ||
|
|
463bd0517c | ||
|
|
fb3a31ae43 | ||
|
|
f7e50e0950 | ||
|
|
552657fc58 | ||
|
|
d727046948 | ||
|
|
f6ca7d92e5 | ||
|
|
148e77b0e4 | ||
|
|
cc60ad1428 | ||
|
|
fecf3a556f | ||
|
|
39ef0ad88f | ||
|
|
f75826224b | ||
|
|
52f28a1cc3 | ||
|
|
61c3f8a5ba | ||
|
|
13da54b9bd | ||
|
|
680414d1c5 | ||
|
|
2c7d5c5964 | ||
|
|
3d69c929d9 | ||
|
|
8cbcfee346 | ||
|
|
43173c801f | ||
|
|
523faf71fb | ||
|
|
ad2bbb2c93 | ||
|
|
8756d25d78 | ||
|
|
8a27c2759b | ||
|
|
beddcd7138 | ||
|
|
2db90378a2 | ||
|
|
7684891285 | ||
|
|
821f1f1428 | ||
|
|
4538f081ee | ||
|
|
b4122be50c | ||
|
|
cd76514105 | ||
|
|
ba576d9f1b | ||
|
|
15d0c27e2a | ||
|
|
869cec1ccc | ||
|
|
d6054f1039 | ||
|
|
9fbe72a877 | ||
|
|
89165fc51d | ||
|
|
4758874d13 | ||
|
|
0153fd2a30 | ||
|
|
bb42c0ab36 | ||
|
|
95d291daac | ||
|
|
45b0966013 | ||
|
|
de07da3797 | ||
|
|
aebc1ea943 | ||
|
|
73cfd10218 | ||
|
|
d336ffea02 | ||
|
|
6da28e7365 | ||
|
|
d08a2d109f | ||
|
|
f57e047877 | ||
|
|
df5fe10a40 | ||
|
|
433ac8e96e | ||
|
|
ad4b03506a | ||
|
|
ace57dd205 | ||
|
|
bd4a031df8 | ||
|
|
6db94052c7 | ||
|
|
dd8797223a | ||
|
|
e54b0d7129 | ||
|
|
07ab8c75b8 | ||
|
|
0a6077286f | ||
|
|
634e76eb7f | ||
|
|
cd1463cbb0 | ||
|
|
5bcc666f34 | ||
|
|
6bef1d6b30 | ||
|
|
4b8be85b88 | ||
|
|
d01f1020d2 | ||
|
|
f77de37a2f | ||
|
|
f3c5ce7ca4 | ||
|
|
6ed38389b0 | ||
|
|
5393fbee99 | ||
|
|
3b31c6fe3a | ||
|
|
9ba55c7e79 | ||
|
|
9323574efb | ||
|
|
f5cf8cba5c | ||
|
|
88be791e58 | ||
|
|
dad60cda05 | ||
|
|
fe0ed5e4ce | ||
|
|
aa243e4478 | ||
|
|
4c648e7cdc | ||
|
|
0aa559cd23 | ||
|
|
28db76ddb3 | ||
|
|
09cf788063 | ||
|
|
e366aa3746 | ||
|
|
22a529b28d | ||
|
|
c2d6086bd9 | ||
|
|
f1578d3409 | ||
|
|
93b9d16d6c | ||
|
|
13bb20cad4 | ||
|
|
bba7e97f60 | ||
|
|
cb32d187c5 | ||
|
|
8582e5ebe2 | ||
|
|
46969fbd3e | ||
|
|
260d3ad8c0 | ||
|
|
4d0b08d464 | ||
|
|
5447420832 | ||
|
|
d9b87055bf | ||
|
|
4f4b743d9c | ||
|
|
ee2cd2056c | ||
|
|
be5f6f6700 | ||
|
|
be7822281a | ||
|
|
3afa26b9a3 | ||
|
|
2a2cc20601 | ||
|
|
400ab3b3c5 | ||
|
|
ebe7587aa0 | ||
|
|
c954ac01fe | ||
|
|
a3cf925e56 | ||
|
|
be7c33dc48 | ||
|
|
634f914610 | ||
|
|
7aaab03e03 | ||
|
|
fd1399f6d9 | ||
|
|
442bc35bcb | ||
|
|
1bc9bf541a | ||
|
|
ccf2cb36a1 | ||
|
|
18d14031b7 | ||
|
|
5fff6fc87f | ||
|
|
5a65898dbe | ||
|
|
cbf45a9982 | ||
|
|
7a4a00f6ca | ||
|
|
dfb367c104 | ||
|
|
7853b7f7b3 | ||
|
|
ccefc1b17b | ||
|
|
6786a1fd14 | ||
|
|
e73d2854f9 | ||
|
|
127cd70769 | ||
|
|
fc407d079c | ||
|
|
df6fe8f852 | ||
|
|
613f413942 | ||
|
|
70a2db34d1 | ||
|
|
5821165ec5 | ||
|
|
4888417a35 | ||
|
|
2aa1acb565 | ||
|
|
e5fe3f76ac | ||
|
|
ef03e5ce63 | ||
|
|
690c8fe9a0 | ||
|
|
6f1e8ee3a1 | ||
|
|
9b52ca7cc0 | ||
|
|
f9a274df85 | ||
|
|
776bf29afc | ||
|
|
f08c4aa525 | ||
|
|
0f07977930 | ||
|
|
362df18a19 | ||
|
|
426281539a | ||
|
|
dc5831a8a8 | ||
|
|
6d43b4e8dc | ||
|
|
3282bd948f | ||
|
|
7ec356ac80 | ||
|
|
688879e6fa | ||
|
|
9bdd7a4e19 | ||
|
|
78f81a6894 | ||
|
|
5ec0775d3e | ||
|
|
c4d0ee11d3 | ||
|
|
597b8ca4b1 | ||
|
|
ea46f85a8a | ||
|
|
1e960ffcac | ||
|
|
8a7d0f53d3 | ||
|
|
b51d851f93 | ||
|
|
e21d558ff0 | ||
|
|
c7b4febae3 | ||
|
|
4d91a7762e | ||
|
|
272a4bbe61 | ||
|
|
b7f674c51a | ||
|
|
14f90b9519 | ||
|
|
2f458e8573 | ||
|
|
3619eb1378 | ||
|
|
9bd626315e | ||
|
|
d3c0296a87 | ||
|
|
e397e4d159 | ||
|
|
93c29bd388 | ||
|
|
7985a808bf | ||
|
|
aced860d52 | ||
|
|
c1bb7b00c1 | ||
|
|
856b68a34d | ||
|
|
1940bd4dce | ||
|
|
d402d3c5a6 | ||
|
|
dcce487934 | ||
|
|
53ca7f6a2f | ||
|
|
c3e24c1228 | ||
|
|
6307293469 | ||
|
|
0d0679de1b | ||
|
|
09214d1c33 | ||
|
|
914a536d82 | ||
|
|
5a085f7927 | ||
|
|
0595619d39 | ||
|
|
776c9a2cad | ||
|
|
36dabd792e | ||
|
|
ec90ac99cf | ||
|
|
299007f08b | ||
|
|
49578bb144 | ||
|
|
ead5e607fa | ||
|
|
5c3c6cd7c0 | ||
|
|
818b29386e | ||
|
|
c0f78df48d | ||
|
|
c58852a67b | ||
|
|
bca1d55280 | ||
|
|
45a362c285 | ||
|
|
355f467465 | ||
|
|
871630be88 | ||
|
|
8b813ccb43 | ||
|
|
59ac38a3da | ||
|
|
80b65b1651 | ||
|
|
7dede861e1 | ||
|
|
514b8e1776 | ||
|
|
79d643775d | ||
|
|
945ad6792f | ||
|
|
7c235566c4 | ||
|
|
d3e178becc | ||
|
|
bc432d5e52 | ||
|
|
fa10801d72 | ||
|
|
87c8478c80 | ||
|
|
535837e017 | ||
|
|
20f6383528 | ||
|
|
26fd460670 | ||
|
|
20d7264e4b | ||
|
|
3ce2159a95 | ||
|
|
968d44e4be | ||
|
|
f46d445ba2 | ||
|
|
1b0a39cd1a | ||
|
|
cb2653aee0 | ||
|
|
34445dcc68 | ||
|
|
54abcdceeb | ||
|
|
cf7554a938 | ||
|
|
fb72b3b859 | ||
|
|
03cfa61ae8 | ||
|
|
4badabce4b | ||
|
|
3cb2b365c5 | ||
|
|
178cfb1084 | ||
|
|
920df5d2d4 | ||
|
|
7b57561160 | ||
|
|
d2a41b8486 | ||
|
|
aa63151815 | ||
|
|
ba6edd42c1 | ||
|
|
7616c4ce7d | ||
|
|
925b3d2a5b | ||
|
|
b8d0fd059b | ||
|
|
a19432541e | ||
|
|
b52299872a | ||
|
|
699b863588 | ||
|
|
bdbbf94326 | ||
|
|
cdf3e101a8 | ||
|
|
06500e5f71 | ||
|
|
9de17aa206 | ||
|
|
279626a3e3 | ||
|
|
721e333a20 | ||
|
|
499730c458 | ||
|
|
baa8cf3dd0 | ||
|
|
f649b5b037 | ||
|
|
afa677b9a0 | ||
|
|
6fe884bb8a | ||
|
|
00af144085 | ||
|
|
5d893397c4 | ||
|
|
42c67cfeb7 | ||
|
|
b714c67374 | ||
|
|
00cb2f4659 | ||
|
|
24b6603c42 | ||
|
|
a82e50c07f | ||
|
|
ebc77fbd09 | ||
|
|
96457d8011 | ||
|
|
3d9f61f041 | ||
|
|
f48701544e | ||
|
|
50cf9678cb | ||
|
|
c4119f4f93 | ||
|
|
cafe74fc89 | ||
|
|
2466389397 | ||
|
|
dd3ee2a603 | ||
|
|
8e17c1dfd5 | ||
|
|
9bd0174205 | ||
|
|
522dad95be | ||
|
|
87c4839fed | ||
|
|
22b6425bac | ||
|
|
5ba92fe274 | ||
|
|
91939d67ed | ||
|
|
d0caf21b2d | ||
|
|
0d18f3cc5d | ||
|
|
a3507bf611 | ||
|
|
62bc20a181 | ||
|
|
9ded88105b | ||
|
|
aec618793f | ||
|
|
fe33906ef0 | ||
|
|
6a17bad96e | ||
|
|
4f9fa5d66e | ||
|
|
0d7c4ae6c7 | ||
|
|
2608a323eb | ||
|
|
8d612aefdd | ||
|
|
ad96c48034 | ||
|
|
12e153ecff | ||
|
|
db35bc36aa | ||
|
|
af34fbbca3 | ||
|
|
8239275edb | ||
|
|
be6509a17f | ||
|
|
01e1133219 | ||
|
|
f04527ae32 | ||
|
|
98872bbe7c | ||
|
|
bc8b72e6eb | ||
|
|
127d547632 | ||
|
|
53755d87c8 | ||
|
|
289bec0fd5 | ||
|
|
8bd1fa50dc | ||
|
|
81af6bdd48 | ||
|
|
a5a2c718b1 | ||
|
|
6b67a3f3c2 | ||
|
|
1cea80a3ab | ||
|
|
b6a202f525 | ||
|
|
7b109506c8 | ||
|
|
c277370e48 | ||
|
|
f83443feac | ||
|
|
8529ad13d6 | ||
|
|
8deedf93a2 | ||
|
|
bdcfa75220 | ||
|
|
20d39588b5 | ||
|
|
67f3d58f71 | ||
|
|
bbfb855c2e | ||
|
|
6a63a45968 | ||
|
|
70d2d4b7a1 | ||
|
|
6aa21b3db6 | ||
|
|
ff32317f5b | ||
|
|
df6436a12c | ||
|
|
0200bc1b4e | ||
|
|
bd750a21e2 | ||
|
|
8c3782c1e2 | ||
|
|
2f2a257745 | ||
|
|
ab7d2d64e7 | ||
|
|
bc18501b59 | ||
|
|
0a5ce6d740 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
.DS_Store
|
||||
tmp/
|
||||
output/
|
||||
|
||||
16
2bld.cmd
16
2bld.cmd
@@ -2,22 +2,13 @@
|
||||
|
||||
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 ^
|
||||
--output editions\tw2 ^
|
||||
--rendertiddler TiddlyWiki2ReadMe readme.md text/html ^
|
||||
|| exit 1
|
||||
|
||||
rem cook the TiddlyWiki 2.x.x index file
|
||||
@@ -25,8 +16,9 @@ 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 .\tmp\tw2\index.html text/plain ^
|
||||
--rendertiddler $:/core/templates/tiddlywiki2.template.html index.html text/plain ^
|
||||
|| exit 1
|
||||
|
||||
fc tmp\tw2\index.html editions\tw2\target\prebuilt.html
|
||||
|
||||
10
2bld.sh
10
2bld.sh
@@ -2,16 +2,13 @@
|
||||
|
||||
# build TiddlyWiki 2.x
|
||||
|
||||
# create a temporary directory if it doesn't already exist
|
||||
mkdir -p tmp
|
||||
mkdir -p tmp/tw2
|
||||
|
||||
# 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 \
|
||||
--output editions/tw2 \
|
||||
--rendertiddler TiddlyWiki2ReadMe readme.md text/html \
|
||||
|| exit 1
|
||||
|
||||
# cook the TiddlyWiki 2.x.x index file
|
||||
@@ -19,8 +16,9 @@ node ./tiddlywiki.js \
|
||||
node ./tiddlywiki.js \
|
||||
editions/tw2 \
|
||||
--verbose \
|
||||
--output tmp/tw2 \
|
||||
--load editions/tw2/source/tiddlywiki.com/index.html.recipe \
|
||||
--rendertiddler $:/core/templates/tiddlywiki2.template.html ./tmp/tw2/index.html text/plain \
|
||||
--rendertiddler $:/core/templates/tiddlywiki2.template.html index.html text/plain \
|
||||
|| exit 1
|
||||
|
||||
diff -q tmp/tw2/index.html editions/tw2/target/prebuilt.html
|
||||
|
||||
@@ -25,28 +25,32 @@ echo "tiddlywiki.com" > $TW5_BUILD_OUTPUT/CNAME
|
||||
node ./tiddlywiki.js \
|
||||
./editions/de-AT-DE \
|
||||
--verbose \
|
||||
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/de-AT-DE.html text/plain \
|
||||
--savetiddler $:/favicon.ico $TW5_BUILD_OUTPUT/favicon.ico \
|
||||
--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 \
|
||||
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/zh-Hant.html text/plain \
|
||||
--savetiddler $:/favicon.ico $TW5_BUILD_OUTPUT/favicon.ico \
|
||||
--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 \
|
||||
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/zh-Hans.html text/plain \
|
||||
--savetiddler $:/favicon.ico $TW5_BUILD_OUTPUT/favicon.ico \
|
||||
--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 \
|
||||
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/fr-FR.html text/plain \
|
||||
--savetiddler $:/favicon.ico $TW5_BUILD_OUTPUT/favicon.ico \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--rendertiddler $:/core/save/all fr-FR.html text/plain \
|
||||
--savetiddler $:/favicon.ico favicon.ico \
|
||||
|| exit 1
|
||||
|
||||
|
||||
36
bld.cmd
36
bld.cmd
@@ -34,18 +34,20 @@ rem static.html: the static version of the default tiddlers
|
||||
node .\tiddlywiki.js ^
|
||||
.\editions\tw5.com ^
|
||||
--verbose ^
|
||||
--rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\index.html text/plain ^
|
||||
--savetiddler $:/favicon.ico %TW5_BUILD_OUTPUT%\favicon.ico ^
|
||||
--output . ^
|
||||
--rendertiddler ReadMe .\readme.md text/html ^
|
||||
--rendertiddler ContributingTemplate .\contributing.md text/html ^
|
||||
--rendertiddler $:/core/copyright.txt .\licenses\copyright.md text/plain ^
|
||||
--rendertiddler $:/editions/tw5.com/download-empty %TW5_BUILD_OUTPUT%\empty.html text/plain ^
|
||||
--rendertiddler $:/editions/tw5.com/download-empty %TW5_BUILD_OUTPUT%\empty.hta text/plain ^
|
||||
--output %TW5_BUILD_OUTPUT% ^
|
||||
--rendertiddler $:/core/save/all index.html text/plain ^
|
||||
--savetiddler $:/favicon.ico favicon.ico ^
|
||||
--rendertiddler $:/editions/tw5.com/download-empty empty.html text/plain ^
|
||||
--rendertiddler $:/editions/tw5.com/download-empty empty.hta text/plain ^
|
||||
--savetiddler $:/green_favicon.ico %TW5_BUILD_OUTPUT%/static/favicon.ico ^
|
||||
--rendertiddler $:/core/templates/static.template.html %TW5_BUILD_OUTPUT%\static.html text/plain ^
|
||||
--rendertiddler $:/core/templates/alltiddlers.template.html %TW5_BUILD_OUTPUT%\alltiddlers.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 ^
|
||||
--rendertiddler $:/core/templates/static.template.html static.html text/plain ^
|
||||
--rendertiddler $:/core/templates/alltiddlers.template.html alltiddlers.html text/plain ^
|
||||
--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html static text/plain ^
|
||||
--rendertiddler $:/core/templates/static.template.css static\static.css text/plain ^
|
||||
|| exit 1
|
||||
|
||||
rem encrypted.html: a version of the main file encrypted with the password "password"
|
||||
@@ -53,8 +55,9 @@ rem encrypted.html: a version of the main file encrypted with the password "pass
|
||||
node .\tiddlywiki.js ^
|
||||
.\editions\tw5.com ^
|
||||
--verbose ^
|
||||
--output %TW5_BUILD_OUTPUT% ^
|
||||
--password password ^
|
||||
--rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\encrypted.html text/plain ^
|
||||
--rendertiddler $:/core/save/all encrypted.html text/plain ^
|
||||
|| exit 1
|
||||
|
||||
rem tahoelafs.html: empty wiki with plugin for Tahoe-LAFS
|
||||
@@ -62,7 +65,8 @@ rem tahoelafs.html: empty wiki with plugin for Tahoe-LAFS
|
||||
node .\tiddlywiki.js ^
|
||||
.\editions\tahoelafs ^
|
||||
--verbose ^
|
||||
--rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\tahoelafs.html text/plain ^
|
||||
--output %TW5_BUILD_OUTPUT% ^
|
||||
--rendertiddler $:/core/save/all tahoelafs.html text/plain ^
|
||||
|| exit 1
|
||||
|
||||
rem d3demo.html: wiki to demo d3 plugin
|
||||
@@ -70,7 +74,8 @@ rem d3demo.html: wiki to demo d3 plugin
|
||||
node .\tiddlywiki.js ^
|
||||
.\editions\d3demo ^
|
||||
--verbose ^
|
||||
--rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\d3demo.html text/plain ^
|
||||
--output %TW5_BUILD_OUTPUT% ^
|
||||
--rendertiddler $:/core/save/all d3demo.html text/plain ^
|
||||
|| exit 1
|
||||
|
||||
rem codemirrordemo.html: wiki to demo codemirror plugin
|
||||
@@ -78,7 +83,8 @@ rem codemirrordemo.html: wiki to demo codemirror plugin
|
||||
node .\tiddlywiki.js ^
|
||||
.\editions\codemirrordemo ^
|
||||
--verbose ^
|
||||
--rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\codemirrordemo.html text/plain ^
|
||||
--output %TW5_BUILD_OUTPUT% ^
|
||||
--rendertiddler $:/core/save/all codemirrordemo.html text/plain ^
|
||||
|| exit 1
|
||||
|
||||
rem markdowndemo.html: wiki to demo markdown plugin
|
||||
@@ -86,7 +92,8 @@ rem markdowndemo.html: wiki to demo markdown plugin
|
||||
node .\tiddlywiki.js ^
|
||||
.\editions\markdowndemo ^
|
||||
--verbose ^
|
||||
--rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\markdowndemo.html text/plain ^
|
||||
--output %TW5_BUILD_OUTPUT% ^
|
||||
--rendertiddler $:/core/save/all markdowndemo.html text/plain ^
|
||||
|| exit 1
|
||||
|
||||
|
||||
@@ -95,7 +102,8 @@ rem highlightdemo.html: wiki to demo highlight plugin
|
||||
node .\tiddlywiki.js ^
|
||||
.\editions\highlightdemo ^
|
||||
--verbose ^
|
||||
--rendertiddler $:/core/save/all %TW5_BUILD_OUTPUT%\highlightdemo.html text/plain ^
|
||||
--output %TW5_BUILD_OUTPUT% ^
|
||||
--rendertiddler $:/core/save/all highlightdemo.html text/plain ^
|
||||
|| exit 1
|
||||
|
||||
rem Make the CNAME file that GitHub Pages requires
|
||||
|
||||
38
bld.sh
38
bld.sh
@@ -35,18 +35,20 @@ rm $TW5_BUILD_OUTPUT/static/*
|
||||
node ./tiddlywiki.js \
|
||||
./editions/tw5.com \
|
||||
--verbose \
|
||||
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/index.html text/plain \
|
||||
--savetiddler $:/favicon.ico $TW5_BUILD_OUTPUT/favicon.ico \
|
||||
--output . \
|
||||
--rendertiddler ReadMe ./readme.md text/html \
|
||||
--rendertiddler ContributingTemplate ./contributing.md text/html \
|
||||
--rendertiddler $:/core/copyright.txt ./licenses/copyright.md text/plain \
|
||||
--rendertiddler $:/editions/tw5.com/download-empty $TW5_BUILD_OUTPUT/empty.html text/plain \
|
||||
--rendertiddler $:/editions/tw5.com/download-empty $TW5_BUILD_OUTPUT/empty.hta text/plain \
|
||||
--savetiddler $:/green_favicon.ico $TW5_BUILD_OUTPUT/static/favicon.ico \
|
||||
--rendertiddler $:/core/templates/static.template.html $TW5_BUILD_OUTPUT/static.html text/plain \
|
||||
--rendertiddler $:/core/templates/alltiddlers.template.html $TW5_BUILD_OUTPUT/alltiddlers.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 \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--rendertiddler $:/core/save/all index.html text/plain \
|
||||
--savetiddler $:/favicon.ico favicon.ico \
|
||||
--rendertiddler $:/editions/tw5.com/download-empty empty.html text/plain \
|
||||
--rendertiddler $:/editions/tw5.com/download-empty empty.hta text/plain \
|
||||
--savetiddler $:/green_favicon.ico static/favicon.ico \
|
||||
--rendertiddler $:/core/templates/static.template.html static.html text/plain \
|
||||
--rendertiddler $:/core/templates/alltiddlers.template.html alltiddlers.html text/plain \
|
||||
--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html static text/plain \
|
||||
--rendertiddler $:/core/templates/static.template.css static/static.css text/plain \
|
||||
|| exit 1
|
||||
|
||||
# encrypted.html: a version of the main file encrypted with the password "password"
|
||||
@@ -54,8 +56,9 @@ node ./tiddlywiki.js \
|
||||
node ./tiddlywiki.js \
|
||||
./editions/tw5.com \
|
||||
--verbose \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--password password \
|
||||
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/encrypted.html text/plain \
|
||||
--rendertiddler $:/core/save/all encrypted.html text/plain \
|
||||
|| exit 1
|
||||
|
||||
# tahoelafs.html: empty wiki with plugin for Tahoe-LAFS
|
||||
@@ -63,7 +66,8 @@ node ./tiddlywiki.js \
|
||||
node ./tiddlywiki.js \
|
||||
./editions/tahoelafs \
|
||||
--verbose \
|
||||
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/tahoelafs.html text/plain \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--rendertiddler $:/core/save/all tahoelafs.html text/plain \
|
||||
|| exit 1
|
||||
|
||||
# d3demo.html: wiki to demo d3 plugin
|
||||
@@ -71,7 +75,8 @@ node ./tiddlywiki.js \
|
||||
node ./tiddlywiki.js \
|
||||
./editions/d3demo \
|
||||
--verbose \
|
||||
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/d3demo.html text/plain \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--rendertiddler $:/core/save/all d3demo.html text/plain \
|
||||
|| exit 1
|
||||
|
||||
# codemirrordemo.html: wiki to demo codemirror plugin
|
||||
@@ -79,7 +84,8 @@ node ./tiddlywiki.js \
|
||||
node ./tiddlywiki.js \
|
||||
./editions/codemirrordemo \
|
||||
--verbose \
|
||||
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/codemirrordemo.html text/plain \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--rendertiddler $:/core/save/all codemirrordemo.html text/plain \
|
||||
|| exit 1
|
||||
|
||||
# markdowndemo.html: wiki to demo markdown plugin
|
||||
@@ -87,7 +93,8 @@ node ./tiddlywiki.js \
|
||||
node ./tiddlywiki.js \
|
||||
./editions/markdowndemo \
|
||||
--verbose \
|
||||
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/markdowndemo.html text/plain \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--rendertiddler $:/core/save/all markdowndemo.html text/plain \
|
||||
|| exit 1
|
||||
|
||||
# highlightdemo.html: wiki to demo highlight plugin
|
||||
@@ -95,7 +102,8 @@ node ./tiddlywiki.js \
|
||||
node ./tiddlywiki.js \
|
||||
./editions/highlightdemo \
|
||||
--verbose \
|
||||
--rendertiddler $:/core/save/all $TW5_BUILD_OUTPUT/highlightdemo.html text/plain \
|
||||
--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
|
||||
|
||||
@@ -19,8 +19,6 @@ Error message and password prompt
|
||||
left: 50%;
|
||||
margin-left: -144px; /* - width/2 - paddingHorz/2 - border */
|
||||
padding: 16px 16px 16px 16px;
|
||||
-webkit-border-radius: 8px;
|
||||
-moz-border-radius: 8px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
|
||||
676
boot/boot.js
676
boot/boot.js
File diff suppressed because it is too large
Load Diff
@@ -16,13 +16,20 @@ var _bootprefix = (function($tw) {
|
||||
|
||||
"use strict";
|
||||
|
||||
$tw = $tw || {};
|
||||
$tw = $tw || Object.create(null);
|
||||
$tw.boot = $tw.boot || Object.create(null);
|
||||
|
||||
// Detect platforms
|
||||
$tw.browser = typeof(window) !== "undefined" ? {} : null;
|
||||
$tw.node = typeof(process) === "object" ? {} : null;
|
||||
$tw.nodeWebKit = $tw.node && global.window && global.window.nwDispatcher ? {} : null;
|
||||
|
||||
// Set default boot tasks
|
||||
$tw.boot.tasks = {
|
||||
trapErrors: !!($tw.browser && !$tw.node),
|
||||
readBrowserTiddlers: !!($tw.browser && !$tw.node)
|
||||
};
|
||||
|
||||
/*
|
||||
Information about each module is kept in an object with these members:
|
||||
moduleType: type of module
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,3 +1,4 @@
|
||||
title: $:/core/images/cancel-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-cancel-button tw-image-button" viewBox="366 150 58 58" width="22pt" height="22pt"><path d="M 414.76236 158.98764 C 403.77887 148.0041 385.97113 148.0041 374.98764 158.98764 C 364.0041 169.97113 364.0041 187.77887 374.98764 198.76236 C 385.97113 209.7459 403.77887 209.7459 414.76236 198.76236 C 425.7459 187.77887 425.7459 169.97113 414.76236 158.98764 M 385.3967 165.32954 L 385.3967 165.32954 L 394.77674 174.7096 L 404.3533 165.13303 C 405.53068 163.95566 407.4396 163.95566 408.61697 165.13303 C 409.79434 166.31041 409.79434 168.21932 408.61697 169.39669 L 399.0404 178.97325 L 408.42046 188.35331 C 409.59783 189.53068 409.59783 191.43959 408.42046 192.61697 L 408.42046 192.61697 C 407.24308 193.79434 405.33417 193.79434 404.1568 192.61697 L 394.77675 183.23692 L 385.5932 192.42046 C 384.41583 193.59783 382.50692 193.59783 381.32954 192.42046 L 381.32954 192.42046 C 380.15217 191.24308 380.15217 189.33417 381.32954 188.1568 C 381.32954 188.1568 381.32954 188.1568 381.32954 188.1568 L 381.32954 188.1568 L 381.32954 188.1568 L 390.51309 178.97326 L 381.13303 169.5932 C 379.95566 168.41583 379.95566 166.50692 381.13303 165.32954 L 381.13303 165.32954 C 382.3104 164.15217 384.21932 164.15217 385.3967 165.32954 C 385.3967 165.32954 385.3967 165.32954 385.3967 165.32954 Z"/></svg>
|
||||
9
core/images/chevron-left.tid
Normal file
9
core/images/chevron-left.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
title: $:/core/images/chevron-left
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-chevron-left tw-image-button" width="22pt" height="22pt" viewBox="0 0 128 128" version="1.1">
|
||||
<g>
|
||||
<path d="M97.7982405,98.1688105 L152.184015,43.4979042 C155.938662,39.7236635 155.938662,33.6043964 152.184015,29.8301557 C148.429583,26.0559364 142.342116,26.0559364 138.587684,29.8301557 L91.0000107,77.667222 L43.4123803,29.8301557 C39.6578195,26.0559364 33.5704813,26.0559364 29.8159206,29.8301557 C26.0613598,33.6043964 26.0613598,39.7236635 29.8159206,43.4979042 L84.2017595,98.1688105 C87.9563202,101.943051 94.0436798,101.943051 97.7982405,98.1688126 L97.7982405,98.1688105 Z" transform="translate(91.000000, 63.999491) rotate(-270.000000) translate(-91.000000, -63.999491) "></path>
|
||||
<path d="M43.7982405,98.1688105 L98.1840153,43.4979042 C101.938662,39.7236635 101.938662,33.6043964 98.1840153,29.8301557 C94.4295828,26.0559364 88.3421164,26.0559364 84.5876838,29.8301557 L37.0000107,77.667222 L-10.5876197,29.8301557 C-14.3421805,26.0559364 -20.4295187,26.0559364 -24.1840794,29.8301557 C-27.9386402,33.6043964 -27.9386402,39.7236635 -24.1840794,43.4979042 L30.2017595,98.1688105 C33.9563202,101.943051 40.0436798,101.943051 43.7982405,98.1688126 L43.7982405,98.1688105 Z" transform="translate(37.000000, 63.999491) rotate(-270.000000) translate(-37.000000, -63.999491) "></path>
|
||||
</g>
|
||||
</svg>
|
||||
9
core/images/chevron-right.tid
Normal file
9
core/images/chevron-right.tid
Normal file
@@ -0,0 +1,9 @@
|
||||
title: $:/core/images/chevron-right
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-chevron-right tw-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g>
|
||||
<path d="M97.7982405,98.1688105 L152.184015,43.4979042 C155.938662,39.7236635 155.938662,33.6043964 152.184015,29.8301557 C148.429583,26.0559364 142.342116,26.0559364 138.587684,29.8301557 L91.0000107,77.667222 L43.4123803,29.8301557 C39.6578195,26.0559364 33.5704813,26.0559364 29.8159206,29.8301557 C26.0613598,33.6043964 26.0613598,39.7236635 29.8159206,43.4979042 L84.2017595,98.1688105 C87.9563202,101.943051 94.0436798,101.943051 97.7982405,98.1688126 L97.7982405,98.1688105 Z" transform="translate(91.000000, 63.999491) rotate(-90.000000) translate(-91.000000, -63.999491) "></path>
|
||||
<path d="M43.7982405,98.1688105 L98.1840153,43.4979042 C101.938662,39.7236635 101.938662,33.6043964 98.1840153,29.8301557 C94.4295828,26.0559364 88.3421164,26.0559364 84.5876838,29.8301557 L37.0000107,77.667222 L-10.5876197,29.8301557 C-14.3421805,26.0559364 -20.4295187,26.0559364 -24.1840794,29.8301557 C-27.9386402,33.6043964 -27.9386402,39.7236635 -24.1840794,43.4979042 L30.2017595,98.1688105 C33.9563202,101.943051 40.0436798,101.943051 43.7982405,98.1688126 L43.7982405,98.1688105 Z" transform="translate(37.000000, 63.999491) rotate(-90.000000) translate(-37.000000, -63.999491) "></path>
|
||||
</g>
|
||||
</svg>
|
||||
@@ -1,3 +1,4 @@
|
||||
title: $:/core/images/close-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-close-button tw-image-button" viewBox="222 150 56 56" width="22pt" height="22pt"><path d="M 249.56668 185.88827 L 267.06757 203.38916 C 269.26427 205.58586 272.82582 205.58586 275.02252 203.38916 L 275.02252 203.38916 C 277.21922 201.19246 277.21922 197.63091 275.02252 195.43421 L 257.52163 177.93332 L 275.38916 160.06579 C 277.58586 157.86909 277.58586 154.30754 275.38916 152.11084 C 273.19246 149.91414 269.63091 149.91414 267.43421 152.11084 L 249.56668 169.97837 L 232.06579 152.47748 L 232.06579 152.47748 C 232.06579 152.47748 232.06579 152.47748 232.06579 152.47748 C 229.86909 150.28078 226.30754 150.28078 224.11084 152.47748 L 224.11084 152.47748 C 221.91414 154.674175 221.91414 158.23573 224.11084 160.43243 L 241.61173 177.93332 L 224.47748 195.06757 L 224.47748 195.06757 L 224.47748 195.06757 C 224.47748 195.06757 224.47748 195.06757 224.47748 195.06757 C 222.28078 197.26427 222.28078 200.82583 224.47748 203.02252 L 224.47748 203.02252 C 226.67418 205.21922 230.23573 205.21922 232.43243 203.02252 Z"/></svg>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
title: $:/core/images/delete-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-delete-button tw-image-button" viewBox="303 155 39 50" width="17pt" height="22pt"><path d="M 333 164.25 L 333 157.25 C 333 156.14543 332.10457 155.25 331 155.25 L 314.75 155.25 C 314.75 155.25 314.75 155.25 314.75 155.25 C 313.64543 155.25 312.75 156.14543 312.75 157.25 L 312.75 164.25 L 303.75 164.25 L 303.75 168.75 L 306 168.75 L 306 201.75 L 306 201.75 L 306 201.75 C 306 203.40685 307.34315 204.75 309 204.75 L 336.75 204.75 C 338.40685 204.75 339.75 203.40685 339.75 201.75 L 339.75 168.75 L 342 168.75 L 342 164.25 Z M 317.25 160.75 L 317.25 160.75 C 317.25 160.19772 317.69772 159.75 318.25 159.75 C 318.25 159.75 318.25 159.75 318.25 159.75 L 327.5 159.75 C 328.05228 159.75 328.5 160.19772 328.5 160.75 L 328.5 164.25 L 317.25 164.25 L 317.25 160.75 Z M 310.5 168.75 L 312.75 168.75 L 312.75 200.25 L 310.5 200.25 Z M 317.25 168.75 L 319.5 168.75 L 319.5 200.25 L 317.25 200.25 Z M 324 168.75 L 326.25 168.75 L 326.25 200.25 L 324 200.25 Z M 330.75 168.75 L 333 168.75 L 333 200.25 L 330.75 200.25 Z"/></svg>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
title: $:/core/images/done-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-done-button tw-image-button" viewBox="434 150 68 55" width="22pt" height="18pt"><path d="M 438.49266 178.00797 L 439.00744 177.49319 C 441.35054 175.15008 445.14946 175.15004 447.49262 177.49309 L 452.50734 182.50757 C 454.8505 184.85063 458.6494 184.85058 460.99252 182.50748 L 488.50747 154.99255 C 490.85058 152.64944 494.6495 152.6494 496.99266 154.99246 L 497.50722 155.506995 C 499.8504 157.85009 499.8505 161.64908 497.5074 163.99228 C 497.50738 163.99229 497.50736 163.99231 497.50734 163.99233 L 460.9926 200.5077 C 458.64947 202.85087 454.85048 202.8509 452.50732 200.50778 C 452.5073 200.50777 452.5073 200.50777 452.5073 200.50776 L 438.49268 186.49327 C 436.14952 184.15013 436.1495 180.35114 438.49264 178.00799 C 438.49265 178.00798 438.49265 178.00797 438.49266 178.00797 Z"/></svg>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
title: $:/core/images/down-arrow
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-down-arrow tw-image-button" viewBox="441 306 59 45" width="24pt" height="22pt"><path d="M 441 306 L 470.25 351 L 499.5 306 Z"/></svg>
|
||||
<svg class="tw-image-down-arrow tw-image-button" viewBox="63 152 64 64" width="22pt" height="22pt"><path d="M 98.001786 212.81802 L 123.45763 187.36218 C 125.21499 185.60482 125.21499 182.75557 123.45763 180.99821 C 121.70027 179.24086 118.85103 179.24086 117.09367 180.99821 L 94.819805 203.27208 L 72.54594 180.99821 C 70.788582 179.24086 67.93934 179.24086 66.18198 180.99821 C 64.42462 182.75557 64.42462 185.60482 66.18198 187.36218 L 91.637825 212.81802 C 93.395184 214.57538 96.244426 214.57538 98.001786 212.81802 Z"/></svg>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
title: $:/core/images/edit-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-edit-button tw-image-button" viewBox="244 193 20 22" width="20pt" height="22pt"><path d="M 257.33334 196.80951 L 245.90476 207.2857 L 244 212.0476 L 248.7619 210.14284 L 260.19048 199.66665 Z M 259.2381 194.90475 L 258.28566 195.85716 L 261.14284 198.71428 L 262.09522 197.76187 Z M 261.14286 193 L 260.19042 193.95241 L 263.04762 196.80953 L 264 195.85714 Z M 244 213.72882 C 244 213.72882 247.4281 215.43353 250.8572 213.7288 C 254.28599 212.02405 261.14284 214.86531 261.14284 214.86531 L 261.14284 213.72884 C 261.14284 213.72884 254.28577 210.88755 250.8572 212.5923 C 247.42858 214.29712 244 212.59228 244 212.59228 Z"/></svg>
|
||||
|
||||
4
core/images/home-button.tid
Normal file
4
core/images/home-button.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/images/home-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-home-button tw-image-button" viewBox="81 513 64 54" width="22pt" height="22pt"><g><path d="M 97.04536 522.62083 L 81.364685 531.49067 L 87.85863 531.49067 L 87.85863 566.9699 L 107.49902 566.9699 L 107.49902 552.99265 L 117.95268 552.99265 L 117.95268 566.9699 L 137.59307 566.9699 L 137.59307 531.49067 L 144.086885 531.49067 L 112.72591 513.751 L 107.49902 516.70758 L 107.49902 513.751 L 97.04536 513.751 Z M 94.669443 534.17844 L 103.222493 534.17844 L 103.222493 545.19854 L 94.669443 545.19854 Z M 108.449266 534.17844 L 117.002435 534.17844 L 117.002435 545.19854 L 108.449266 545.19854 Z M 122.387575 534.17844 L 130.9405 534.17844 L 130.9405 545.19854 L 122.387575 545.19854 Z"/></g></svg>
|
||||
@@ -1,3 +1,4 @@
|
||||
title: $:/core/images/info-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-info-button tw-image-button" viewBox="294 150 58 58" width="22pt" height="22pt"><path d="M 342.76236 158.98764 C 331.77887 148.0041 313.97113 148.0041 302.98764 158.98764 C 292.0041 169.97113 292.0041 187.77887 302.98764 198.76236 C 313.97113 209.7459 331.77887 209.7459 342.76236 198.76236 C 353.7459 187.77887 353.7459 169.97113 342.76236 158.98764 M 326.5425 157.5 L 326.5425 157.5 C 327.72545 157.5 328.72201 157.91022 329.5337 158.73088 C 330.34465 159.55157 330.75 160.54402 330.75 161.7075 C 330.75 162.87172 330.33979 163.86316 329.51911 164.68385 C 328.69842 165.5045 327.70674 165.91501 326.5425 165.91501 C 325.39801 165.91501 324.4153 165.5045 323.5946 164.68385 C 322.77393 163.86316 322.36372 162.87172 322.36372 161.7075 C 322.36372 160.54402 322.76906 159.55157 323.58 158.73088 C 324.39171 157.91022 325.3793 157.5 326.5425 157.5 Z M 327.80211 190.47259 C 324.91945 195.49132 321.85778 198 318.61462 198 C 317.37452 198 316.38691 197.65158 315.65186 196.9555 C 314.9176 196.25866 314.54943 195.37617 314.54943 194.30782 C 314.54943 193.60202 314.71223 192.70572 315.03629 191.61813 L 319.0151 177.93651 C 319.39685 176.61922 319.58735 175.62754 319.58735 174.95991 C 319.58735 174.53996 319.40582 174.16692 319.04356 173.84286 C 318.68052 173.51905 318.18469 173.35701 317.55527 173.35701 C 317.26861 173.35701 316.92506 173.36677 316.5246 173.38548 L 316.89661 172.2407 L 326.59967 170.66627 L 328.31744 170.66627 L 322.44986 191.01638 C 322.12503 192.18064 321.963 192.94337 321.963 193.30666 C 321.963 193.51588 322.04862 193.71121 322.2204 193.89273 C 322.39218 194.07425 322.5737 194.16554 322.7642 194.16477 C 323.08903 194.16554 323.4131 194.02221 323.73792 193.73559 C 324.59605 193.02976 325.6267 191.75142 326.82838 189.90008 Z"/></svg>
|
||||
|
||||
4
core/images/menu-button.tid
Normal file
4
core/images/menu-button.tid
Normal file
@@ -0,0 +1,4 @@
|
||||
title: $:/core/images/menu-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-menu-button tw-image-button" viewBox="216 585 63 45" width="22pt" height="22pt"><g><path d="M 274.5 585 L 229.5 585 C 227.01472 585 225 587.01472 225 589.5 L 225 589.5 C 225 591.98528 227.01472 594 229.5 594 L 274.5 594 C 276.98528 594 279 591.98528 279 589.5 L 279 589.5 C 279 587.01472 276.98528 585 274.5 585 Z"/><path d="M 274.5 603 L 229.5 603 C 227.01472 603 225 605.01472 225 607.5 L 225 607.5 C 225 609.98528 227.01472 612 229.5 612 L 274.5 612 C 276.98528 612 279 609.98528 279 607.5 L 279 607.5 C 279 605.01472 276.98528 603 274.5 603 Z"/><path d="M 274.5 621 L 229.5 621 C 227.01472 621 225 623.01472 225 625.5 L 225 625.5 C 225 627.9853 227.01472 630 229.5 630 L 274.5 630 C 276.98528 630 279 627.9853 279 625.5 L 279 625.5 C 279 623.01472 276.98528 621 274.5 621 Z"/></g></svg>
|
||||
@@ -1,3 +1,4 @@
|
||||
title: $:/core/images/new-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-new-button tw-image-button" viewBox="83 81 50 50" width="22pt" height="22pt"><path d="M 101.25 112.5 L 101.25 127.5 C 101.25 127.5 101.25 127.5 101.25 127.5 L 101.25 127.5 C 101.25 129.156855 102.593146 130.5 104.25 130.5 L 111.75 130.5 C 113.406854 130.5 114.75 129.156854 114.75 127.5 L 114.75 112.5 L 129.75 112.5 C 131.406854 112.5 132.75 111.156854 132.75 109.5 L 132.75 102 C 132.75 100.343146 131.406854 99 129.75 99 L 114.75 99 L 114.75 84 C 114.75 82.343146 113.406854 81 111.75 81 L 104.25 81 C 104.25 81 104.25 81 104.25 81 C 102.593146 81 101.25 82.343146 101.25 84 L 101.25 99 L 86.25 99 C 86.25 99 86.25 99 86.25 99 C 84.593146 99 83.25 100.343146 83.25 102 L 83.25 109.5 C 83.25 109.5 83.25 109.5 83.25 109.5 L 83.25 109.5 C 83.25 111.156855 84.593146 112.5 86.25 112.5 Z"/></svg>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
title: $:/core/images/options-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-options-button tw-image-button" viewBox="434 218 68 68" width="22pt" height="22pt"><path d="M 478.39696 232.53705 L 478.39696 232.53705 C 477.11453 231.85132 475.77877 231.30146 474.4106 230.88735 L 474.4106 218.24993 L 461.58944 218.24993 L 461.58944 230.88735 C 460.22126 231.30146 458.8855 231.85132 457.60308 232.53705 L 448.66825 223.60214 L 439.6022 232.66814 L 448.53716 241.60304 C 447.8515 242.88541 447.30158 244.22116 446.88747 245.58935 L 434.25 245.58935 L 434.25 258.41052 L 446.88747 258.41052 C 447.30158 259.7787 447.8515 261.11446 448.53716 262.39689 L 439.6022 271.33173 L 448.66825 280.39779 L 457.60308 271.46281 C 458.8855 272.14862 460.22126 272.69847 461.58944 273.11251 L 461.58944 285.74986 L 474.4106 285.74986 L 474.4106 273.11251 C 475.77877 272.69847 477.11453 272.14862 478.39696 271.46281 L 487.3318 280.39779 L 496.3977 271.33173 L 487.46287 262.39689 C 488.14854 261.11446 488.6984 259.7787 489.11257 258.41052 L 501.7499 258.41052 L 501.7499 245.58935 L 489.11257 245.58935 C 488.6984 244.22116 488.14854 242.88541 487.46287 241.60304 L 496.3977 232.66814 L 487.3318 223.60214 Z M 475.3328 244.66714 C 479.38253 248.71698 479.38253 255.2829 475.3328 259.33273 C 471.28297 263.3826 464.71706 263.3826 460.66723 259.33273 C 456.61737 255.2829 456.61737 248.71698 460.66723 244.66714 C 464.71706 240.61734 471.28297 240.61734 475.3328 244.66714"/></svg>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
title: $:/core/images/save-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tw-image-save-button tw-image-button" viewBox="4 512 64 60" width="22pt" height="21pt"><path d="M 13.5 537.75 L 11.5 537.75 C 11.5 537.75 11.5 537.75 11.5 537.75 C 7.6340064 537.75 4.4999994 540.884 4.5 544.75 L 4.5 564.5 L 4.5 564.5 C 4.5 564.5 4.5 564.5 4.5 564.5 L 4.5 564.5 C 4.5000006 568.366 7.634007 571.5 11.5 571.5 L 60.5 571.5 C 64.365993 571.5 67.5 568.366 67.5 564.5 L 67.5 544.75 C 67.5 540.884 64.365993 537.75 60.5 537.75 L 58.5 537.75 L 49.5 546.75 L 50 546.75 C 52.20914 546.75 54 548.54086 54 550.75 L 54 556.25 C 54 558.45914 52.20914 560.25 50 560.25 L 36 560.25 L 22 560.25 C 19.790861 560.25 18 558.45914 18 556.25 L 18 556.25 C 18 556.25 18 556.25 18 556.25 L 18 550.75 C 18 548.54086 19.790861 546.75 22 546.75 C 22 546.75 22 546.75 22 546.75 L 22.5 546.75 Z"/><path d="M 16.37132 533.87132 L 33.87868 551.37868 C 35.050253 552.55025 36.949747 552.55025 38.12132 551.37868 L 55.62868 533.87132 C 56.800252 532.69975 56.800252 530.80025 55.62868 529.62868 C 55.06607 529.06607 54.30301 528.75 53.50736 528.75 L 48 528.75 C 46.343146 528.75 45 527.40685 45 525.75 L 45 516 C 45 514.34315 43.656854 513 42 513 L 30 513 C 28.343146 513 27 514.34315 27 516 L 27 525.75 C 27 527.40685 25.656854 528.75 24 528.75 L 18.492641 528.75 C 16.835786 528.75 15.492641 530.09315 15.492641 531.75 C 15.492641 532.54565 15.808711 533.3087 16.37132 533.87132 Z"/></svg>
|
||||
|
||||
@@ -4,6 +4,17 @@ Advanced/Caption: Advanced
|
||||
Advanced/Hint: Internal information about this TiddlyWiki
|
||||
Advanced/LoadedModules/Caption: Loaded Modules
|
||||
Advanced/LoadedModules/Hint: These are the currently loaded tiddler modules linked to their source tiddlers. Any italicised modules lack a source tiddler, typically because they were setup during the boot process.
|
||||
Advanced/Settings/Caption: Settings
|
||||
Advanced/Settings/Hint: These advanced settings let you customise the behaviour of TiddlyWiki.
|
||||
Advanced/Settings/NavigationAddressBar/Caption: Navigation Address Bar
|
||||
Advanced/Settings/NavigationAddressBar/Hint: Behaviour of the browser address bar when navigating to a tiddler:
|
||||
Advanced/Settings/NavigationAddressBar/No/Description: Do not update the address bar
|
||||
Advanced/Settings/NavigationAddressBar/Permalink/Description: Include the target tiddler
|
||||
Advanced/Settings/NavigationAddressBar/Permaview/Description: Include the target tiddler and the current story sequence
|
||||
Advanced/Settings/NavigationHistory/Caption: Navigation History
|
||||
Advanced/Settings/NavigationHistory/Hint: Update browser history when navigating to a tiddler:
|
||||
Advanced/Settings/NavigationHistory/No/Description: Do not update history
|
||||
Advanced/Settings/NavigationHistory/Yes/Description: Update history
|
||||
Advanced/TiddlerFields/Caption: Tiddler Fields
|
||||
Advanced/TiddlerFields/Hint: This is the full set of TiddlerFields in use in this wiki (including system tiddlers but excluding shadow tiddlers).
|
||||
Appearance/Caption: Appearance
|
||||
@@ -14,9 +25,9 @@ Appearance/Palette/Editor/Clone/Prompt: It is recommended that you clone this sh
|
||||
Appearance/Palette/Editor/Prompt/Modified: This shadow palette has been modified
|
||||
Appearance/Palette/Editor/Prompt: Editing
|
||||
Appearance/Palette/Editor/Reset/Caption: reset
|
||||
Appearance/Palette/ShowEditor/Caption: show editor
|
||||
Appearance/Palette/HideEditor/Caption: hide editor
|
||||
Appearance/Palette/Prompt: Current palette:
|
||||
Appearance/Palette/ShowEditor/Caption: show editor
|
||||
Appearance/StoryView/Caption: Story View
|
||||
Appearance/StoryView/Prompt: Current view:
|
||||
Appearance/Theme/Caption: Theme
|
||||
@@ -40,6 +51,9 @@ Plugins/Caption: Plugins
|
||||
Plugins/Fields/Description: Description
|
||||
Plugins/Fields/Title: Title
|
||||
Plugins/Fields/Version: Version
|
||||
Plugins/Language/Prompt: Languages
|
||||
Plugins/Plugin/Prompt: Plugins
|
||||
Plugins/Theme/Prompt: Themes
|
||||
Saving/AutoSave/Disabled/Button: enable
|
||||
Saving/AutoSave/Disabled/Prompt: Autosave is currently disabled
|
||||
Saving/AutoSave/Enabled/Button: disable
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
title: $:/language/Docs/ModuleTypes/
|
||||
|
||||
animation: Animations that may be used with the RevealWidget.
|
||||
browser-startup: Startup functions that are only executed in the browser.
|
||||
command: Commands that can be executed under Node.js.
|
||||
config: Data to be inserted into `$tw.config`.
|
||||
filteroperator: Individual filter operator methods.
|
||||
|
||||
100
core/language/en-GB/Docs/PaletteColours.multids
Normal file
100
core/language/en-GB/Docs/PaletteColours.multids
Normal file
@@ -0,0 +1,100 @@
|
||||
title: $:/language/Docs/PaletteColours/
|
||||
|
||||
alert-background: Alert background
|
||||
alert-border: Alert border
|
||||
alert-highlight: Alert highlight
|
||||
alert-muted-foreground: Alert muted foreground
|
||||
background: General background
|
||||
blockquote-bar: Blockquote bar
|
||||
code-background: Code background
|
||||
code-border: Code border
|
||||
code-foreground: Code foreground
|
||||
download-background: Download button background
|
||||
download-foreground: Download button foreground
|
||||
dragger-background: Dragger background
|
||||
dragger-foreground: Dragger foreground
|
||||
dropdown-background: Dropdown background
|
||||
dropdown-border: Dropdown border
|
||||
dropdown-tab-background-selected: Dropdown tab background for selected tabs
|
||||
dropdown-tab-background: Dropdown tab background
|
||||
dropzone-background: Dropzone background
|
||||
external-link-background-hover: External link background hover
|
||||
external-link-background-visited: External link background visited
|
||||
external-link-background: External link background
|
||||
external-link-foreground-hover: External link foreground hover
|
||||
external-link-foreground-visited: External link foreground visited
|
||||
external-link-foreground: External link foreground
|
||||
foreground: General foreground
|
||||
message-background: Message box background
|
||||
message-border: Message box border
|
||||
message-foreground: Message box foreground
|
||||
modal-backdrop: Modal backdrop
|
||||
modal-background: Modal background
|
||||
modal-border: Modal border
|
||||
modal-footer-background: Modal footer background
|
||||
modal-footer-border: Modal footer border
|
||||
modal-header-border: Modal header border
|
||||
muted-foreground: General muted foreground
|
||||
notification-background: Notification background
|
||||
notification-border: Notification border
|
||||
page-background: Page background
|
||||
pre-background: Preformatted code background
|
||||
pre-border: Preformatted code border
|
||||
primary: General primary
|
||||
sidebar-button-foreground: Sidebar button foreground
|
||||
sidebar-controls-foreground-hover: Sidebar controls foreground hover
|
||||
sidebar-controls-foreground: Sidebar controls foreground
|
||||
sidebar-foreground-shadow: Sidebar foreground shadow
|
||||
sidebar-foreground: Sidebar foreground
|
||||
sidebar-muted-foreground-hover: Sidebar muted foreground hover
|
||||
sidebar-muted-foreground: Sidebar muted foreground
|
||||
sidebar-tab-background-selected: Sidebar tab background for selected tabs
|
||||
sidebar-tab-background: Sidebar tab background
|
||||
sidebar-tab-border-selected: Sidebar tab border for selected tabs
|
||||
sidebar-tab-border: Sidebar tab border
|
||||
sidebar-tab-divider: Sidebar tab divider
|
||||
sidebar-tab-foreground-selected: Sidebar tab foreground for selected tabs
|
||||
sidebar-tab-foreground: Sidebar tab foreground
|
||||
sidebar-tiddler-link-foreground-hover: Sidebar tiddler link foreground hover
|
||||
sidebar-tiddler-link-foreground: Sidebar tiddler link foreground
|
||||
static-alert-foreground: Static alert foreground
|
||||
tab-background-selected: Tab background for selected tabs
|
||||
tab-background: Tab background
|
||||
tab-border-selected: Tab border for selected tabs
|
||||
tab-border: Tab border
|
||||
tab-divider: Tab divider
|
||||
tab-foreground-selected: Tab foreground for selected tabs
|
||||
tab-foreground: Tab foreground
|
||||
table-border: Table border
|
||||
table-footer-background: Table footer background
|
||||
table-header-background: Table header background
|
||||
tag-background: Tag background
|
||||
tag-foreground: Tag foreground
|
||||
tiddler-background: Tiddler background
|
||||
tiddler-border: Tiddler border
|
||||
tiddler-controls-foreground-hover: Tiddler controls foreground hover
|
||||
tiddler-controls-foreground-selected: Tiddler controls foreground for selected controls
|
||||
tiddler-controls-foreground: Tiddler controls foreground
|
||||
tiddler-editor-background: Tiddler editor background
|
||||
tiddler-editor-border-image: Tiddler editor border image
|
||||
tiddler-editor-border: Tiddler editor border
|
||||
tiddler-editor-fields-even: Tiddler editor background for even fields
|
||||
tiddler-editor-fields-odd: Tiddler editor background for odd fields
|
||||
tiddler-info-background: Tiddler info panel background
|
||||
tiddler-info-border: Tiddler info panel border
|
||||
tiddler-info-tab-background: Tiddler info panel tab background
|
||||
tiddler-link-background: Tiddler link background
|
||||
tiddler-link-foreground: Tiddler link foreground
|
||||
tiddler-subtitle-foreground: Tiddler subtitle foreground
|
||||
tiddler-title-foreground: Tiddler title foreground
|
||||
toolbar-new-button: Toolbar 'new tiddler' button foreground
|
||||
toolbar-options-button: Toolbar 'options' button foreground
|
||||
toolbar-save-button: Toolbar 'save' button foreground
|
||||
toolbar-info-button: Toolbar 'info' button foreground
|
||||
toolbar-edit-button: Toolbar 'edit' button foreground
|
||||
toolbar-close-button: Toolbar 'close' button foreground
|
||||
toolbar-delete-button: Toolbar 'delete' button foreground
|
||||
toolbar-cancel-button: Toolbar 'cancel' button foreground
|
||||
toolbar-done-button: Toolbar 'done' button foreground
|
||||
untagged-background: Untagged pill background
|
||||
very-muted-foreground: Very muted foreground
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/language/EditTemplate/
|
||||
|
||||
Body/Hint: Use WikiText to add formatting, images, and dynamic features
|
||||
Body/Hint: Use [[wiki text|http://tiddlywiki.com/static/WikiText.html]] to add formatting, images, and dynamic features
|
||||
Body/Placeholder: Type the text for this tiddler
|
||||
Body/Preview/Button/Hide: hide preview
|
||||
Body/Preview/Button/Show: show preview
|
||||
@@ -8,6 +8,8 @@ Fields/Add/Button: add
|
||||
Fields/Add/Name/Placeholder: field name
|
||||
Fields/Add/Prompt: Add a new field:
|
||||
Fields/Add/Value/Placeholder: field value
|
||||
Shadow/Warning: This is a shadow tiddler. Any changes will override the default version
|
||||
Shadow/OverriddenWarning: This is a modified shadow tiddler. You can revert to the default version by deleting this tiddler
|
||||
Tags/Add/Button: add
|
||||
Tags/Add/Placeholder: tag name
|
||||
Type/Placeholder: content type
|
||||
|
||||
@@ -16,6 +16,8 @@ hack-to-give-us-something-to-compare-against: A temporary storage field used in
|
||||
icon: The title of the tiddler containing the icon associated with a tiddler
|
||||
library: If set to "yes" indicates that a tiddler should be saved as a JavaScript library
|
||||
list: An ordered list of tiddler titles associated with a tiddler
|
||||
list-before: If set, the title of a tiddler before which this tiddler should be added to the ordered list of tiddler titles, or at the start of the list if this field is present but empty
|
||||
list-after: If set, the title of the tiddler after which this tiddler should be added to the ordered list of tiddler titles
|
||||
modified: The date and time at which a tiddler was last modified
|
||||
modifier: The tiddler title associated with the person who last modified a tiddler
|
||||
name: The human readable name associated with a plugin tiddler
|
||||
@@ -29,4 +31,4 @@ tags: A list of tags associated with a tiddler
|
||||
text: The body text of a tiddler
|
||||
title: The unique name of a tiddler
|
||||
type: The content type of a tiddler
|
||||
version: Version information for a plugin
|
||||
version: Version information for a plugin
|
||||
|
||||
12
core/language/en-GB/Filters.multids
Normal file
12
core/language/en-GB/Filters.multids
Normal file
@@ -0,0 +1,12 @@
|
||||
title: $:/language/Filters/
|
||||
|
||||
AllTiddlers: All tiddlers except system tiddlers
|
||||
RecentTiddlers: Recently modified tiddlers
|
||||
AllTags: All tags except system tags
|
||||
Missing: Missing tiddlers
|
||||
Drafts: Draft tiddlers
|
||||
Orphans: Orphan tiddlers
|
||||
SystemTiddlers: System tiddlers
|
||||
ShadowTiddlers: Shadow tiddlers
|
||||
OverriddenShadowTiddlers: Overridden shadow tiddlers
|
||||
SystemTags: System tags
|
||||
11
core/language/en-GB/Help/build.tid
Normal file
11
core/language/en-GB/Help/build.tid
Normal file
@@ -0,0 +1,11 @@
|
||||
title: $:/language/Help/build
|
||||
description: Automatically run configured commands
|
||||
|
||||
Build the specified build targets for the current wiki. If no build targets are specified then all available targets will be built.
|
||||
|
||||
```
|
||||
--build <target> [<target> ...]
|
||||
```
|
||||
|
||||
Build targets are defined in the `tiddlywiki.info` file of a wiki folder.
|
||||
|
||||
8
core/language/en-GB/Help/clearpassword.tid
Normal file
8
core/language/en-GB/Help/clearpassword.tid
Normal file
@@ -0,0 +1,8 @@
|
||||
title: $:/language/Help/clearpassword
|
||||
description: Clear a password for subsequent crypto operations
|
||||
|
||||
Clear the password for subsequent crypto operations
|
||||
|
||||
```
|
||||
--clearpassword
|
||||
```
|
||||
@@ -12,3 +12,5 @@ To load tiddlers from an encrypted TiddlyWiki file you should first specify the
|
||||
```
|
||||
tiddlywiki ./MyWiki --password pa55w0rd --load my_encrypted_wiki.html
|
||||
```
|
||||
|
||||
Note that TiddlyWiki will not load an older version of an already loaded plugin.
|
||||
|
||||
10
core/language/en-GB/Help/output.tid
Normal file
10
core/language/en-GB/Help/output.tid
Normal file
@@ -0,0 +1,10 @@
|
||||
title: $:/language/Help/output
|
||||
description: Set the base output directory for subsequent commands
|
||||
|
||||
Sets the base output directory for subsequent commands. The default output directory is the `output` subdirectory of the edition directory.
|
||||
|
||||
```
|
||||
--output <pathname>
|
||||
```
|
||||
|
||||
If the specified pathname is relative then it is resolved relative to the current working directory.
|
||||
@@ -6,3 +6,7 @@ Render an individual tiddler as a specified ContentType, defaults to `text/html`
|
||||
```
|
||||
--rendertiddler <title> <filename> [<type>]
|
||||
```
|
||||
|
||||
By default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.
|
||||
|
||||
Any missing directories in the path to the filename are automatically created.
|
||||
|
||||
@@ -12,3 +12,7 @@ For example:
|
||||
```
|
||||
--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html ./static text/plain
|
||||
```
|
||||
|
||||
By default, the pathname is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.
|
||||
|
||||
Any files in the target directory are deleted. The target directory is recursively created if it is missing.
|
||||
|
||||
@@ -6,3 +6,7 @@ Saves an individual tiddler in its raw text or binary format to the specified fi
|
||||
```
|
||||
--savetiddler <title> <filename>
|
||||
```
|
||||
|
||||
By default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.
|
||||
|
||||
Any missing directories in the path to the filename are automatically created.
|
||||
|
||||
@@ -1,4 +1,32 @@
|
||||
title: $:/language/
|
||||
|
||||
RecentChanges/DateFormat: DDth MMM YYYY
|
||||
BinaryWarning/Prompt: This tiddler contains binary data
|
||||
ClassicWarning/Hint: This tiddler is written in TiddlyWiki Classic wiki text format, which is not fully compatible with TiddlyWiki version 5. See http://tiddlywiki.com/static/Upgrading.html for more details.
|
||||
ClassicWarning/Upgrade/Caption: upgrade
|
||||
CloseAll/Button: close all
|
||||
ConfirmCancelTiddler: Do you wish to discard changes to the tiddler "<$text text=<<title>>/>"?
|
||||
ConfirmDeleteTiddler: Do you wish to delete the tiddler "<$text text=<<title>>/>"?
|
||||
ConfirmOverwriteTiddler: Do you wish to overwrite the tiddler "<$text text=<<title>>/>"?
|
||||
ConfirmEditShadowTiddler: You are about to edit a ShadowTiddler. Any changes will override the default system making future upgrades non-trivial. Are you sure you want to edit "<$text text=<<title>>/>"?
|
||||
InvalidFieldName: Illegal characters in field name "<$text text=<<fieldName>>/>". Fields can only contain lowercase letters, digits and the characters underscore (`_`), hyphen (`-`) and period (`.`)
|
||||
MissingTiddler/Hint: Missing tiddler "<$text text=<<currentTiddler>>/>" - click {{$:/core/images/edit-button}} to create
|
||||
RecentChanges/DateFormat: DDth MMM YYYY
|
||||
RelativeDate/Future/Days: <<period>> days from now
|
||||
RelativeDate/Future/Hours: <<period>> hours from now
|
||||
RelativeDate/Future/Minutes: <<period>> minutes from now
|
||||
RelativeDate/Future/Months: <<period>> months from now
|
||||
RelativeDate/Future/Second: 1 second from now
|
||||
RelativeDate/Future/Seconds: <<period>> seconds from now
|
||||
RelativeDate/Future/Years: <<period>> years from now
|
||||
RelativeDate/Past/Days: <<period>> days ago
|
||||
RelativeDate/Past/Hours: <<period>> hours ago
|
||||
RelativeDate/Past/Minutes: <<period>> minutes ago
|
||||
RelativeDate/Past/Months: <<period>> months ago
|
||||
RelativeDate/Past/Second: 1 second ago
|
||||
RelativeDate/Past/Seconds: <<period>> seconds ago
|
||||
RelativeDate/Past/Years: <<period>> years ago
|
||||
SystemTiddler/Tooltip: This is a system tiddler
|
||||
TagManager/Colour/Heading: Colour
|
||||
TagManager/Count/Heading: Count
|
||||
TagManager/Icon/Heading: Icon
|
||||
TagManager/Tag/Heading: Tag
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
title: $:/language/Search/
|
||||
|
||||
Advanced/Matches: //<small><$count filter={{$:/temp/advancedsearch}}/> matches</small>//
|
||||
Filter/Caption: Filter
|
||||
Filter/Hint: Search via a [[filter expression|http://tiddlywiki.com/static/TiddlerFilters.html]]
|
||||
Filter/Matches: //<small><$count filter={{$:/temp/advancedsearch}}/> matches</small>//
|
||||
Matches: //<small><$count filter="[!is[system]search{$:/temp/search}]"/> matches</small>//
|
||||
Shadows/Caption: Shadows
|
||||
Shadows/Hint: Search for shadow tiddlers
|
||||
Shadows/Matches: //<small><$count filter="[all[shadows]search{$:/temp/advancedsearch}]"/> matches</small>//
|
||||
Standard/Caption: Standard
|
||||
Standard/Hint: Search for standard tiddlers
|
||||
Standard/Matches: //<small><$count filter="[!is[system]search{$:/temp/advancedsearch}]"/> matches</small>//
|
||||
System/Caption: System
|
||||
System/Hint: Search for system tiddlers
|
||||
System/Matches: //<small><$count filter="[is[system]search{$:/temp/advancedsearch}]"/> matches</small>//
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
title: $:/language/TiddlerInfo/
|
||||
|
||||
Advanced/Caption: Advanced
|
||||
Advanced/PluginInfo/Empty/Hint: none
|
||||
Advanced/PluginInfo/Heading: Plugin Details
|
||||
Advanced/PluginInfo/Hint: This plugin contains the following shadow tiddlers:
|
||||
Advanced/ShadowInfo/Heading: Shadow Status
|
||||
Advanced/ShadowInfo/NotShadow/Hint: The tiddler <$link to=<<infoTiddler>>><$text text=<<infoTiddler>>/></$link> is not a shadow tiddler
|
||||
Advanced/ShadowInfo/Shadow/Hint: The tiddler <$link to=<<infoTiddler>>><$text text=<<infoTiddler>>/></$link> is a shadow tiddler
|
||||
Advanced/ShadowInfo/Shadow/Source: It is defined in the plugin <$link to=<<pluginTiddler>>><$text text=<<pluginTiddler>>/></$link>
|
||||
Advanced/ShadowInfo/OverriddenShadow/Hint: It is overridden by an ordinary tiddler
|
||||
Fields/Caption: Fields
|
||||
List/Caption: List
|
||||
List/Empty: This tiddler does not have a list
|
||||
|
||||
3
core/language/en-GB/Types/text_html.tid
Normal file
3
core/language/en-GB/Types/text_html.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/language/Docs/Types/text/html
|
||||
description: HTML markup
|
||||
name: text/html
|
||||
@@ -20,11 +20,20 @@ Parse a sequence of commands
|
||||
callback: a callback invoked as callback(err) where err is null if there was no error
|
||||
*/
|
||||
var Commander = function(commandTokens,callback,wiki,streams) {
|
||||
var path = require("path");
|
||||
this.commandTokens = commandTokens;
|
||||
this.nextToken = 0;
|
||||
this.callback = callback;
|
||||
this.wiki = wiki;
|
||||
this.streams = streams;
|
||||
this.outputPath = path.resolve($tw.boot.wikiPath,$tw.config.wikiOutputSubDir);
|
||||
};
|
||||
|
||||
/*
|
||||
Add a string of tokens to the command queue
|
||||
*/
|
||||
Commander.prototype.addCommandTokens = function(commandTokens) {
|
||||
Array.prototype.push.apply(this.commandTokens,commandTokens);
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
52
core/modules/commands/build.js
Normal file
52
core/modules/commands/build.js
Normal file
@@ -0,0 +1,52 @@
|
||||
/*\
|
||||
title: $:/core/modules/commands/build.js
|
||||
type: application/javascript
|
||||
module-type: command
|
||||
|
||||
Command to build a build target
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
exports.info = {
|
||||
name: "build",
|
||||
synchronous: true
|
||||
};
|
||||
|
||||
var Command = function(params,commander) {
|
||||
this.params = params;
|
||||
this.commander = commander;
|
||||
};
|
||||
|
||||
Command.prototype.execute = function() {
|
||||
// Get the build targets defined in the wiki
|
||||
var buildTargets = $tw.boot.wikiInfo.build;
|
||||
if(!buildTargets) {
|
||||
return "No build targets defined"
|
||||
}
|
||||
// Loop through each of the specified targets
|
||||
var targets;
|
||||
if(this.params.length > 0) {
|
||||
targets = this.params;
|
||||
} else {
|
||||
targets = Object.keys(buildTargets);
|
||||
}
|
||||
for(var targetIndex=0; targetIndex<targets.length; targetIndex++) {
|
||||
var target = targets[targetIndex],
|
||||
commands = buildTargets[target];
|
||||
if(!commands) {
|
||||
return "Build target '" + target + "' not found";
|
||||
}
|
||||
// Add the commands to the queue
|
||||
this.commander.addCommandTokens(commands);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
exports.Command = Command;
|
||||
|
||||
})();
|
||||
33
core/modules/commands/clearpassword.js
Normal file
33
core/modules/commands/clearpassword.js
Normal file
@@ -0,0 +1,33 @@
|
||||
/*\
|
||||
title: $:/core/modules/commands/clearpassword.js
|
||||
type: application/javascript
|
||||
module-type: command
|
||||
|
||||
Clear password for crypto operations
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
exports.info = {
|
||||
name: "clearpassword",
|
||||
synchronous: true
|
||||
};
|
||||
|
||||
var Command = function(params,commander,callback) {
|
||||
this.params = params;
|
||||
this.commander = commander;
|
||||
this.callback = callback;
|
||||
};
|
||||
|
||||
Command.prototype.execute = function() {
|
||||
$tw.crypto.setPassword(null);
|
||||
return null;
|
||||
};
|
||||
|
||||
exports.Command = Command;
|
||||
|
||||
})();
|
||||
@@ -34,7 +34,7 @@ Command.prototype.execute = function() {
|
||||
for(var editionIndex=0; editionIndex<editions.length; editionIndex++) {
|
||||
var editionName = editions[editionIndex];
|
||||
// Check the edition exists
|
||||
var editionPath = path.resolve($tw.boot.corePath,$tw.config.editionsPath) + "/" + editionName;
|
||||
var editionPath = path.resolve($tw.boot.corePath,$tw.config.editionsPath) + path.sep + editionName;
|
||||
if(!$tw.utils.isDirectory(editionPath)) {
|
||||
return "Edition '" + editionName + "' not found";
|
||||
}
|
||||
|
||||
@@ -30,8 +30,9 @@ Command.prototype.execute = function() {
|
||||
if(this.params.length < 1) {
|
||||
return "Missing filename";
|
||||
}
|
||||
fs.readFile(this.params[0],"utf8",function(err,data) {
|
||||
if(err) {
|
||||
var ext = path.extname(self.params[0]);
|
||||
fs.readFile(this.params[0],$tw.utils.getTypeEncoding(ext),function(err,data) {
|
||||
if (err) {
|
||||
self.callback(err);
|
||||
} else {
|
||||
var fields = {title: self.params[0]},
|
||||
@@ -41,7 +42,7 @@ Command.prototype.execute = function() {
|
||||
self.callback("No tiddlers found in file \"" + self.params[0] + "\"");
|
||||
} else {
|
||||
for(var t=0; t<tiddlers.length; t++) {
|
||||
self.commander.wiki.addTiddler(new $tw.Tiddler(tiddlers[t]));
|
||||
self.commander.wiki.importTiddler(new $tw.Tiddler(tiddlers[t]));
|
||||
}
|
||||
self.callback(null);
|
||||
}
|
||||
|
||||
38
core/modules/commands/output.js
Normal file
38
core/modules/commands/output.js
Normal file
@@ -0,0 +1,38 @@
|
||||
/*\
|
||||
title: $:/core/modules/commands/output.js
|
||||
type: application/javascript
|
||||
module-type: command
|
||||
|
||||
Command to set the default output location (defaults to current working directory)
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
exports.info = {
|
||||
name: "output",
|
||||
synchronous: true
|
||||
};
|
||||
|
||||
var Command = function(params,commander,callback) {
|
||||
this.params = params;
|
||||
this.commander = commander;
|
||||
this.callback = callback;
|
||||
};
|
||||
|
||||
Command.prototype.execute = function() {
|
||||
var fs = require("fs"),
|
||||
path = require("path");
|
||||
if(this.params.length < 1) {
|
||||
return "Missing output path";
|
||||
}
|
||||
this.commander.outputPath = path.resolve(process.cwd(),this.params[0]);
|
||||
return null;
|
||||
};
|
||||
|
||||
exports.Command = Command;
|
||||
|
||||
})();
|
||||
@@ -31,8 +31,9 @@ Command.prototype.execute = function() {
|
||||
fs = require("fs"),
|
||||
path = require("path"),
|
||||
title = this.params[0],
|
||||
filename = this.params[1],
|
||||
filename = path.resolve(this.commander.outputPath,this.params[1]),
|
||||
type = this.params[2] || "text/html";
|
||||
$tw.utils.createFileDirectories(filename);
|
||||
fs.writeFile(filename,this.commander.wiki.renderTiddler(type,title),"utf8",function(err) {
|
||||
self.callback(err);
|
||||
});
|
||||
|
||||
@@ -35,10 +35,12 @@ Command.prototype.execute = function() {
|
||||
wiki = this.commander.wiki,
|
||||
filter = this.params[0],
|
||||
template = this.params[1],
|
||||
pathname = this.params[2],
|
||||
pathname = path.resolve(this.commander.outputPath,this.params[2]),
|
||||
type = this.params[3] || "text/html",
|
||||
extension = this.params[4] || ".html",
|
||||
tiddlers = wiki.filterTiddlers(filter);
|
||||
$tw.utils.deleteDirectory(pathname);
|
||||
$tw.utils.createDirectory(pathname);
|
||||
$tw.utils.each(tiddlers,function(title) {
|
||||
var parser = wiki.parseTiddler(template),
|
||||
widgetNode = wiki.makeWidget(parser,{variables: {currentTiddler: title}});
|
||||
|
||||
@@ -31,10 +31,11 @@ Command.prototype.execute = function() {
|
||||
fs = require("fs"),
|
||||
path = require("path"),
|
||||
title = this.params[0],
|
||||
filename = this.params[1],
|
||||
filename = path.resolve(this.commander.outputPath,this.params[1]),
|
||||
tiddler = this.commander.wiki.getTiddler(title),
|
||||
type = tiddler.fields.type || "text/vnd.tiddlywiki",
|
||||
contentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: "utf8"};
|
||||
$tw.utils.createFileDirectories(filename);
|
||||
fs.writeFile(filename,tiddler.fields.text,contentTypeInfo.encoding,function(err) {
|
||||
self.callback(err);
|
||||
});
|
||||
|
||||
@@ -95,8 +95,9 @@ SimpleServer.prototype.listen = function(port,host) {
|
||||
if(username && password) {
|
||||
// Check they match
|
||||
if(self.checkCredentials(request,username,password) !== "ALLOWED") {
|
||||
var servername = state.wiki.getTiddlerText("$:/SiteTitle") || "TiddlyWiki5";
|
||||
response.writeHead(401,"Authentication required",{
|
||||
"WWW-Authenticate": 'Basic realm="Please provide your username and password to login to TiddlyWiki5"'
|
||||
"WWW-Authenticate": 'Basic realm="Please provide your username and password to login to ' + servername + '"'
|
||||
});
|
||||
response.end();
|
||||
return;
|
||||
|
||||
@@ -24,6 +24,8 @@ var Command = function(params,commander) {
|
||||
|
||||
Command.prototype.execute = function() {
|
||||
this.commander.verbose = true;
|
||||
// Output the boot message log
|
||||
this.commander.streams.output.write("Boot log:\n " + $tw.boot.logMessages.join("\n ") + "\n");
|
||||
return null; // No error
|
||||
};
|
||||
|
||||
|
||||
@@ -37,4 +37,6 @@ exports.htmlVoidElements = "area,base,br,col,command,embed,hr,img,input,keygen,l
|
||||
|
||||
exports.htmlBlockElements = "address,article,aside,audio,blockquote,canvas,dd,div,dl,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,li,noscript,ol,output,p,pre,section,table,tfoot,ul,video".split(",");
|
||||
|
||||
exports.htmlUnsafeElements = "script".split(",");
|
||||
|
||||
})();
|
||||
|
||||
@@ -51,13 +51,13 @@ var parseTiddlerDiv = function(text /* [,fields] */) {
|
||||
// Extract the text
|
||||
result.text = text.substring(match.index + match[0].length,endMatch.index);
|
||||
// Process the attributes
|
||||
var attrRegExp = /\s*([^=\s]+)\s*=\s*"([^"]*)"/gi,
|
||||
var attrRegExp = /\s*([^=\s]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/gi,
|
||||
attrMatch;
|
||||
do {
|
||||
attrMatch = attrRegExp.exec(match[1]);
|
||||
if(attrMatch) {
|
||||
var name = attrMatch[1];
|
||||
var value = attrMatch[2];
|
||||
var value = attrMatch[2] || attrMatch[3];
|
||||
result[name] = value;
|
||||
}
|
||||
} while(attrMatch);
|
||||
|
||||
@@ -3,7 +3,7 @@ title: $:/core/modules/filters.js
|
||||
type: application/javascript
|
||||
module-type: wikimethod
|
||||
|
||||
Adds tiddler filtering to the $tw.Wiki object.
|
||||
Adds tiddler filtering methods to the $tw.Wiki object.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
@@ -149,17 +149,22 @@ exports.getFilterOperators = function() {
|
||||
return this.filterOperators;
|
||||
};
|
||||
|
||||
exports.filterTiddlers = function(filterString,currTiddlerTitle,tiddlerList) {
|
||||
exports.filterTiddlers = function(filterString,widget,source) {
|
||||
var fn = this.compileFilter(filterString);
|
||||
return fn.call(this,tiddlerList || this.tiddlers,currTiddlerTitle);
|
||||
return fn.call(this,source,widget);
|
||||
};
|
||||
|
||||
/*
|
||||
Compile a filter into a function with the signature fn(source,widget) where:
|
||||
source: an iterator function for the source tiddlers, called source(iterator), where iterator is called as iterator(tiddler,title)
|
||||
widget: an optional widget node for retrieving the current tiddler etc.
|
||||
*/
|
||||
exports.compileFilter = function(filterString) {
|
||||
var filterParseTree;
|
||||
try {
|
||||
filterParseTree = this.parseFilter(filterString);
|
||||
} catch(e) {
|
||||
return function(source,currTiddlerTitle) {
|
||||
return function(source,widget) {
|
||||
return ["Filter error: " + e];
|
||||
};
|
||||
}
|
||||
@@ -171,14 +176,20 @@ exports.compileFilter = function(filterString) {
|
||||
var self = this;
|
||||
$tw.utils.each(filterParseTree,function(operation) {
|
||||
// Create a function for the chain of operators in the operation
|
||||
var operationSubFunction = function(source,currTiddlerTitle) {
|
||||
var operationSubFunction = function(source,widget) {
|
||||
var accumulator = source,
|
||||
results = [];
|
||||
results = [],
|
||||
currTiddlerTitle = widget && widget.getVariable("currentTiddler");
|
||||
$tw.utils.each(operation.operators,function(operator) {
|
||||
var operatorFunction = filterOperators[operator.operator] || filterOperators.field || function(source,operator,operations) {
|
||||
return ["Filter Error: unknown operator '" + operator.operator + "'"];
|
||||
},
|
||||
operand = operator.operand;
|
||||
var operand = operator.operand,
|
||||
operatorFunction;
|
||||
if(!operator.operator) {
|
||||
operatorFunction = filterOperators.title;
|
||||
} else if(!filterOperators[operator.operator]) {
|
||||
operatorFunction = filterOperators.field;
|
||||
} else {
|
||||
operatorFunction = filterOperators[operator.operator];
|
||||
}
|
||||
if(operator.indirect) {
|
||||
operand = self.getTextReference(operator.operand,"",currTiddlerTitle);
|
||||
}
|
||||
@@ -190,42 +201,58 @@ exports.compileFilter = function(filterString) {
|
||||
regexp: operator.regexp
|
||||
},{
|
||||
wiki: self,
|
||||
currTiddlerTitle: currTiddlerTitle
|
||||
widget: widget
|
||||
});
|
||||
accumulator = results;
|
||||
if($tw.utils.isArray(results)) {
|
||||
accumulator = self.makeTiddlerIterator(results);
|
||||
} else {
|
||||
accumulator = results;
|
||||
}
|
||||
});
|
||||
return results;
|
||||
if($tw.utils.isArray(results)) {
|
||||
return results;
|
||||
} else {
|
||||
var resultArray = [];
|
||||
results(function(tiddler,title) {
|
||||
resultArray.push(title);
|
||||
});
|
||||
return resultArray;
|
||||
}
|
||||
};
|
||||
// Wrap the operator functions in a wrapper function that depends on the prefix
|
||||
operationFunctions.push((function() {
|
||||
switch(operation.prefix || "") {
|
||||
case "": // No prefix means that the operation is unioned into the result
|
||||
return function(results,source,currTiddlerTitle) {
|
||||
$tw.utils.pushTop(results,operationSubFunction(source,currTiddlerTitle));
|
||||
return function(results,source,widget) {
|
||||
$tw.utils.pushTop(results,operationSubFunction(source,widget));
|
||||
};
|
||||
case "-": // The results of this operation are removed from the main result
|
||||
return function(results,source,currTiddlerTitle) {
|
||||
$tw.utils.removeArrayEntries(results,operationSubFunction(source,currTiddlerTitle));
|
||||
return function(results,source,widget) {
|
||||
$tw.utils.removeArrayEntries(results,operationSubFunction(source,widget));
|
||||
};
|
||||
case "+": // This operation is applied to the main results so far
|
||||
return function(results,source,currTiddlerTitle) {
|
||||
return function(results,source,widget) {
|
||||
// This replaces all the elements of the array, but keeps the actual array so that references to it are preserved
|
||||
source = results.slice(0);
|
||||
source = self.makeTiddlerIterator(results);
|
||||
results.splice(0,results.length);
|
||||
$tw.utils.pushTop(results,operationSubFunction(source,currTiddlerTitle));
|
||||
$tw.utils.pushTop(results,operationSubFunction(source,widget));
|
||||
};
|
||||
}
|
||||
})());
|
||||
});
|
||||
// Return a function that applies the operations to a source array/hashmap of tiddler titles
|
||||
return function(source,currTiddlerTitle) {
|
||||
source = source || self.tiddlers;
|
||||
// Return a function that applies the operations to a source iterator of tiddler titles
|
||||
return $tw.perf.measure("filter",function filterFunction(source,widget) {
|
||||
if(!source) {
|
||||
source = self.each;
|
||||
} else if(typeof source === "object") { // Array or hashmap
|
||||
source = self.makeTiddlerIterator(source);
|
||||
}
|
||||
var results = [];
|
||||
$tw.utils.each(operationFunctions,function(operationFunction) {
|
||||
operationFunction(results,source,currTiddlerTitle);
|
||||
operationFunction(results,source,widget);
|
||||
});
|
||||
return results;
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
31
core/modules/filters/after.js
Normal file
31
core/modules/filters/after.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/after.js
|
||||
type: application/javascript
|
||||
module-type: filteroperator
|
||||
|
||||
Filter operator returning the tiddler from the current list that is after the tiddler named in the operand.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.after = function(source,operator,options) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
results.push(title);
|
||||
});
|
||||
var index = results.indexOf(operator.operand);
|
||||
if(index === -1 || index > (results.length - 2)) {
|
||||
return [];
|
||||
} else {
|
||||
return [results[index + 1]];
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
56
core/modules/filters/all.js
Normal file
56
core/modules/filters/all.js
Normal file
@@ -0,0 +1,56 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/all.js
|
||||
type: application/javascript
|
||||
module-type: filteroperator
|
||||
|
||||
Filter operator for selecting tiddlers
|
||||
|
||||
[all[shadows+tiddlers]]
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
var allFilterOperators;
|
||||
|
||||
function getAllFilterOperators() {
|
||||
if(!allFilterOperators) {
|
||||
allFilterOperators = {};
|
||||
$tw.modules.applyMethods("allfilteroperator",allFilterOperators);
|
||||
}
|
||||
return allFilterOperators;
|
||||
}
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.all = function(source,operator,options) {
|
||||
// Get our suboperators
|
||||
var allFilterOperators = getAllFilterOperators();
|
||||
// Cycle through the suboperators accumulating their results
|
||||
var results = [],
|
||||
subops = operator.operand.split("+");
|
||||
// Check for common optimisations
|
||||
if(subops.length === 1 && subops[0] === "tiddlers") {
|
||||
return options.wiki.each;
|
||||
} else if(subops.length === 1 && subops[0] === "shadows") {
|
||||
return options.wiki.eachShadow;
|
||||
} else if(subops.length === 2 && subops[0] === "tiddlers" && subops[1] === "shadows") {
|
||||
return options.wiki.eachTiddlerPlusShadows;
|
||||
} else if(subops.length === 2 && subops[0] === "shadows" && subops[1] === "tiddlers") {
|
||||
return options.wiki.eachShadowPlusTiddlers;
|
||||
}
|
||||
// Do it the hard way
|
||||
for(var t=0; t<subops.length; t++) {
|
||||
var subop = allFilterOperators[subops[t]];
|
||||
if(subop) {
|
||||
$tw.utils.pushTop(results,subop(source,operator.prefix,options));
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
})();
|
||||
27
core/modules/filters/all/current.js
Normal file
27
core/modules/filters/all/current.js
Normal file
@@ -0,0 +1,27 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/all/current.js
|
||||
type: application/javascript
|
||||
module-type: allfilteroperator
|
||||
|
||||
Filter function for [all[current]]
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.current = function(source,prefix,options) {
|
||||
var currTiddlerTitle = options.widget && options.widget.getVariable("currentTiddler");
|
||||
if(currTiddlerTitle) {
|
||||
return [currTiddlerTitle];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
22
core/modules/filters/all/missing.js
Normal file
22
core/modules/filters/all/missing.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/all/missing.js
|
||||
type: application/javascript
|
||||
module-type: allfilteroperator
|
||||
|
||||
Filter function for [all[missing]]
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.missing = function(source,prefix,options) {
|
||||
return options.wiki.getMissingTitles();
|
||||
};
|
||||
|
||||
})();
|
||||
22
core/modules/filters/all/orphans.js
Normal file
22
core/modules/filters/all/orphans.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/all/orphans.js
|
||||
type: application/javascript
|
||||
module-type: allfilteroperator
|
||||
|
||||
Filter function for [all[orphans]]
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.orphans = function(source,prefix,options) {
|
||||
return options.wiki.getOrphanTitles();
|
||||
};
|
||||
|
||||
})();
|
||||
22
core/modules/filters/all/shadows.js
Normal file
22
core/modules/filters/all/shadows.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/all/shadows.js
|
||||
type: application/javascript
|
||||
module-type: allfilteroperator
|
||||
|
||||
Filter function for [all[shadows]]
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.shadows = function(source,prefix,options) {
|
||||
return options.wiki.allShadowTitles();
|
||||
};
|
||||
|
||||
})();
|
||||
22
core/modules/filters/all/tiddlers.js
Normal file
22
core/modules/filters/all/tiddlers.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/all/tiddlers.js
|
||||
type: application/javascript
|
||||
module-type: allfilteroperator
|
||||
|
||||
Filter function for [all[tiddlers]]
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.tiddlers = function(source,prefix,options) {
|
||||
return options.wiki.allTitles();
|
||||
};
|
||||
|
||||
})();
|
||||
@@ -17,20 +17,9 @@ Export our filter function
|
||||
*/
|
||||
exports.backlinks = function(source,operator,options) {
|
||||
var results = [];
|
||||
// Function to check an individual title
|
||||
function checkTiddler(title) {
|
||||
source(function(tiddler,title) {
|
||||
$tw.utils.pushTop(results,options.wiki.getTiddlerBacklinks(title));
|
||||
}
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
}
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
|
||||
31
core/modules/filters/before.js
Normal file
31
core/modules/filters/before.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/before.js
|
||||
type: application/javascript
|
||||
module-type: filteroperator
|
||||
|
||||
Filter operator returning the tiddler from the current list that is before the tiddler named in the operand.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.before = function(source,operator,options) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
results.push(title);
|
||||
});
|
||||
var index = results.indexOf(operator.operand);
|
||||
if(index <= 0) {
|
||||
return [];
|
||||
} else {
|
||||
return [results[index - 1]];
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
@@ -16,18 +16,9 @@ Filter operator that selects one tiddler for each unique value of the specified
|
||||
Export our filter function
|
||||
*/
|
||||
exports.each = function(source,operator,options) {
|
||||
// Convert the source to an array if necessary
|
||||
if(!$tw.utils.isArray(source)) {
|
||||
var copy = [];
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
copy.push(title);
|
||||
});
|
||||
source = copy;
|
||||
}
|
||||
// Collect up the first tiddler with each unique value of the specified field
|
||||
var results = [],values = {};
|
||||
$tw.utils.each(source,function(title) {
|
||||
var tiddler = options.wiki.getTiddler(title);
|
||||
var results = [],
|
||||
values = {};
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler) {
|
||||
var value = tiddler.getFieldString(operator.operand);
|
||||
if(!$tw.utils.hop(values,value)) {
|
||||
|
||||
@@ -16,23 +16,14 @@ Filter operator that selects one tiddler for each unique day covered by the spec
|
||||
Export our filter function
|
||||
*/
|
||||
exports.eachday = function(source,operator,options) {
|
||||
var results = [],
|
||||
values = [];
|
||||
// Function to convert a date/time to a date integer
|
||||
var toDate = function(value) {
|
||||
value = (new Date(value)).setHours(0,0,0,0);
|
||||
return value+0;
|
||||
};
|
||||
// Convert the source to an array if necessary
|
||||
if(!$tw.utils.isArray(source)) {
|
||||
var copy = [];
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
copy.push(title);
|
||||
});
|
||||
source = copy;
|
||||
}
|
||||
// Collect up the first tiddler with each unique day value of the specified field
|
||||
var results = [],values = [];
|
||||
$tw.utils.each(source,function(title) {
|
||||
var tiddler = options.wiki.getTiddler(title);
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler && tiddler.fields[operator.operand]) {
|
||||
var value = toDate(tiddler.fields[operator.operand]);
|
||||
if(values.indexOf(value) === -1) {
|
||||
|
||||
@@ -17,36 +17,47 @@ Export our filter function
|
||||
*/
|
||||
exports.field = function(source,operator,options) {
|
||||
var results = [],
|
||||
fieldname = (operator.suffix || operator.operator).toLowerCase(),
|
||||
isTitle = fieldname === "title";
|
||||
// Function to check an individual title
|
||||
function checkTiddler(title) {
|
||||
var tiddler = options.wiki.getTiddler(title),
|
||||
text = tiddler ? tiddler.getFieldString(fieldname) : (isTitle ? title : null),
|
||||
match;
|
||||
if(text !== null) {
|
||||
if(operator.regexp) {
|
||||
match = !!operator.regexp.exec(text);
|
||||
} else {
|
||||
match = text === operator.operand;
|
||||
}
|
||||
if(operator.prefix === "!") {
|
||||
match = !match;
|
||||
}
|
||||
if(match) {
|
||||
results.push(title);
|
||||
}
|
||||
fieldname = (operator.suffix || operator.operator || "title").toLowerCase();
|
||||
if(operator.prefix === "!") {
|
||||
if(operator.regexp) {
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler) {
|
||||
var text = tiddler.getFieldString(fieldname);
|
||||
if(text !== null && !operator.regexp.exec(text)) {
|
||||
results.push(title);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler) {
|
||||
var text = tiddler.getFieldString(fieldname);
|
||||
if(text !== null && text !== operator.operand) {
|
||||
results.push(title);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
if(operator.regexp) {
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler) {
|
||||
var text = tiddler.getFieldString(fieldname);
|
||||
if(text !== null && !!operator.regexp.exec(text)) {
|
||||
results.push(title);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler) {
|
||||
var text = tiddler.getFieldString(fieldname);
|
||||
if(text !== null && text === operator.operand) {
|
||||
results.push(title);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
@@ -16,28 +16,14 @@ Filter operator for returning the names of the fields on the selected tiddlers
|
||||
Export our filter function
|
||||
*/
|
||||
exports.fields = function(source,operator,options) {
|
||||
var self = this,
|
||||
results = [];
|
||||
// Function to check an individual title
|
||||
function checkTiddler(title) {
|
||||
// Return the fields on the specified tiddler
|
||||
var tiddler = options.wiki.getTiddler(title);
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler) {
|
||||
for(var fieldName in tiddler.fields) {
|
||||
$tw.utils.pushTop(results,fieldName);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
}
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
|
||||
31
core/modules/filters/get.js
Normal file
31
core/modules/filters/get.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/get.js
|
||||
type: application/javascript
|
||||
module-type: filteroperator
|
||||
|
||||
Filter operator for replacing tiddler titles by the value of the field specified in the operand.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.get = function(source,operator,options) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler) {
|
||||
var value = tiddler.getFieldString(operator.operand);
|
||||
if(value) {
|
||||
results.push(value);
|
||||
}
|
||||
}
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
})();
|
||||
@@ -17,27 +17,17 @@ Export our filter function
|
||||
*/
|
||||
exports.has = function(source,operator,options) {
|
||||
var results = [];
|
||||
// Function to check an individual title
|
||||
function checkTiddler(title) {
|
||||
var tiddler = options.wiki.getTiddler(title);
|
||||
if(tiddler) {
|
||||
var match = $tw.utils.hop(tiddler.fields,operator.operand) && tiddler.fields[operator.operand] !== "";
|
||||
if(operator.prefix === "!") {
|
||||
match = !match;
|
||||
}
|
||||
if(match) {
|
||||
if(operator.prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler && (!$tw.utils.hop(tiddler.fields,operator.operand) || tiddler.fields[operator.operand] === "")) {
|
||||
results.push(title);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler && $tw.utils.hop(tiddler.fields,operator.operand) && tiddler.fields[operator.operand] !== "") {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
}
|
||||
return results;
|
||||
|
||||
@@ -16,26 +16,13 @@ Filter operator for returning the indexes of a data tiddler
|
||||
Export our filter function
|
||||
*/
|
||||
exports.indexes = function(source,operator,options) {
|
||||
var self = this,
|
||||
results = [];
|
||||
// Function to check an individual title
|
||||
function checkTiddler(title) {
|
||||
// Return the fields on the specified tiddler
|
||||
var data = options.wiki.getTiddlerData(title,{});
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
var data = options.wiki.getTiddlerData(title);
|
||||
if(data) {
|
||||
$tw.utils.pushTop(results,Object.keys(data));
|
||||
}
|
||||
}
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
}
|
||||
});
|
||||
results.sort();
|
||||
return results;
|
||||
};
|
||||
|
||||
@@ -16,32 +16,20 @@ Filter function for [is[current]]
|
||||
Export our filter function
|
||||
*/
|
||||
exports.current = function(source,prefix,options) {
|
||||
var results = [];
|
||||
// Function to check a tiddler
|
||||
function checkTiddler(title) {
|
||||
if(title !== options.currTiddlerTitle) {
|
||||
results.push(title);
|
||||
}
|
||||
};
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
if(prefix === "!") {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
} else {
|
||||
if(source.indexOf(options.currTiddlerTitle) !== -1) {
|
||||
results.push(options.currTiddlerTitle);
|
||||
var results = [],
|
||||
currTiddlerTitle = options.widget && options.widget.getVariable("currentTiddler");
|
||||
if(prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(title !== currTiddlerTitle) {
|
||||
results.push(title);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if(prefix === "!") {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
} else {
|
||||
results.push(options.currTiddlerTitle);
|
||||
}
|
||||
source(function(tiddler,title) {
|
||||
if(title === currTiddlerTitle) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
@@ -17,24 +17,17 @@ Export our filter function
|
||||
*/
|
||||
exports.image = function(source,prefix,options) {
|
||||
var results = [];
|
||||
// Function to check a tiddler
|
||||
function checkTiddler(title) {
|
||||
var match = options.wiki.isImageTiddler(title);
|
||||
if(prefix === "!") {
|
||||
match = !match;
|
||||
}
|
||||
if(match) {
|
||||
results.push(title);
|
||||
}
|
||||
};
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
if(prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(!options.wiki.isImageTiddler(title)) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
source(function(tiddler,title) {
|
||||
if(options.wiki.isImageTiddler(title)) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
}
|
||||
return results;
|
||||
|
||||
@@ -16,31 +16,19 @@ Filter function for [is[missing]]
|
||||
Export our filter function
|
||||
*/
|
||||
exports.missing = function(source,prefix,options) {
|
||||
var results = [],
|
||||
missingTitles;
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
missingTitles = options.wiki.getMissingTitles();
|
||||
$tw.utils.each(source,function(title) {
|
||||
var match = missingTitles.indexOf(title) !== -1;
|
||||
if(prefix === "!") {
|
||||
match = !match;
|
||||
}
|
||||
if(match) {
|
||||
var results = [];
|
||||
if(prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(options.wiki.tiddlerExists(title)) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if(prefix !== "!") {
|
||||
missingTitles = options.wiki.getMissingTitles();
|
||||
$tw.utils.each(missingTitles,function(title) {
|
||||
source(function(tiddler,title) {
|
||||
if(!options.wiki.tiddlerExists(title)) {
|
||||
results.push(title);
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
results.push(title);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
@@ -18,24 +18,15 @@ Export our filter function
|
||||
exports.orphan = function(source,prefix,options) {
|
||||
var results = [],
|
||||
orphanTitles = options.wiki.getOrphanTitles();
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
var match = orphanTitles.indexOf(title) !== -1;
|
||||
if(prefix === "!") {
|
||||
match = !match;
|
||||
}
|
||||
if(match) {
|
||||
if(prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(orphanTitles.indexOf(title) === -1) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
var match = orphanTitles.indexOf(title) !== -1;
|
||||
if(prefix === "!") {
|
||||
match = !match;
|
||||
}
|
||||
if(match) {
|
||||
source(function(tiddler,title) {
|
||||
if(orphanTitles.indexOf(title) !== -1) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -17,31 +17,18 @@ Export our filter function
|
||||
*/
|
||||
exports.shadow = function(source,prefix,options) {
|
||||
var results = [];
|
||||
// Function to check a tiddler
|
||||
function checkTiddler(title) {
|
||||
var match = options.wiki.isShadowTiddler(title);
|
||||
if(prefix === "!") {
|
||||
match = !match;
|
||||
}
|
||||
if(match) {
|
||||
results.push(title);
|
||||
}
|
||||
};
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
if(prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(!options.wiki.isShadowTiddler(title)) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if(prefix !== "!") {
|
||||
$tw.utils.each(options.wiki.shadowTiddlers,function(tiddler,title) {
|
||||
source(function(tiddler,title) {
|
||||
if(options.wiki.isShadowTiddler(title)) {
|
||||
results.push(title);
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
@@ -17,24 +17,17 @@ Export our filter function
|
||||
*/
|
||||
exports.system = function(source,prefix,options) {
|
||||
var results = [];
|
||||
// Function to check a tiddler
|
||||
function checkTiddler(title) {
|
||||
var match = options.wiki.isSystemTiddler(title);
|
||||
if(prefix === "!") {
|
||||
match = !match;
|
||||
}
|
||||
if(match) {
|
||||
results.push(title);
|
||||
}
|
||||
};
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
if(prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(!options.wiki.isSystemTiddler(title)) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
source(function(tiddler,title) {
|
||||
if(options.wiki.isSystemTiddler(title)) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
}
|
||||
return results;
|
||||
|
||||
37
core/modules/filters/is/tag.js
Normal file
37
core/modules/filters/is/tag.js
Normal file
@@ -0,0 +1,37 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/is/tag.js
|
||||
type: application/javascript
|
||||
module-type: isfilteroperator
|
||||
|
||||
Filter function for [is[tag]]
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.tag = function(source,prefix,options) {
|
||||
var results = [],
|
||||
tagMap = options.wiki.getTagMap();
|
||||
if(prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(!$tw.utils.hop(tagMap,title)) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
source(function(tiddler,title) {
|
||||
if($tw.utils.hop(tagMap,title)) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
})();
|
||||
@@ -17,24 +17,17 @@ Export our filter function
|
||||
*/
|
||||
exports.tiddler = function(source,prefix,options) {
|
||||
var results = [];
|
||||
// Function to check a tiddler
|
||||
function checkTiddler(title) {
|
||||
var match = options.wiki.tiddlerExists(title);
|
||||
if(prefix === "!") {
|
||||
match = !match;
|
||||
}
|
||||
if(match) {
|
||||
results.push(title);
|
||||
}
|
||||
};
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
if(prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(!options.wiki.tiddlerExists(title)) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
source(function(tiddler,title) {
|
||||
if(options.wiki.tiddlerExists(title)) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
}
|
||||
return results;
|
||||
|
||||
@@ -17,20 +17,16 @@ Export our filter function
|
||||
*/
|
||||
exports.limit = function(source,operator,options) {
|
||||
var results = [];
|
||||
// Convert to an array if necessary
|
||||
if(!$tw.utils.isArray(source)) {
|
||||
var copy = [];
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
copy.push(title);
|
||||
});
|
||||
source = copy;
|
||||
}
|
||||
// Convert to an array
|
||||
source(function(tiddler,title) {
|
||||
results.push(title);
|
||||
});
|
||||
// Slice the array if necessary
|
||||
var limit = Math.min(source.length,parseInt(operator.operand,10));
|
||||
var limit = Math.min(results.length,parseInt(operator.operand,10));
|
||||
if(operator.prefix === "!") {
|
||||
results = source.slice(source.length - limit);
|
||||
results = results.slice(-limit);
|
||||
} else {
|
||||
results = source.slice(0,limit);
|
||||
results = results.slice(0,limit);
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
@@ -17,20 +17,9 @@ Export our filter function
|
||||
*/
|
||||
exports.links = function(source,operator,options) {
|
||||
var results = [];
|
||||
// Function to check an individual title
|
||||
function checkTiddler(title) {
|
||||
source(function(tiddler,title) {
|
||||
$tw.utils.pushTop(results,options.wiki.getTiddlerLinks(title));
|
||||
}
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
}
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
|
||||
@@ -18,29 +18,16 @@ Export our filter function
|
||||
exports.list = function(source,operator,options) {
|
||||
var results = [],
|
||||
tr = $tw.utils.parseTextReference(operator.operand),
|
||||
list = options.wiki.getTiddlerList(tr.title || options.currTiddlerTitle,tr.field,tr.index);
|
||||
function checkTiddler(title) {
|
||||
var match = list.indexOf(title) !== -1;
|
||||
if(operator.prefix === "!") {
|
||||
match = !match;
|
||||
}
|
||||
if(match) {
|
||||
results.push(title);
|
||||
}
|
||||
}
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
currTiddlerTitle = options.widget && options.widget.getVariable("currentTiddler"),
|
||||
list = options.wiki.getTiddlerList(tr.title || currTiddlerTitle,tr.field,tr.index);
|
||||
if(operator.prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(list.indexOf(title) === -1) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if(operator.prefix !== "!") {
|
||||
results = list;
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
}
|
||||
results = list;
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
@@ -17,20 +17,9 @@ Export our filter function
|
||||
*/
|
||||
exports.listed = function(source,operator,options) {
|
||||
var results = [];
|
||||
// Function to check an individual title
|
||||
function checkTiddler(title) {
|
||||
source(function(tiddler,title) {
|
||||
$tw.utils.pushTop(results,options.wiki.findListingsOfTiddler(title));
|
||||
}
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
}
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
|
||||
@@ -17,10 +17,7 @@ Reverse list
|
||||
*/
|
||||
exports.reverse = function(source,operator,options) {
|
||||
var results = [];
|
||||
if(!$tw.utils.isArray(source)) {
|
||||
source = Object.keys(source).sort();
|
||||
}
|
||||
$tw.utils.each(source,function(title) {
|
||||
source(function(tiddler,title) {
|
||||
results.unshift(title);
|
||||
});
|
||||
return results;
|
||||
@@ -30,33 +27,36 @@ exports.reverse = function(source,operator,options) {
|
||||
First entry/entries in list
|
||||
*/
|
||||
exports.first = function(source,operator,options) {
|
||||
var count = parseInt(operator.operand) || 1;
|
||||
if(!$tw.utils.isArray(source)) {
|
||||
source = Object.keys(source).sort();
|
||||
}
|
||||
return source.slice(0,Math.min(count,source.length));
|
||||
var count = parseInt(operator.operand) || 1,
|
||||
results = [];
|
||||
source(function(tiddler,title) {
|
||||
results.push(title);
|
||||
});
|
||||
return results.slice(0,count);
|
||||
};
|
||||
|
||||
/*
|
||||
Last entry/entries in list
|
||||
*/
|
||||
exports.last = function(source,operator,options) {
|
||||
var count = parseInt(operator.operand) || 1;
|
||||
if(!$tw.utils.isArray(source)) {
|
||||
source = Object.keys(source).sort();
|
||||
}
|
||||
return source.slice(-count);
|
||||
var count = parseInt(operator.operand) || 1,
|
||||
results = [];
|
||||
source(function(tiddler,title) {
|
||||
results.push(title);
|
||||
});
|
||||
return results.slice(-count);
|
||||
};
|
||||
|
||||
/*
|
||||
All but the first entry/entries of the list
|
||||
*/
|
||||
exports.rest = function(source,operator,options) {
|
||||
var count = parseInt(operator.operand) || 1;
|
||||
if(!$tw.utils.isArray(source)) {
|
||||
source = Object.keys(source).sort();
|
||||
}
|
||||
return source.slice(count);
|
||||
var count = parseInt(operator.operand) || 1,
|
||||
results = [];
|
||||
source(function(tiddler,title) {
|
||||
results.push(title);
|
||||
});
|
||||
return results.slice(count);
|
||||
};
|
||||
exports.butfirst = exports.rest;
|
||||
exports.bf = exports.rest;
|
||||
@@ -65,11 +65,12 @@ exports.bf = exports.rest;
|
||||
All but the last entry/entries of the list
|
||||
*/
|
||||
exports.butlast = function(source,operator,options) {
|
||||
var count = parseInt(operator.operand) || 1;
|
||||
if(!$tw.utils.isArray(source)) {
|
||||
source = Object.keys(source).sort();
|
||||
}
|
||||
return source.slice(0,-count);
|
||||
var count = parseInt(operator.operand) || 1,
|
||||
results = [];
|
||||
source(function(tiddler,title) {
|
||||
results.push(title);
|
||||
});
|
||||
return results.slice(0,-count);
|
||||
};
|
||||
exports.bl = exports.butlast;
|
||||
|
||||
@@ -77,11 +78,12 @@ exports.bl = exports.butlast;
|
||||
The nth member of the list
|
||||
*/
|
||||
exports.nth = function(source,operator,options) {
|
||||
var count = parseInt(operator.operand) || 1;
|
||||
if(!$tw.utils.isArray(source)) {
|
||||
source = Object.keys(source).sort();
|
||||
}
|
||||
return source.slice(count-1,count);
|
||||
var count = parseInt(operator.operand) || 1,
|
||||
results = [];
|
||||
source(function(tiddler,title) {
|
||||
results.push(title);
|
||||
});
|
||||
return results.slice(count - 1,count);
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
@@ -16,22 +16,12 @@ Filter operator for returning the titles of the modules of a given type in this
|
||||
Export our filter function
|
||||
*/
|
||||
exports.modules = function(source,operator,options) {
|
||||
var results = [],
|
||||
pushModules = function(type) {
|
||||
$tw.utils.each($tw.modules.types[type],function(moduleInfo,moduleName) {
|
||||
results.push(moduleName);
|
||||
});
|
||||
};
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
pushModules(title);
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
$tw.utils.each($tw.modules.types[title],function(moduleInfo,moduleName) {
|
||||
results.push(moduleName);
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
pushModules(title);
|
||||
});
|
||||
}
|
||||
});
|
||||
results.sort();
|
||||
return results;
|
||||
};
|
||||
|
||||
@@ -18,25 +18,14 @@ Export our filter function
|
||||
exports.next = function(source,operator,options) {
|
||||
var results = [],
|
||||
list = options.wiki.getTiddlerList(operator.operand);
|
||||
|
||||
function checkTiddler(title) {
|
||||
source(function(tiddler,title) {
|
||||
var match = list.indexOf(title);
|
||||
// increment match and then test if result is in range
|
||||
match++;
|
||||
if(match > 0 && match < list.length) {
|
||||
results.push(list[match]);
|
||||
}
|
||||
}
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
}
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
|
||||
32
core/modules/filters/plugintiddlers.js
Normal file
32
core/modules/filters/plugintiddlers.js
Normal file
@@ -0,0 +1,32 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/plugintiddlers.js
|
||||
type: application/javascript
|
||||
module-type: filteroperator
|
||||
|
||||
Filter operator for returning the titles of the shadow tiddlers within a plugin
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.plugintiddlers = function(source,operator,options) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
var pluginInfo = options.wiki.getPluginInfo(title);
|
||||
if(pluginInfo) {
|
||||
$tw.utils.each(pluginInfo.tiddlers,function(fields,title) {
|
||||
results.push(title);
|
||||
});
|
||||
}
|
||||
});
|
||||
results.sort();
|
||||
return results;
|
||||
};
|
||||
|
||||
})();
|
||||
@@ -17,24 +17,17 @@ Export our filter function
|
||||
*/
|
||||
exports.prefix = function(source,operator,options) {
|
||||
var results = [];
|
||||
// Function to check an individual title
|
||||
function checkTiddler(title) {
|
||||
var match = title.substr(0,operator.operand.length).toLowerCase() === operator.operand.toLowerCase();
|
||||
if(operator.prefix === "!") {
|
||||
match = !match;
|
||||
}
|
||||
if(match) {
|
||||
results.push(title);
|
||||
}
|
||||
}
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
if(operator.prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(title.substr(0,operator.operand.length).toLowerCase() !== operator.operand.toLowerCase()) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
source(function(tiddler,title) {
|
||||
if(title.substr(0,operator.operand.length).toLowerCase() === operator.operand.toLowerCase()) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
}
|
||||
return results;
|
||||
|
||||
@@ -18,25 +18,14 @@ Export our filter function
|
||||
exports.previous = function(source,operator,options) {
|
||||
var results = [],
|
||||
list = options.wiki.getTiddlerList(operator.operand);
|
||||
|
||||
function checkTiddler(title) {
|
||||
source(function(tiddler,title) {
|
||||
var match = list.indexOf(title);
|
||||
// decrement match and then test if result is in range
|
||||
// increment match and then test if result is in range
|
||||
match--;
|
||||
if( match >= 0 ) {
|
||||
if(match >= 0) {
|
||||
results.push(list[match]);
|
||||
}
|
||||
}
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
}
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
|
||||
28
core/modules/filters/removeprefix.js
Normal file
28
core/modules/filters/removeprefix.js
Normal file
@@ -0,0 +1,28 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/removeprefix.js
|
||||
type: application/javascript
|
||||
module-type: filteroperator
|
||||
|
||||
Filter operator for removing a prefix from each title in the list. Titles that do not start with the prefix are removed.
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.removeprefix = function(source,operator,options) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
if(title.substr(0,operator.operand.length).toLowerCase() === operator.operand.toLowerCase()) {
|
||||
results.push(title.substr(operator.operand.length));
|
||||
}
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
})();
|
||||
@@ -17,34 +17,19 @@ Export our filter function
|
||||
*/
|
||||
exports.sameday = function(source,operator,options) {
|
||||
var results = [],
|
||||
isSameDay = function(dateField,dateString) {
|
||||
var date1 = (new Date(dateField)).setHours(0,0,0,0),
|
||||
date2 = (new Date($tw.utils.parseDate(dateString))).setHours(0,0,0,0);
|
||||
return date1 === date2;
|
||||
fieldName = operator.suffix || "modified",
|
||||
targetDate = (new Date($tw.utils.parseDate(operator.operand))).setHours(0,0,0,0);
|
||||
// Function to convert a date/time to a date integer
|
||||
var isSameDay = function(dateField) {
|
||||
return (new Date(dateField)).setHours(0,0,0,0) === targetDate;
|
||||
};
|
||||
// Function to check an individual title
|
||||
function checkTiddler(title) {
|
||||
var tiddler = options.wiki.getTiddler(title);
|
||||
if(tiddler) {
|
||||
var match = isSameDay(tiddler.fields.modified,operator.operand);
|
||||
if(operator.prefix === "!") {
|
||||
match = !match;
|
||||
}
|
||||
if(match) {
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler && tiddler.fields[fieldName]) {
|
||||
if(isSameDay(tiddler.fields[fieldName])) {
|
||||
results.push(title);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
}
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ Export our filter function
|
||||
exports.search = function(source,operator,options) {
|
||||
var invert = operator.prefix === "!";
|
||||
return options.wiki.search(operator.operand,{
|
||||
titles: source,
|
||||
source: source,
|
||||
invert: invert
|
||||
});
|
||||
};
|
||||
|
||||
30
core/modules/filters/shadowsource.js
Normal file
30
core/modules/filters/shadowsource.js
Normal file
@@ -0,0 +1,30 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/shadowsource.js
|
||||
type: application/javascript
|
||||
module-type: filteroperator
|
||||
|
||||
Filter operator for returning the source plugins for shadow tiddlers
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.shadowsource = function(source,operator,options) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
var source = options.wiki.getShadowSource(title);
|
||||
if(source) {
|
||||
$tw.utils.pushTop(results,source);
|
||||
}
|
||||
});
|
||||
results.sort();
|
||||
return results;
|
||||
};
|
||||
|
||||
})();
|
||||
@@ -17,38 +17,33 @@ Export our filter function
|
||||
*/
|
||||
exports.sort = function(source,operator,options) {
|
||||
var results = prepare_results(source);
|
||||
options.wiki.sortTiddlers(results,operator.operand,operator.prefix === "!",false,false);
|
||||
options.wiki.sortTiddlers(results,operator.operand || "title",operator.prefix === "!",false,false);
|
||||
return results;
|
||||
};
|
||||
|
||||
exports.nsort = function(source,operator,options) {
|
||||
var results = prepare_results(source);
|
||||
options.wiki.sortTiddlers(results,operator.operand,operator.prefix === "!",false,true);
|
||||
options.wiki.sortTiddlers(results,operator.operand || "title",operator.prefix === "!",false,true);
|
||||
return results;
|
||||
};
|
||||
|
||||
exports.sortcs = function(source,operator,options) {
|
||||
var results = prepare_results(source);
|
||||
options.wiki.sortTiddlers(results,operator.operand,operator.prefix === "!",true,false);
|
||||
options.wiki.sortTiddlers(results,operator.operand || "title",operator.prefix === "!",true,false);
|
||||
return results;
|
||||
};
|
||||
|
||||
exports.nsortcs = function(source,operator,options) {
|
||||
var results = prepare_results(source);
|
||||
options.wiki.sortTiddlers(results,operator.operand,operator.prefix === "!",true,true);
|
||||
options.wiki.sortTiddlers(results,operator.operand || "title",operator.prefix === "!",true,true);
|
||||
return results;
|
||||
};
|
||||
|
||||
var prepare_results = function (source) {
|
||||
var results;
|
||||
if($tw.utils.isArray(source)) {
|
||||
results = source;
|
||||
} else {
|
||||
results = [];
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
results.push(title);
|
||||
});
|
||||
}
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
results.push(title);
|
||||
});
|
||||
return results;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,31 +17,18 @@ Export our filter function
|
||||
*/
|
||||
exports.tag = function(source,operator,options) {
|
||||
var results = [];
|
||||
// Function to check an individual title
|
||||
function checkTiddler(title) {
|
||||
var tiddler = options.wiki.getTiddler(title);
|
||||
if(tiddler) {
|
||||
var match = tiddler.hasTag(operator.operand);
|
||||
if(operator.prefix === "!") {
|
||||
match = !match;
|
||||
}
|
||||
if(match) {
|
||||
if(operator.prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler && !tiddler.hasTag(operator.operand)) {
|
||||
results.push(title);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler && tiddler.hasTag(operator.operand)) {
|
||||
results.push(title);
|
||||
}
|
||||
});
|
||||
}
|
||||
// Sort the results if we are matching a tag
|
||||
if(operator.prefix !== "!") {
|
||||
results = options.wiki.sortByList(results,operator.operand);
|
||||
}
|
||||
return results;
|
||||
|
||||
@@ -17,20 +17,9 @@ Export our filter function
|
||||
*/
|
||||
exports.tagging = function(source,operator,options) {
|
||||
var results = [];
|
||||
// Function to check an individual title
|
||||
function checkTiddler(title) {
|
||||
source(function(tiddler,title) {
|
||||
$tw.utils.pushTop(results,options.wiki.getTiddlersWithTag(title));
|
||||
}
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
}
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
|
||||
@@ -17,23 +17,11 @@ Export our filter function
|
||||
*/
|
||||
exports.tags = function(source,operator,options) {
|
||||
var results = [];
|
||||
// Function to check an individual title
|
||||
function checkTiddler(title) {
|
||||
var tiddler = options.wiki.getTiddler(title);
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler && tiddler.fields.tags) {
|
||||
$tw.utils.pushTop(results,tiddler.fields.tags);
|
||||
}
|
||||
}
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
}
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
|
||||
@@ -17,35 +17,14 @@ Export our filter function
|
||||
*/
|
||||
exports.title = function(source,operator,options) {
|
||||
var results = [];
|
||||
// Function to check an individual title
|
||||
function checkTiddler(title) {
|
||||
var tiddler = options.wiki.getTiddler(title);
|
||||
if(tiddler) {
|
||||
var match = tiddler.fields[operator.operator] === operator.operand;
|
||||
if(operator.prefix === "!") {
|
||||
match = !match;
|
||||
}
|
||||
if(match) {
|
||||
if(operator.prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler && tiddler.fields.title !== operator.operand) {
|
||||
results.push(title);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
});
|
||||
} else {
|
||||
// If we're filtering a hashmap we change the behaviour to pass through missing tiddlers
|
||||
if(operator.prefix !== "!") {
|
||||
results.push(operator.operand);
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
if(title !== operator.operand) {
|
||||
checkTiddler(title);
|
||||
}
|
||||
});
|
||||
}
|
||||
results.push(operator.operand);
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
@@ -17,25 +17,17 @@ Export our filter function
|
||||
*/
|
||||
exports.untagged = function(source,operator,options) {
|
||||
var results = [];
|
||||
// Function to check an individual title
|
||||
function checkTiddler(title) {
|
||||
var tiddler = options.wiki.getTiddler(title),
|
||||
match = tiddler && $tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.length > 0;
|
||||
if(operator.prefix !== "!") {
|
||||
match = !match;
|
||||
}
|
||||
if(match) {
|
||||
$tw.utils.pushTop(results,title);
|
||||
}
|
||||
}
|
||||
// Iterate through the source tiddlers
|
||||
if($tw.utils.isArray(source)) {
|
||||
$tw.utils.each(source,function(title) {
|
||||
checkTiddler(title);
|
||||
if(operator.prefix === "!") {
|
||||
source(function(tiddler,title) {
|
||||
if(tiddler && $tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.length > 0) {
|
||||
$tw.utils.pushTop(results,title);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$tw.utils.each(source,function(element,title) {
|
||||
checkTiddler(title);
|
||||
source(function(tiddler,title) {
|
||||
if(!tiddler || !tiddler.hasField("tags") || ($tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.length === 0)) {
|
||||
$tw.utils.pushTop(results,title);
|
||||
}
|
||||
});
|
||||
}
|
||||
return results;
|
||||
|
||||
37
core/modules/language.js
Normal file
37
core/modules/language.js
Normal file
@@ -0,0 +1,37 @@
|
||||
/*\
|
||||
title: $:/core/modules/language.js
|
||||
type: application/javascript
|
||||
module-type: global
|
||||
|
||||
The $tw.Language() manages translateable strings
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Create an instance of the language manager. Options include:
|
||||
wiki: wiki from which to retrieve translation tiddlers
|
||||
*/
|
||||
function Language(options) {
|
||||
options = options || "";
|
||||
this.wiki = options.wiki || $tw.wiki;
|
||||
}
|
||||
|
||||
/*
|
||||
Return a single translateable string. The title is automatically prefixed with "$:/language/"
|
||||
Options include:
|
||||
variables: optional hashmap of variables to supply to the language wikification
|
||||
*/
|
||||
Language.prototype.getString = function(title,options) {
|
||||
options = options || {};
|
||||
title = "$:/language/" + title;
|
||||
return this.wiki.renderTiddler("text/plain",title,{variables: options.variables});
|
||||
};
|
||||
|
||||
exports.Language = Language;
|
||||
|
||||
})();
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user