mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-22 10:54:46 +00:00
Compare commits
91 Commits
accessible
...
allow-filt
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ddec146925 | ||
|
|
ba19f487c5 | ||
|
|
2a19c60e20 | ||
|
|
c28dbd0025 | ||
|
|
29c2260457 | ||
|
|
d7c89de11d | ||
|
|
e0ff54a04e | ||
|
|
042f3c59ad | ||
|
|
07960f1527 | ||
|
|
5cdffd6943 | ||
|
|
ee0a32c8f1 | ||
|
|
4bb3d2ba34 | ||
|
|
e7c0ad484b | ||
|
|
e82053609b | ||
|
|
7926af8541 | ||
|
|
bcca4eca81 | ||
|
|
925ff202a0 | ||
|
|
97bc9039e6 | ||
|
|
e6149e7e29 | ||
|
|
e47f038d2a | ||
|
|
2789bc8ef6 | ||
|
|
3a2831870b | ||
|
|
4cddfa228b | ||
|
|
da1825e6c5 | ||
|
|
4ae2d8422b | ||
|
|
c9e1b91099 | ||
|
|
95f987544c | ||
|
|
308e207a67 | ||
|
|
aa5a6627e6 | ||
|
|
6f038e362e | ||
|
|
95a9c0bd54 | ||
|
|
0a20c08107 | ||
|
|
964993f879 | ||
|
|
e6175227b2 | ||
|
|
f247686970 | ||
|
|
589813f233 | ||
|
|
007b759421 | ||
|
|
714587cdfc | ||
|
|
d8c2ab3baf | ||
|
|
b16d695386 | ||
|
|
2bac676ac4 | ||
|
|
ba01d06962 | ||
|
|
6732d96f78 | ||
|
|
416a2fae7a | ||
|
|
2ce14ac8f9 | ||
|
|
3764ca4760 | ||
|
|
3f478f5689 | ||
|
|
f9604c40d3 | ||
|
|
11ffc83493 | ||
|
|
f343198353 | ||
|
|
1946f173a9 | ||
|
|
7d7ac662a2 | ||
|
|
3627ad1d28 | ||
|
|
b16ed6629d | ||
|
|
d14e775b90 | ||
|
|
d4b10605c3 | ||
|
|
7f1064d14b | ||
|
|
867d647839 | ||
|
|
8c39c9e911 | ||
|
|
c0ce53e3ea | ||
|
|
3a9f848ea0 | ||
|
|
5bce35d90b | ||
|
|
8d39ce95eb | ||
|
|
e313857822 | ||
|
|
ce988f909a | ||
|
|
ba2c9f44b0 | ||
|
|
6479c26b59 | ||
|
|
2271f6885a | ||
|
|
8c378e0d24 | ||
|
|
925ce2b505 | ||
|
|
cf25dae8a7 | ||
|
|
eb8f4d66b9 | ||
|
|
ef03a4a5df | ||
|
|
51a4d39c19 | ||
|
|
55124b4ee6 | ||
|
|
fb99d3050e | ||
|
|
95dc56d850 | ||
|
|
77b418004a | ||
|
|
028dfe39b7 | ||
|
|
81f5141166 | ||
|
|
8567c48be8 | ||
|
|
3da3318396 | ||
|
|
89fd8871b6 | ||
|
|
f249b79e81 | ||
|
|
524cee1489 | ||
|
|
93abe5e3a6 | ||
|
|
c0bca18cab | ||
|
|
d70b6a7d6c | ||
|
|
6404d5652e | ||
|
|
fe2c677ac4 | ||
|
|
5376f4953c |
@@ -5,7 +5,7 @@
|
||||
# Default to the current version number for building the plugin library
|
||||
|
||||
if [ -z "$TW5_BUILD_VERSION" ]; then
|
||||
TW5_BUILD_VERSION=v5.2.6
|
||||
TW5_BUILD_VERSION=v5.2.8
|
||||
fi
|
||||
|
||||
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
||||
|
||||
72
boot/boot.js
72
boot/boot.js
@@ -96,34 +96,42 @@ Push entries onto an array, removing them first if they already exist in the arr
|
||||
$tw.utils.pushTop = function(array,value) {
|
||||
var t,p;
|
||||
if($tw.utils.isArray(value)) {
|
||||
// Remove any array entries that are duplicated in the new values
|
||||
if(value.length !== 0) {
|
||||
if(array.length !== 0) {
|
||||
if(value.length < array.length) {
|
||||
for(t=0; t<value.length; t++) {
|
||||
p = array.indexOf(value[t]);
|
||||
if(p !== -1) {
|
||||
array.splice(p,1);
|
||||
if($tw.config._temp_allowDuplicates) {
|
||||
Array.prototype.push.apply(array,value);
|
||||
} else {
|
||||
// Remove any array entries that are duplicated in the new values
|
||||
if(value.length !== 0) {
|
||||
if(array.length !== 0) {
|
||||
if(value.length < array.length) {
|
||||
for(t=0; t<value.length; t++) {
|
||||
p = array.indexOf(value[t]);
|
||||
if(p !== -1) {
|
||||
array.splice(p,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for(t=array.length-1; t>=0; t--) {
|
||||
p = value.indexOf(array[t]);
|
||||
if(p !== -1) {
|
||||
array.splice(t,1);
|
||||
} else {
|
||||
for(t=array.length-1; t>=0; t--) {
|
||||
p = value.indexOf(array[t]);
|
||||
if(p !== -1) {
|
||||
array.splice(t,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Push the values on top of the main array
|
||||
array.push.apply(array,value);
|
||||
// Push the values on top of the main array
|
||||
Array.prototype.push.apply(array,value);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
p = array.indexOf(value);
|
||||
if(p !== -1) {
|
||||
array.splice(p,1);
|
||||
if($tw.config._temp_allowDuplicates) {
|
||||
array.push(value);
|
||||
} else {
|
||||
p = array.indexOf(value);
|
||||
if(p !== -1) {
|
||||
array.splice(p,1);
|
||||
}
|
||||
array.push(value);
|
||||
}
|
||||
array.push(value);
|
||||
}
|
||||
return array;
|
||||
};
|
||||
@@ -397,7 +405,7 @@ $tw.utils.parseStringArray = function(value, allowDuplicate) {
|
||||
match = memberRegExp.exec(value);
|
||||
if(match) {
|
||||
var item = match[1] || match[2];
|
||||
if(item !== undefined && (!$tw.utils.hop(names,item) || allowDuplicate)) {
|
||||
if(item !== undefined && (!$tw.utils.hop(names,item) || allowDuplicate || $tw.config._temp_allowDuplicates)) {
|
||||
results.push(item);
|
||||
names[item] = true;
|
||||
}
|
||||
@@ -2305,14 +2313,25 @@ $tw.loadTiddlersNode = function() {
|
||||
Startup TiddlyWiki
|
||||
*/
|
||||
$tw.boot.initStartup = function(options) {
|
||||
var _temp_allowDuplicates;
|
||||
options = options || {};
|
||||
// Get the URL hash and check for safe mode
|
||||
$tw.locationHash = "#";
|
||||
if($tw.browser && !$tw.node) {
|
||||
if(location.hash === "#:safe") {
|
||||
$tw.safeMode = true;
|
||||
} else if(location.hash === "#dupes") {
|
||||
_temp_allowDuplicates = true;
|
||||
$tw.locationHash = $tw.utils.getLocationHash();
|
||||
} else {
|
||||
$tw.locationHash = $tw.utils.getLocationHash();
|
||||
}
|
||||
} else {
|
||||
var p = $tw.boot.argv.indexOf("--dupes");
|
||||
if(p !== -1) {
|
||||
_temp_allowDuplicates = true;
|
||||
$tw.boot.argv.splice(p,1);
|
||||
}
|
||||
}
|
||||
// Initialise some more $tw properties
|
||||
$tw.utils.deepDefaults($tw,{
|
||||
@@ -2321,6 +2340,7 @@ $tw.boot.initStartup = function(options) {
|
||||
types: {} // hashmap by module type of hashmap of exports
|
||||
},
|
||||
config: { // Configuration overridables
|
||||
_temp_allowDuplicates: _temp_allowDuplicates,
|
||||
pluginsPath: "../plugins/",
|
||||
themesPath: "../themes/",
|
||||
languagesPath: "../languages/",
|
||||
@@ -2473,6 +2493,14 @@ $tw.boot.execStartup = function(options){
|
||||
if($tw.crypto) {
|
||||
$tw.crypto.updateCryptoStateTiddler();
|
||||
}
|
||||
// Warn if using duplicates mode
|
||||
console.log("\x1b[0;31m--------=====>>>>>> " + $tw.wiki.getTiddler("$:/core/_temp_allowDuplicates/Heading").fields.text + "\x1b[0m");
|
||||
console.log("\x1b[0;34m--------=====>>>>>> " + $tw.wiki.getTiddler("$:/core/_temp_allowDuplicates/Warning").fields.text + "\x1b[0m");
|
||||
if($tw.config._temp_allowDuplicates) {
|
||||
console.log("\x1b[0;31m--------=====>>>>>> " + $tw.wiki.getTiddler("$:/core/_temp_allowDuplicates/StatusOn").fields.text + "\x1b[0m");
|
||||
} else {
|
||||
console.log("\x1b[0;32m--------=====>>>>>> " + $tw.wiki.getTiddler("$:/core/_temp_allowDuplicates/StatusOff").fields.text + "\x1b[0m");
|
||||
}
|
||||
// Gather up any startup modules
|
||||
$tw.boot.remainingStartupModules = []; // Array of startup modules
|
||||
$tw.modules.forEachModuleOfType("startup",function(title,module) {
|
||||
|
||||
92
core/_temp_allowDuplicates.tid
Normal file
92
core/_temp_allowDuplicates.tid
Normal file
@@ -0,0 +1,92 @@
|
||||
title: $:/core/_temp_allowDuplicates
|
||||
tags: $:/tags/AboveStory
|
||||
|
||||
<div class="marching-ants-box" style="
|
||||
position: fixed;
|
||||
top: 100px;
|
||||
left: -4px;
|
||||
max-width: 50%;
|
||||
z-index: 1000;
|
||||
padding: 1em;
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-right-radius: 16px;
|
||||
color: #fff;">
|
||||
|
||||
<$reveal type="match" state="$:/state/_temp_allowDuplicatesWarning" text="hide" default="show">
|
||||
|
||||
<$button set="$:/state/_temp_allowDuplicatesWarning" setTo="show" class="tc-btn-invisible" style="
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
fill: #ff0;">
|
||||
|
||||
{{$:/core/images/warning}}
|
||||
|
||||
</$button>
|
||||
|
||||
</$reveal>
|
||||
|
||||
<$reveal type="nomatch" state="$:/state/_temp_allowDuplicatesWarning" text="hide" default="show">
|
||||
|
||||
<$button set="$:/state/_temp_allowDuplicatesWarning" setTo="hide" class="tc-btn-invisible" style="
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
fill: #ff0;">
|
||||
|
||||
<span style="float:right;">{{$:/core/images/chevron-left}}</span> {{$:/core/images/warning}}
|
||||
|
||||
</$button>
|
||||
|
||||
<div style="
|
||||
font-weight: bold;">
|
||||
|
||||
{{$:/core/_temp_allowDuplicates/Heading}}
|
||||
|
||||
</div>
|
||||
|
||||
<div style="">
|
||||
|
||||
{{$:/core/_temp_allowDuplicates/Warning}}
|
||||
|
||||
</div>
|
||||
|
||||
<$list filter="1 1 1 1 +[butfirst[]limit[1]]" emptyMessage="""
|
||||
|
||||
<div style="
|
||||
font-weight: bold;
|
||||
color: #0f0;">
|
||||
|
||||
{{$:/core/_temp_allowDuplicates/StatusOff}}
|
||||
|
||||
//Append `#dupes` to the browser address bar to enable//
|
||||
|
||||
</div>
|
||||
""">
|
||||
|
||||
<div style="
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
font-size: 1.5em;
|
||||
padding: 4px;" class="marching-ants-box">
|
||||
|
||||
{{$:/core/_temp_allowDuplicates/StatusOn}}
|
||||
|
||||
//Remove `#dupes` from the browser address bar to disable//
|
||||
|
||||
</div>
|
||||
|
||||
</$list>
|
||||
|
||||
</$reveal>
|
||||
|
||||
</div>
|
||||
|
||||
<style>
|
||||
@keyframes marching-ants { to { background-position: 100% 100% } }
|
||||
|
||||
.marching-ants-box {
|
||||
border: 4px solid transparent;
|
||||
background: linear-gradient(#d85858, #d85858) padding-box,
|
||||
repeating-linear-gradient(-45deg, #f00 0, #f00 25%, transparent 0, transparent 50%) 0 / 12px 12px;
|
||||
animation: marching-ants 12s linear infinite;
|
||||
}
|
||||
</style>
|
||||
12
core/images/save-button-dynamic.tid
Normal file
12
core/images/save-button-dynamic.tid
Normal file
@@ -0,0 +1,12 @@
|
||||
title: $:/core/images/save-button-dynamic
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg width="22pt" height="22pt" class="tc-image-save-button-dynamic tc-image-button" viewBox="0 0 128 128">
|
||||
<g class="tc-image-save-button-dynamic-clean">
|
||||
<path fill-rule="evenodd" d="M120.783 34.33c4.641 8.862 7.266 18.948 7.266 29.646 0 35.347-28.653 64-64 64-35.346 0-64-28.653-64-64 0-35.346 28.654-64 64-64 18.808 0 35.72 8.113 47.43 21.03l2.68-2.68c3.13-3.13 8.197-3.132 11.321-.008 3.118 3.118 3.121 8.193-.007 11.32l-4.69 4.691zm-12.058 12.058a47.876 47.876 0 013.324 17.588c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48c14.39 0 27.3 6.332 36.098 16.362L58.941 73.544 41.976 56.578c-3.127-3.127-8.201-3.123-11.32-.005-3.123 3.124-3.119 8.194.006 11.319l22.617 22.617a7.992 7.992 0 005.659 2.347c2.05 0 4.101-.783 5.667-2.349l44.12-44.12z"/>
|
||||
</g>
|
||||
<g class="tc-image-save-button-dynamic-dirty">
|
||||
<path d="M64.856912,0 C100.203136,0 128.856912,28.653776 128.856912,64 C128.856912,99.346224 100.203136,128 64.856912,128 C29.510688,128 0.856911958,99.346224 0.856911958,64 C0.856911958,28.653776 29.510688,0 64.856912,0 Z M64.856912,16 C38.347244,16 16.856912,37.490332 16.856912,64 C16.856912,90.509668 38.347244,112 64.856912,112 C91.3665799,112 112.856912,90.509668 112.856912,64 C112.856912,37.490332 91.3665799,16 64.856912,16 Z"></path>
|
||||
<circle cx="65" cy="64" r="32"></circle>
|
||||
</g>
|
||||
</svg>
|
||||
@@ -40,6 +40,7 @@ Error/RetrievingSkinny: Error retrieving skinny tiddler list
|
||||
Error/SavingToTWEdit: Error saving to TWEdit
|
||||
Error/WhileSaving: Error while saving
|
||||
Error/XMLHttpRequest: XMLHttpRequest error code
|
||||
Error/ZoominTextNode: Story View Error: It appears you tried to interact with a tiddler that displays in a custom container. This is most likely caused by using `$:/tags/StoryTiddlerTemplateFilter` with a template that contains text or whitespace at the start. Please use the pragma `\whitespace trim` and ensure the whole contents of the tiddler is wrapped in a single HTML element. The text that caused this issue:
|
||||
InternalJavaScriptError/Title: Internal JavaScript Error
|
||||
InternalJavaScriptError/Hint: Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser
|
||||
LayoutSwitcher/Description: Open the layout switcher
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
title: $:/language/Modals/SaveInstructions
|
||||
subtitle: Save your work
|
||||
footer: <$button message="tm-close-tiddler">Close</$button>
|
||||
help: https://tiddlywiki.com/static/SavingChanges.html
|
||||
|
||||
Your changes to this wiki need to be saved as a ~TiddlyWiki HTML file.
|
||||
|
||||
!!! Desktop browsers
|
||||
|
||||
# Select ''Save As'' from the ''File'' menu
|
||||
# Choose a filename and location
|
||||
#* Some browsers also require you to explicitly specify the file saving format as ''Webpage, HTML only'' or similar
|
||||
# Close this tab
|
||||
|
||||
!!! Smartphone browsers
|
||||
|
||||
# Create a bookmark to this page
|
||||
#* If you've got iCloud or Google Sync set up then the bookmark will automatically sync to your desktop where you can open it and save it as above
|
||||
# Close this tab
|
||||
|
||||
//If you open the bookmark again in Mobile Safari you will see this message again. If you want to go ahead and use the file, just click the ''close'' button below//
|
||||
6
core/messages.multids
Normal file
6
core/messages.multids
Normal file
@@ -0,0 +1,6 @@
|
||||
title: $:/core/_temp_allowDuplicates/
|
||||
|
||||
Heading: Important Warning
|
||||
Warning: This is a special prerelease version of TW5 for experimenting with a potentially incompatible change to the core logic of filter processing. It is only intended to be used for evaluation and testing
|
||||
StatusOff: The allow duplicates setting is currently: OFF
|
||||
StatusOn: The allow duplicates setting is currently: ON
|
||||
@@ -30,7 +30,7 @@ exports.textPrimitives.wikiLink = exports.textPrimitives.upperLetter + "+" +
|
||||
exports.textPrimitives.upperLetter +
|
||||
exports.textPrimitives.anyLetter + "*";
|
||||
|
||||
exports.htmlEntities = {quot:34, amp:38, apos:39, lt:60, gt:62, nbsp:160, iexcl:161, cent:162, pound:163, curren:164, yen:165, brvbar:166, sect:167, uml:168, copy:169, ordf:170, laquo:171, not:172, shy:173, reg:174, macr:175, deg:176, plusmn:177, sup2:178, sup3:179, acute:180, micro:181, para:182, middot:183, cedil:184, sup1:185, ordm:186, raquo:187, frac14:188, frac12:189, frac34:190, iquest:191, Agrave:192, Aacute:193, Acirc:194, Atilde:195, Auml:196, Aring:197, AElig:198, Ccedil:199, Egrave:200, Eacute:201, Ecirc:202, Euml:203, Igrave:204, Iacute:205, Icirc:206, Iuml:207, ETH:208, Ntilde:209, Ograve:210, Oacute:211, Ocirc:212, Otilde:213, Ouml:214, times:215, Oslash:216, Ugrave:217, Uacute:218, Ucirc:219, Uuml:220, Yacute:221, THORN:222, szlig:223, agrave:224, aacute:225, acirc:226, atilde:227, auml:228, aring:229, aelig:230, ccedil:231, egrave:232, eacute:233, ecirc:234, euml:235, igrave:236, iacute:237, icirc:238, iuml:239, eth:240, ntilde:241, ograve:242, oacute:243, ocirc:244, otilde:245, ouml:246, divide:247, oslash:248, ugrave:249, uacute:250, ucirc:251, uuml:252, yacute:253, thorn:254, yuml:255, OElig:338, oelig:339, Scaron:352, scaron:353, Yuml:376, fnof:402, circ:710, tilde:732, Alpha:913, Beta:914, Gamma:915, Delta:916, Epsilon:917, Zeta:918, Eta:919, Theta:920, Iota:921, Kappa:922, Lambda:923, Mu:924, Nu:925, Xi:926, Omicron:927, Pi:928, Rho:929, Sigma:931, Tau:932, Upsilon:933, Phi:934, Chi:935, Psi:936, Omega:937, alpha:945, beta:946, gamma:947, delta:948, epsilon:949, zeta:950, eta:951, theta:952, iota:953, kappa:954, lambda:955, mu:956, nu:957, xi:958, omicron:959, pi:960, rho:961, sigmaf:962, sigma:963, tau:964, upsilon:965, phi:966, chi:967, psi:968, omega:969, thetasym:977, upsih:978, piv:982, ensp:8194, emsp:8195, thinsp:8201, zwnj:8204, zwj:8205, lrm:8206, rlm:8207, ndash:8211, mdash:8212, lsquo:8216, rsquo:8217, sbquo:8218, ldquo:8220, rdquo:8221, bdquo:8222, dagger:8224, Dagger:8225, bull:8226, hellip:8230, permil:8240, prime:8242, Prime:8243, lsaquo:8249, rsaquo:8250, oline:8254, frasl:8260, euro:8364, image:8465, weierp:8472, real:8476, trade:8482, alefsym:8501, larr:8592, uarr:8593, rarr:8594, darr:8595, harr:8596, crarr:8629, lArr:8656, uArr:8657, rArr:8658, dArr:8659, hArr:8660, forall:8704, part:8706, exist:8707, empty:8709, nabla:8711, isin:8712, notin:8713, ni:8715, prod:8719, sum:8721, minus:8722, lowast:8727, radic:8730, prop:8733, infin:8734, ang:8736, and:8743, or:8744, cap:8745, cup:8746, int:8747, there4:8756, sim:8764, cong:8773, asymp:8776, ne:8800, equiv:8801, le:8804, ge:8805, sub:8834, sup:8835, nsub:8836, sube:8838, supe:8839, oplus:8853, otimes:8855, perp:8869, sdot:8901, lceil:8968, rceil:8969, lfloor:8970, rfloor:8971, lang:9001, rang:9002, loz:9674, spades:9824, clubs:9827, hearts:9829, diams:9830 };
|
||||
exports.htmlEntities = {quot:34, dollar:36, amp:38, apos:39, lt:60, gt:62, nbsp:160, iexcl:161, cent:162, pound:163, curren:164, yen:165, brvbar:166, sect:167, uml:168, copy:169, ordf:170, laquo:171, not:172, shy:173, reg:174, macr:175, deg:176, plusmn:177, sup2:178, sup3:179, acute:180, micro:181, para:182, middot:183, cedil:184, sup1:185, ordm:186, raquo:187, frac14:188, frac12:189, frac34:190, iquest:191, Agrave:192, Aacute:193, Acirc:194, Atilde:195, Auml:196, Aring:197, AElig:198, Ccedil:199, Egrave:200, Eacute:201, Ecirc:202, Euml:203, Igrave:204, Iacute:205, Icirc:206, Iuml:207, ETH:208, Ntilde:209, Ograve:210, Oacute:211, Ocirc:212, Otilde:213, Ouml:214, times:215, Oslash:216, Ugrave:217, Uacute:218, Ucirc:219, Uuml:220, Yacute:221, THORN:222, szlig:223, agrave:224, aacute:225, acirc:226, atilde:227, auml:228, aring:229, aelig:230, ccedil:231, egrave:232, eacute:233, ecirc:234, euml:235, igrave:236, iacute:237, icirc:238, iuml:239, eth:240, ntilde:241, ograve:242, oacute:243, ocirc:244, otilde:245, ouml:246, divide:247, oslash:248, ugrave:249, uacute:250, ucirc:251, uuml:252, yacute:253, thorn:254, yuml:255, OElig:338, oelig:339, Scaron:352, scaron:353, Yuml:376, fnof:402, circ:710, tilde:732, Alpha:913, Beta:914, Gamma:915, Delta:916, Epsilon:917, Zeta:918, Eta:919, Theta:920, Iota:921, Kappa:922, Lambda:923, Mu:924, Nu:925, Xi:926, Omicron:927, Pi:928, Rho:929, Sigma:931, Tau:932, Upsilon:933, Phi:934, Chi:935, Psi:936, Omega:937, alpha:945, beta:946, gamma:947, delta:948, epsilon:949, zeta:950, eta:951, theta:952, iota:953, kappa:954, lambda:955, mu:956, nu:957, xi:958, omicron:959, pi:960, rho:961, sigmaf:962, sigma:963, tau:964, upsilon:965, phi:966, chi:967, psi:968, omega:969, thetasym:977, upsih:978, piv:982, ensp:8194, emsp:8195, thinsp:8201, zwnj:8204, zwj:8205, lrm:8206, rlm:8207, ndash:8211, mdash:8212, lsquo:8216, rsquo:8217, sbquo:8218, ldquo:8220, rdquo:8221, bdquo:8222, dagger:8224, Dagger:8225, bull:8226, hellip:8230, permil:8240, prime:8242, Prime:8243, lsaquo:8249, rsaquo:8250, oline:8254, frasl:8260, euro:8364, image:8465, weierp:8472, real:8476, trade:8482, alefsym:8501, larr:8592, uarr:8593, rarr:8594, darr:8595, harr:8596, crarr:8629, lArr:8656, uArr:8657, rArr:8658, dArr:8659, hArr:8660, forall:8704, part:8706, exist:8707, empty:8709, nabla:8711, isin:8712, notin:8713, ni:8715, prod:8719, sum:8721, minus:8722, lowast:8727, radic:8730, prop:8733, infin:8734, ang:8736, and:8743, or:8744, cap:8745, cup:8746, int:8747, there4:8756, sim:8764, cong:8773, asymp:8776, ne:8800, equiv:8801, le:8804, ge:8805, sub:8834, sup:8835, nsub:8836, sube:8838, supe:8839, oplus:8853, otimes:8855, perp:8869, sdot:8901, lceil:8968, rceil:8969, lfloor:8970, rfloor:8971, lang:9001, rang:9002, loz:9674, spades:9824, clubs:9827, hearts:9829, diams:9830 };
|
||||
|
||||
exports.htmlVoidElements = "area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr".split(",");
|
||||
|
||||
|
||||
@@ -177,9 +177,11 @@ FramedEngine.prototype.fixHeight = function() {
|
||||
Focus the engine node
|
||||
*/
|
||||
FramedEngine.prototype.focus = function() {
|
||||
if(this.domNode.focus && this.domNode.select) {
|
||||
if(this.domNode.focus) {
|
||||
this.domNode.focus();
|
||||
this.domNode.select();
|
||||
}
|
||||
if(this.domNode.select) {
|
||||
$tw.utils.setSelectionByPosition(this.domNode,this.widget.editFocusSelectFromStart,this.widget.editFocusSelectFromEnd);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -119,10 +119,12 @@ SimpleEngine.prototype.fixHeight = function() {
|
||||
/*
|
||||
Focus the engine node
|
||||
*/
|
||||
SimpleEngine.prototype.focus = function() {
|
||||
if(this.domNode.focus && this.domNode.select) {
|
||||
SimpleEngine.prototype.focus = function() {
|
||||
if(this.domNode.focus) {
|
||||
this.domNode.focus();
|
||||
this.domNode.select();
|
||||
}
|
||||
if(this.domNode.select) {
|
||||
$tw.utils.setSelectionByPosition(this.domNode,this.widget.editFocusSelectFromStart,this.widget.editFocusSelectFromEnd);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -180,6 +180,8 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) {
|
||||
this.editMinHeight = this.getAttribute("minHeight",DEFAULT_MIN_TEXT_AREA_HEIGHT);
|
||||
this.editFocusPopup = this.getAttribute("focusPopup");
|
||||
this.editFocus = this.getAttribute("focus");
|
||||
this.editFocusSelectFromStart = $tw.utils.parseNumber(this.getAttribute("focusSelectFromStart","0"));
|
||||
this.editFocusSelectFromEnd = $tw.utils.parseNumber(this.getAttribute("focusSelectFromEnd","0"));
|
||||
this.editTabIndex = this.getAttribute("tabindex");
|
||||
this.editCancelPopups = this.getAttribute("cancelPopups","") === "yes";
|
||||
this.editInputActions = this.getAttribute("inputActions");
|
||||
@@ -218,7 +220,7 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) {
|
||||
EditTextWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes();
|
||||
// Completely rerender if any of our attributes have changed
|
||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.placeholder || changedAttributes.size || changedAttributes.autoHeight || changedAttributes.minHeight || changedAttributes.focusPopup || changedAttributes.rows || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || changedTiddlers[HEIGHT_MODE_TITLE] || changedTiddlers[ENABLE_TOOLBAR_TITLE] || changedAttributes.disabled || changedAttributes.fileDrop) {
|
||||
if(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes["default"] || changedAttributes["class"] || changedAttributes.placeholder || changedAttributes.size || changedAttributes.autoHeight || changedAttributes.minHeight || changedAttributes.focusPopup || changedAttributes.rows || changedAttributes.tabindex || changedAttributes.cancelPopups || changedAttributes.inputActions || changedAttributes.refreshTitle || changedAttributes.autocomplete || changedTiddlers[HEIGHT_MODE_TITLE] || changedTiddlers[ENABLE_TOOLBAR_TITLE] || changedTiddlers["$:/palette"] || changedAttributes.disabled || changedAttributes.fileDrop) {
|
||||
this.refreshSelf();
|
||||
return true;
|
||||
} else if (changedTiddlers[this.editRefreshTitle]) {
|
||||
|
||||
@@ -16,6 +16,22 @@ Filter operator for applying decodeURIComponent() to each item.
|
||||
Export our filter functions
|
||||
*/
|
||||
|
||||
exports.decodebase64 = function(source,operator,options) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
results.push($tw.utils.base64Decode(title));
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
exports.encodebase64 = function(source,operator,options) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
results.push($tw.utils.base64Encode(title));
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
exports.decodeuricomponent = function(source,operator,options) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
|
||||
@@ -74,6 +74,113 @@ exports.join = makeStringReducingOperator(
|
||||
},null
|
||||
);
|
||||
|
||||
var dmp = require("$:/core/modules/utils/diff-match-patch/diff_match_patch.js");
|
||||
|
||||
exports.levenshtein = makeStringBinaryOperator(
|
||||
function(a,b) {
|
||||
var dmpObject = new dmp.diff_match_patch(),
|
||||
diffs = dmpObject.diff_main(a,b);
|
||||
return [dmpObject.diff_levenshtein(diffs) + ""];
|
||||
}
|
||||
);
|
||||
|
||||
// these two functions are adapted from https://github.com/google/diff-match-patch/wiki/Line-or-Word-Diffs
|
||||
function diffLineWordMode(text1,text2,mode) {
|
||||
var dmpObject = new dmp.diff_match_patch();
|
||||
var a = diffPartsToChars(text1,text2,mode);
|
||||
var lineText1 = a.chars1;
|
||||
var lineText2 = a.chars2;
|
||||
var lineArray = a.lineArray;
|
||||
var diffs = dmpObject.diff_main(lineText1,lineText2,false);
|
||||
dmpObject.diff_charsToLines_(diffs,lineArray);
|
||||
return diffs;
|
||||
}
|
||||
|
||||
function diffPartsToChars(text1,text2,mode) {
|
||||
var lineArray = [];
|
||||
var lineHash = {};
|
||||
lineArray[0] = '';
|
||||
|
||||
function diff_linesToPartsMunge_(text,mode) {
|
||||
var chars = '';
|
||||
var lineStart = 0;
|
||||
var lineEnd = -1;
|
||||
var lineArrayLength = lineArray.length,
|
||||
regexpResult;
|
||||
var searchRegexp = /\W+/g;
|
||||
while(lineEnd < text.length - 1) {
|
||||
if(mode === "words") {
|
||||
regexpResult = searchRegexp.exec(text);
|
||||
lineEnd = searchRegexp.lastIndex;
|
||||
if(regexpResult === null) {
|
||||
lineEnd = text.length;
|
||||
}
|
||||
lineEnd = --lineEnd;
|
||||
} else {
|
||||
lineEnd = text.indexOf('\n', lineStart);
|
||||
if(lineEnd == -1) {
|
||||
lineEnd = text.length - 1;
|
||||
}
|
||||
}
|
||||
var line = text.substring(lineStart, lineEnd + 1);
|
||||
|
||||
if(lineHash.hasOwnProperty ? lineHash.hasOwnProperty(line) : (lineHash[line] !== undefined)) {
|
||||
chars += String.fromCharCode(lineHash[line]);
|
||||
} else {
|
||||
if (lineArrayLength == maxLines) {
|
||||
line = text.substring(lineStart);
|
||||
lineEnd = text.length;
|
||||
}
|
||||
chars += String.fromCharCode(lineArrayLength);
|
||||
lineHash[line] = lineArrayLength;
|
||||
lineArray[lineArrayLength++] = line;
|
||||
}
|
||||
lineStart = lineEnd + 1;
|
||||
}
|
||||
return chars;
|
||||
}
|
||||
var maxLines = 40000;
|
||||
var chars1 = diff_linesToPartsMunge_(text1,mode);
|
||||
maxLines = 65535;
|
||||
var chars2 = diff_linesToPartsMunge_(text2,mode);
|
||||
return {chars1: chars1, chars2: chars2, lineArray: lineArray};
|
||||
};
|
||||
|
||||
exports.makepatches = function(source,operator,options) {
|
||||
var dmpObject = new dmp.diff_match_patch(),
|
||||
suffix = operator.suffix || "",
|
||||
result = [];
|
||||
|
||||
source(function(tiddler,title) {
|
||||
var diffs, patches;
|
||||
if(suffix === "lines" || suffix === "words") {
|
||||
diffs = diffLineWordMode(title,operator.operand,suffix);
|
||||
patches = dmpObject.patch_make(title,diffs);
|
||||
} else {
|
||||
patches = dmpObject.patch_make(title,operator.operand);
|
||||
}
|
||||
Array.prototype.push.apply(result,[dmpObject.patch_toText(patches)]);
|
||||
});
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
exports.applypatches = makeStringBinaryOperator(
|
||||
function(a,b) {
|
||||
var dmpObject = new dmp.diff_match_patch(),
|
||||
patches;
|
||||
try {
|
||||
patches = dmpObject.patch_fromText(b);
|
||||
} catch(e) {
|
||||
}
|
||||
if(patches) {
|
||||
return [dmpObject.patch_apply(patches,a)[0]];
|
||||
} else {
|
||||
return [a];
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
function makeStringBinaryOperator(fnCalc) {
|
||||
return function(source,operator,options) {
|
||||
var result = [];
|
||||
@@ -184,4 +291,4 @@ exports.charcode = function(source,operator,options) {
|
||||
return [chars.join("")];
|
||||
};
|
||||
|
||||
})();
|
||||
})();
|
||||
@@ -32,18 +32,18 @@ FieldIndexer.prototype.setMaxIndexedValueLength = function(length) {
|
||||
|
||||
FieldIndexer.prototype.addIndexMethods = function() {
|
||||
var self = this;
|
||||
// get all tiddlers, including those overwrite shadow tiddlers
|
||||
this.wiki.each.byField = function(name,value) {
|
||||
var titles = self.wiki.allTitles(),
|
||||
lookup = self.lookup(name,value);
|
||||
var lookup = self.lookup(name,value);
|
||||
return lookup && lookup.filter(function(title) {
|
||||
return titles.indexOf(title) !== -1;
|
||||
return self.wiki.tiddlerExists(title)
|
||||
});
|
||||
};
|
||||
// get shadow tiddlers, including shadow tiddlers that is overwritten
|
||||
this.wiki.eachShadow.byField = function(name,value) {
|
||||
var titles = self.wiki.allShadowTitles(),
|
||||
lookup = self.lookup(name,value);
|
||||
var lookup = self.lookup(name,value);
|
||||
return lookup && lookup.filter(function(title) {
|
||||
return titles.indexOf(title) !== -1;
|
||||
return self.wiki.isShadowTiddler(title)
|
||||
});
|
||||
};
|
||||
this.wiki.eachTiddlerPlusShadows.byField = function(name,value) {
|
||||
|
||||
@@ -58,7 +58,7 @@ exports.parse = function() {
|
||||
var reEnd;
|
||||
if(this.match[3]) {
|
||||
// If so, the end of the body is marked with \end
|
||||
reEnd = new RegExp("(\\r?\\n\\s*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[1]) + ")?(?:$|\\r?\\n))","mg");
|
||||
reEnd = new RegExp("(\\r?\\n[^\\S\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[1]) + ")?(?:$|\\r?\\n))","mg");
|
||||
} else {
|
||||
// Otherwise, the end of the definition is marked by the end of the line
|
||||
reEnd = /($|\r?\n)/mg;
|
||||
|
||||
@@ -87,13 +87,6 @@ exports.startup = function() {
|
||||
}
|
||||
});
|
||||
}
|
||||
// If we're being viewed on a data: URI then give instructions for how to save
|
||||
if(document.location.protocol === "data:") {
|
||||
$tw.rootWidget.dispatchEvent({
|
||||
type: "tm-modal",
|
||||
param: "$:/language/Modals/SaveInstructions"
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
@@ -17,6 +17,10 @@ var easing = "cubic-bezier(0.645, 0.045, 0.355, 1)"; // From http://easings.net/
|
||||
var ZoominListView = function(listWidget) {
|
||||
var self = this;
|
||||
this.listWidget = listWidget;
|
||||
this.textNodeLogger = new $tw.utils.Logger("zoomin story river view", {
|
||||
enable: true,
|
||||
colour: 'red'
|
||||
});
|
||||
// Get the index of the tiddler that is at the top of the history
|
||||
var history = this.listWidget.wiki.getTiddlerDataCached(this.listWidget.historyTitle,[]),
|
||||
targetTiddler;
|
||||
@@ -48,7 +52,10 @@ ZoominListView.prototype.navigateTo = function(historyInfo) {
|
||||
var listItemWidget = this.listWidget.children[listElementIndex],
|
||||
targetElement = listItemWidget.findFirstDomNode();
|
||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||
if(!targetElement) {
|
||||
return;
|
||||
} else if (targetElement.nodeType === Node.TEXT_NODE) {
|
||||
this.logTextNodeRoot(targetElement);
|
||||
return;
|
||||
}
|
||||
// Make the new tiddler be position absolute and visible so that we can measure it
|
||||
@@ -130,7 +137,10 @@ function findTitleDomNode(widget,targetClass) {
|
||||
ZoominListView.prototype.insert = function(widget) {
|
||||
var targetElement = widget.findFirstDomNode();
|
||||
// Abandon if the list entry isn't a DOM element (it might be a text node)
|
||||
if(!targetElement || targetElement.nodeType === Node.TEXT_NODE) {
|
||||
if(!targetElement) {
|
||||
return;
|
||||
} else if (targetElement.nodeType === Node.TEXT_NODE) {
|
||||
this.logTextNodeRoot(targetElement);
|
||||
return;
|
||||
}
|
||||
// Make the newly inserted node position absolute and hidden
|
||||
@@ -173,16 +183,21 @@ ZoominListView.prototype.remove = function(widget) {
|
||||
var toWidgetDomNode = toWidget && toWidget.findFirstDomNode();
|
||||
// Set up the tiddler we're moving back in
|
||||
if(toWidgetDomNode) {
|
||||
$tw.utils.addClass(toWidgetDomNode,"tc-storyview-zoomin-tiddler");
|
||||
$tw.utils.setStyle(toWidgetDomNode,[
|
||||
{display: "block"},
|
||||
{transformOrigin: "50% 50%"},
|
||||
{transform: "translateX(0px) translateY(0px) scale(10)"},
|
||||
{transition: $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms " + easing + ", opacity " + duration + "ms " + easing},
|
||||
{opacity: "0"},
|
||||
{zIndex: "500"}
|
||||
]);
|
||||
this.currentTiddlerDomNode = toWidgetDomNode;
|
||||
if (toWidgetDomNode.nodeType === Node.TEXT_NODE) {
|
||||
this.logTextNodeRoot(toWidgetDomNode);
|
||||
toWidgetDomNode = null;
|
||||
} else {
|
||||
$tw.utils.addClass(toWidgetDomNode,"tc-storyview-zoomin-tiddler");
|
||||
$tw.utils.setStyle(toWidgetDomNode,[
|
||||
{display: "block"},
|
||||
{transformOrigin: "50% 50%"},
|
||||
{transform: "translateX(0px) translateY(0px) scale(10)"},
|
||||
{transition: $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms " + easing + ", opacity " + duration + "ms " + easing},
|
||||
{opacity: "0"},
|
||||
{zIndex: "500"}
|
||||
]);
|
||||
this.currentTiddlerDomNode = toWidgetDomNode;
|
||||
}
|
||||
}
|
||||
// Animate them both
|
||||
// Force layout
|
||||
@@ -206,6 +221,10 @@ ZoominListView.prototype.remove = function(widget) {
|
||||
return true; // Indicate that we'll delete the DOM node
|
||||
};
|
||||
|
||||
ZoominListView.prototype.logTextNodeRoot = function(node) {
|
||||
this.textNodeLogger.log($tw.language.getString("Error/ZoominTextNode") + " " + node.textContent);
|
||||
};
|
||||
|
||||
exports.zoomin = ZoominListView;
|
||||
|
||||
})();
|
||||
|
||||
@@ -28,6 +28,24 @@ exports.domMatchesSelector = function(node,selector) {
|
||||
return node.matches ? node.matches(selector) : node.msMatchesSelector(selector);
|
||||
};
|
||||
|
||||
/*
|
||||
Select text in a an input or textarea (setSelectionRange crashes on certain input types)
|
||||
*/
|
||||
exports.setSelectionRangeSafe = function(node,start,end,direction) {
|
||||
try {
|
||||
node.setSelectionRange(start,end,direction);
|
||||
} catch(e) {
|
||||
node.select();
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Select the text in an input or textarea by position
|
||||
*/
|
||||
exports.setSelectionByPosition = function(node,selectFromStart,selectFromEnd) {
|
||||
$tw.utils.setSelectionRangeSafe(node,selectFromStart,node.value.length - selectFromEnd);
|
||||
};
|
||||
|
||||
exports.removeChildren = function(node) {
|
||||
while(node.hasChildNodes()) {
|
||||
node.removeChild(node.firstChild);
|
||||
|
||||
@@ -238,7 +238,7 @@ exports.generateTiddlerFileInfo = function(tiddler,options) {
|
||||
} else {
|
||||
// Save as a .tid or a text/binary file plus a .meta file
|
||||
var tiddlerType = tiddler.fields.type || "text/vnd.tiddlywiki";
|
||||
if(tiddlerType === "text/vnd.tiddlywiki") {
|
||||
if(tiddlerType === "text/vnd.tiddlywiki" || tiddler.hasField("_canonical_uri")) {
|
||||
// Save as a .tid file
|
||||
fileInfo.type = "application/x-tiddler";
|
||||
fileInfo.hasMetaFile = false;
|
||||
|
||||
@@ -259,7 +259,7 @@ DropZoneWidget.prototype.handlePasteEvent = function(event) {
|
||||
}
|
||||
};
|
||||
// Let the browser handle it if we're in a textarea or input box
|
||||
if(["TEXTAREA","INPUT"].indexOf(event.target.tagName) == -1 && !event.target.isContentEditable) {
|
||||
if(["TEXTAREA","INPUT"].indexOf(event.target.tagName) == -1 && !event.target.isContentEditable && !event.twEditor) {
|
||||
var self = this,
|
||||
items = event.clipboardData.items;
|
||||
// Enumerate the clipboard items
|
||||
|
||||
@@ -46,6 +46,7 @@ GenesisWidget.prototype.execute = function() {
|
||||
this.genesisRemappable = this.getAttribute("$remappable","yes") === "yes";
|
||||
this.genesisNames = this.getAttribute("$names","");
|
||||
this.genesisValues = this.getAttribute("$values","");
|
||||
this.genesisIsBlock = this.getAttribute("$mode",this.parseTreeNode.isBlock && "block") === "block";
|
||||
// Do not create a child widget if the $type attribute is missing or blank
|
||||
if(!this.genesisType) {
|
||||
this.makeChildWidgets(this.parseTreeNode.children);
|
||||
@@ -60,6 +61,7 @@ GenesisWidget.prototype.execute = function() {
|
||||
tag: nodeTag,
|
||||
attributes: {},
|
||||
orderedAttributes: [],
|
||||
isBlock: this.genesisIsBlock,
|
||||
children: this.parseTreeNode.children || [],
|
||||
isNotRemappable: !this.genesisRemappable
|
||||
}];
|
||||
|
||||
@@ -53,7 +53,9 @@ LetWidget.prototype.computeAttributes = function() {
|
||||
name = attribute.name;
|
||||
// Now that it's prepped, we're allowed to look this variable up
|
||||
// when defining later variables
|
||||
self.currentValueFor[name] = value;
|
||||
if(value !== undefined) {
|
||||
self.currentValueFor[name] = value;
|
||||
}
|
||||
});
|
||||
// Run through again, setting variables and looking for differences
|
||||
$tw.utils.each(this.currentValueFor,function(value,name) {
|
||||
|
||||
@@ -499,7 +499,8 @@ NavigatorWidget.prototype.handleImportTiddlersEvent = function(event) {
|
||||
// Get the tiddlers
|
||||
var tiddlers = $tw.utils.parseJSONSafe(event.param,[]);
|
||||
// Get the current $:/Import tiddler
|
||||
var importTitle = event.importTitle ? event.importTitle : IMPORT_TITLE,
|
||||
var paramObject = event.paramObject || {},
|
||||
importTitle = event.importTitle || paramObject.importTitle || IMPORT_TITLE,
|
||||
importTiddler = this.wiki.getTiddler(importTitle),
|
||||
importData = this.wiki.getTiddlerData(importTitle,{}),
|
||||
newFields = new Object({
|
||||
@@ -540,7 +541,7 @@ NavigatorWidget.prototype.handleImportTiddlersEvent = function(event) {
|
||||
newFields.text = JSON.stringify(importData,null,$tw.config.preferences.jsonSpaces);
|
||||
this.wiki.addTiddler(new $tw.Tiddler(importTiddler,newFields));
|
||||
// Update the story and history details
|
||||
var autoOpenOnImport = event.autoOpenOnImport ? event.autoOpenOnImport : this.getVariable("tv-auto-open-on-import");
|
||||
var autoOpenOnImport = event.autoOpenOnImport || paramObject.autoOpenOnImport || this.getVariable("tv-auto-open-on-import");
|
||||
if(autoOpenOnImport !== "no") {
|
||||
var storyList = this.getStoryList(),
|
||||
history = [];
|
||||
|
||||
@@ -14,6 +14,7 @@ extension: .html
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="generator" content="TiddlyWiki" />
|
||||
<meta name="tiddlywiki-version" content="{{$:/core/templates/version}}" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<link id="faviconLink" rel="shortcut icon" href="favicon.ico">
|
||||
<title>{{$:/core/wiki/title}}</title>
|
||||
|
||||
@@ -46,9 +46,7 @@ title: $:/core/ui/EditTemplate
|
||||
<$keyboard key="((cancel-edit-tiddler))" actions=<<cancel-delete-tiddler-actions "cancel">> tag="div">
|
||||
<$keyboard key="((save-tiddler))" actions=<<save-tiddler-actions>> tag="div">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" variable="listItem">
|
||||
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
|
||||
<$transclude tiddler=<<listItem>>/>
|
||||
</$set>
|
||||
</$list>
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
|
||||
@@ -7,6 +7,6 @@ $:/config/EditToolbarButtons/Visibility/$(listItem)$
|
||||
\whitespace trim
|
||||
<div class="tc-tiddler-title tc-tiddler-edit-title">
|
||||
<$view field="title"/>
|
||||
<span class="tc-tiddler-controls tc-titlebar"><$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$reveal type="nomatch" state=<<config-title>> text="hide"><$transclude tiddler=<<listItem>>/></$reveal></$list></span>
|
||||
<span class="tc-tiddler-controls tc-titlebar"><$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$let tv-config-toolbar-class={{{ [enlist<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]] +[join[ ]]}}}><$reveal type="nomatch" state=<<config-title>> text="hide"><$transclude tiddler=<<listItem>>/></$reveal></$let></$list></span>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/core/ui/Buttons/save-wiki
|
||||
tags: $:/tags/PageControls
|
||||
caption: {{$:/core/images/save-button}} {{$:/language/Buttons/SaveWiki/Caption}}
|
||||
caption: {{$:/core/images/save-button-dynamic}} {{$:/language/Buttons/SaveWiki/Caption}}
|
||||
description: {{$:/language/Buttons/SaveWiki/Hint}}
|
||||
|
||||
\whitespace trim
|
||||
@@ -10,7 +10,7 @@ description: {{$:/language/Buttons/SaveWiki/Hint}}
|
||||
</$wikify>
|
||||
<span class="tc-dirty-indicator">
|
||||
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
|
||||
{{$:/core/images/save-button}}
|
||||
{{$:/core/images/save-button-dynamic}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>match[yes]]">
|
||||
<span class="tc-btn-text">
|
||||
|
||||
@@ -6,7 +6,7 @@ description: {{$:/language/Buttons/NewHere/Hint}}
|
||||
\whitespace trim
|
||||
\define newHereActions()
|
||||
\whitespace trim
|
||||
<$set name="tags" filter="[<currentTiddler>] [{$:/config/NewTiddler/Tags}]">
|
||||
<$set name="tags" filter="[<currentTiddler>] [enlist{$:/config/NewTiddler/Tags}]">
|
||||
<$action-sendmessage $message="tm-new-tiddler" tags=<<tags>>/>
|
||||
</$set>
|
||||
\end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/config/OfficialPluginLibrary
|
||||
tags: $:/tags/PluginLibrary
|
||||
url: https://tiddlywiki.com/library/v5.2.6/index.html
|
||||
url: https://tiddlywiki.com/library/v5.2.8/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}}
|
||||
|
||||
{{$:/language/OfficialPluginLibrary/Hint}}
|
||||
|
||||
@@ -4,5 +4,5 @@ title: $:/snippets/download-wiki-button
|
||||
\whitespace trim
|
||||
<$button class="tc-btn-big-green">
|
||||
<$action-sendmessage $message="tm-download-file" $param="$:/core/save/all" filename="index.html"/>
|
||||
<<lingo Full/Caption>> {{$:/core/images/save-button}}
|
||||
<<lingo Full/Caption>> {{$:/core/images/save-button-dynamic}}
|
||||
</$button>
|
||||
@@ -1,11 +1,11 @@
|
||||
created: 20140923173639039
|
||||
creator: pmario
|
||||
modified: 20140924155046340
|
||||
modified: 20230307080008193
|
||||
modifier: pmario
|
||||
title: TaskManagement
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
In dieser Edition sind folgende Task Management Varianten beschreiben:
|
||||
In dieser Edition sind folgende Task Management Varianten beschrieben:
|
||||
|
||||
<<list-links filter:"[tag[TaskManagement]]">>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ color: #37d011
|
||||
created: 20140923104300415
|
||||
creator: pmario
|
||||
icon: $:/core/images/done-button
|
||||
modified: 20140923105208878
|
||||
modified: 20230307080039831
|
||||
modifier: ChrisK
|
||||
tags: done
|
||||
title: done
|
||||
@@ -12,5 +12,5 @@ Diese Tag wird verwendet um "Tasks" als erledigt zu markieren.
|
||||
|
||||
Siehe auch:
|
||||
|
||||
* [[Task Management]] .. Beispiel
|
||||
* [[Task Management|TaskManagement]] .. Beispiel
|
||||
* [[Tag Manager|$:/TagManager]] .. Zuweisung der Farben und Symbole
|
||||
@@ -0,0 +1,6 @@
|
||||
created: 20230307080413903
|
||||
modified: 20230307080417122
|
||||
title: Importieren von Tiddlern
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
https://tiddlywiki.com/#Importing%20Tiddlers
|
||||
@@ -1,11 +1,11 @@
|
||||
created: 20140918094051245
|
||||
creator: pmario
|
||||
modified: 20140918094948642
|
||||
modified: 20230307080301079
|
||||
modifier: pmario
|
||||
tags: Referenz
|
||||
title: Liste aller HowTo's
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Hier finden Sie eine Auflistung aller HowTo's
|
||||
Hier finden Sie eine Auflistung aller ~HowTo's
|
||||
|
||||
<<list-links "[tag[howto]]">>
|
||||
6
editions/de-AT/tiddlers/konzept/Tagging.tid
Normal file
6
editions/de-AT/tiddlers/konzept/Tagging.tid
Normal file
@@ -0,0 +1,6 @@
|
||||
created: 20230307081437974
|
||||
modified: 20230307081439303
|
||||
title: Tagging
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
https://tiddlywiki.com/#Tagging
|
||||
@@ -0,0 +1,6 @@
|
||||
created: 20230307080103029
|
||||
modified: 20230307080103029
|
||||
title: $:/themes/tiddlywiki/vanilla/options/sidebarlayout
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
fluid-fixed
|
||||
7
editions/de-AT/tiddlers/widgets/ListWidget.tid
Normal file
7
editions/de-AT/tiddlers/widgets/ListWidget.tid
Normal file
@@ -0,0 +1,7 @@
|
||||
created: 20230307081923415
|
||||
modified: 20230307081953759
|
||||
tags: Widgets
|
||||
title: ListWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
https://tiddlywiki.com/#ListWidget
|
||||
7
editions/de-AT/tiddlers/widgets/TranscludeWidget.tid
Normal file
7
editions/de-AT/tiddlers/widgets/TranscludeWidget.tid
Normal file
@@ -0,0 +1,7 @@
|
||||
created: 20230307082002353
|
||||
modified: 20230307082023207
|
||||
tags: Widgets
|
||||
title: TranscludeWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
https://tiddlywiki.com/#TranscludeWidget
|
||||
@@ -1,7 +1,7 @@
|
||||
caption: Bilder
|
||||
created: 20131205160221762
|
||||
creator: pmario
|
||||
modified: 20140921170652909
|
||||
modified: 20230307081713229
|
||||
modifier: pmario
|
||||
tags: WikiText
|
||||
title: Bilder in WikiText
|
||||
@@ -25,7 +25,7 @@ oder
|
||||
|
||||
Wenn die Bildquelle der Titel eines existierenden Tiddlers ist, dann wird dieser direkt angezeigt. Ansonsten wird die Quelle als URL angesehen und ein HTML `<img>` Element wird erzeugt. Das `src` Attribut wird auf die [[URL]] gesetzt.
|
||||
|
||||
Ein [[Tooltip]] kann ebenfalls angegeben werden:
|
||||
Ein Tooltip kann ebenfalls angegeben werden:
|
||||
|
||||
```
|
||||
[img[Ich bin der Tooltip text|Motovun Jack.jpg]]
|
||||
@@ -33,7 +33,7 @@ Ein [[Tooltip]] kann ebenfalls angegeben werden:
|
||||
|
||||
[img width=100 [Ich bin der Tooltip text|Motovun Jack.jpg]]
|
||||
|
||||
Attribute wie zB: CSS Klassen oder die Höhe und Breite können ebenfalls angegeben werden.
|
||||
Attribute wie z.B: CSS Klassen oder die Höhe und Breite können ebenfalls angegeben werden.
|
||||
|
||||
```
|
||||
[img width=64 [Motovun Jack.jpg]]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
caption: Makros
|
||||
created: 20131205160746466
|
||||
creator: pmario
|
||||
modified: 20140922124415476
|
||||
modified: 20230307080132949
|
||||
modifier: ChrisK
|
||||
tags: WikiText
|
||||
title: Makros in WikiText
|
||||
@@ -15,7 +15,7 @@ Hallo, Ich bin $name$ und lebe in $adresse$
|
||||
Hallo, Ich bin $name$ und würde gerne mal wieder nach $adresse$ fahren:)
|
||||
\end
|
||||
|
||||
!! Makros Definieren
|
||||
!! Makros definieren
|
||||
|
||||
!!! Für die Ungeduldigen
|
||||
|
||||
@@ -76,7 +76,7 @@ Für einzeilige Makros kann die `\end` Markierung entfallen!
|
||||
|
||||
* Makros können mit dem ImportVariablesWidget importiert werden. (Für geübte Anwender)
|
||||
|
||||
!! Makros Verwenden
|
||||
!! Makros verwenden
|
||||
|
||||
```
|
||||
<<meinErstesMakro>>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
created: 20230307081757660
|
||||
modified: 20230307081814992
|
||||
tags: WikiText
|
||||
title: Transclusion in WikiText
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
https://tiddlywiki.com/#Transclusion%20in%20WikiText
|
||||
@@ -1,5 +0,0 @@
|
||||
created: 20201222190149806
|
||||
list: [[Release 5.1.23]]
|
||||
modified: 20201222190149806
|
||||
title: $:/StoryList
|
||||
type: text/vnd.tiddlywiki
|
||||
60
editions/prerelease/tiddlers/Release 5.2.8.tid
Normal file
60
editions/prerelease/tiddlers/Release 5.2.8.tid
Normal file
@@ -0,0 +1,60 @@
|
||||
caption: 5.2.8
|
||||
created: 20230326093239710
|
||||
modified: 20230326093239710
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.2.8
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.7...master]]//
|
||||
|
||||
! Major Improvements
|
||||
|
||||
! Translation Improvements
|
||||
|
||||
Improvements to the following translations:
|
||||
|
||||
*
|
||||
|
||||
! Plugin Improvements
|
||||
|
||||
*
|
||||
|
||||
! Accessibility Improvements
|
||||
|
||||
*
|
||||
|
||||
! Usability Improvements
|
||||
|
||||
*
|
||||
|
||||
! Widget Improvements
|
||||
|
||||
*
|
||||
|
||||
! Filter improvements
|
||||
|
||||
*
|
||||
|
||||
! Hackability Improvements
|
||||
|
||||
*
|
||||
|
||||
! Bug Fixes
|
||||
|
||||
*
|
||||
|
||||
! Node.js Improvements
|
||||
|
||||
*
|
||||
|
||||
! Performance Improvements
|
||||
|
||||
*
|
||||
|
||||
! Acknowledgements
|
||||
|
||||
[[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki:
|
||||
|
||||
<<.contributors """
|
||||
|
||||
""">>
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/config/OfficialPluginLibrary
|
||||
tags: $:/tags/PluginLibrary
|
||||
url: https://tiddlywiki.com/prerelease/library/v5.2.6/index.html
|
||||
url: https://tiddlywiki.com/prerelease/library/v5.2.8/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}} (Prerelease)
|
||||
|
||||
The prerelease version of the official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team.
|
||||
|
||||
19
editions/test/tiddlers/tests/data/filters/Base64.tid
Normal file
19
editions/test/tiddlers/tests/data/filters/Base64.tid
Normal file
@@ -0,0 +1,19 @@
|
||||
title: Filters/Base64
|
||||
description: Test {encode|decode}base64 operators
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
(<$text text={{{ [[Jeremy1234]encodebase64[]] }}}/>)
|
||||
(<$text text={{{ [[]encodebase64[]] }}}/>)
|
||||
(<$text text={{{ [[SmVyZW15MTIzNA==]decodebase64[]] }}}/>)
|
||||
(<$text text={{{ [[]decodebase64[]] }}}/>)
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>(SmVyZW15MTIzNA==)
|
||||
()
|
||||
(Jeremy1234)
|
||||
()</p>
|
||||
@@ -0,0 +1,28 @@
|
||||
title: Filters/DiffMergePatch1
|
||||
description: Tests for diff-merge-patch derived operators
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
\define text1()
|
||||
the cat sat on the mat
|
||||
\end
|
||||
|
||||
\define text2()
|
||||
the hat saw in every category
|
||||
\end
|
||||
|
||||
<$text text={{{ [<text1>makepatches<text2>] }}}/>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>@@ -1,22 +1,29 @@
|
||||
the
|
||||
-c
|
||||
+h
|
||||
at sa
|
||||
-t on the mat
|
||||
+w in every category
|
||||
</p>
|
||||
@@ -0,0 +1,25 @@
|
||||
title: Filters/DiffMergePatch2
|
||||
description: Tests for diff-merge-patch derived operators
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
\define text1()
|
||||
the cat sat on the mat
|
||||
\end
|
||||
|
||||
\define text2()
|
||||
the hat saw in every category
|
||||
\end
|
||||
|
||||
<$let patches={{{ [<text1>makepatches<text2>] }}}>
|
||||
|
||||
<$text text={{{ [<text1>applypatches<patches>] }}}/>
|
||||
|
||||
</$let>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
the hat saw in every category
|
||||
@@ -0,0 +1,22 @@
|
||||
title: Filters/DiffMergePatch3
|
||||
description: Tests for diff-merge-patch derived operators
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
\define text1()
|
||||
the cat sat on the mat
|
||||
\end
|
||||
|
||||
\define patches()
|
||||
**NOT A VALID PATCH**
|
||||
\end
|
||||
|
||||
<$text text={{{ [<text1>applypatches<patches>] }}}/>
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
the cat sat on the mat
|
||||
30
editions/test/tiddlers/tests/data/genesis-widget/Block.tid
Normal file
30
editions/test/tiddlers/tests/data/genesis-widget/Block.tid
Normal file
@@ -0,0 +1,30 @@
|
||||
title: Genesis/Block
|
||||
description: genesis widget distinguishes between block and inline
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
<$genesis $type="$reveal" type=nomatch>
|
||||
|
||||
Block
|
||||
</$genesis>
|
||||
|
||||
<$genesis $type="$reveal" type=nomatch $mode=block>
|
||||
|
||||
Block forced block
|
||||
</$genesis>
|
||||
|
||||
<$genesis $type="$reveal" type=nomatch $mode=inline>
|
||||
|
||||
Block forced inline
|
||||
</$genesis>
|
||||
|
||||
<$genesis $type=$reveal type=nomatch>Inline</$genesis>
|
||||
<$genesis $type=$reveal type=nomatch $mode=block>Inline forced block</$genesis>
|
||||
<$genesis $type=$reveal type=nomatch $mode=inline>Inline forced inline</$genesis>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<div class=" tc-reveal"><p>Block</p></div><div class=" tc-reveal"><p>Block forced block</p></div><span class=" tc-reveal"><p>Block forced inline</p></span><p><span class=" tc-reveal">Inline</span><div class=" tc-reveal">Inline forced block</div><span class=" tc-reveal">Inline forced inline</span></p>
|
||||
@@ -0,0 +1,22 @@
|
||||
title: Macros/TrailingNewlines
|
||||
description: Trailing newlines in macros must not be dropped
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\define inner()
|
||||
Paragraph 1
|
||||
|
||||
Paragraph 2
|
||||
\end
|
||||
\define outer()
|
||||
<$macrocall $name=inner />
|
||||
|
||||
\end
|
||||
<<outer>>
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Paragraph 1</p><p>Paragraph 2</p>
|
||||
@@ -0,0 +1,35 @@
|
||||
title: Message/tm-import-tiddlers/CustomTitle
|
||||
description: tm-import-tiddlers message can import to a tiddler with a custom title
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
text: <$text text={{MyCustomTitle}}/>
|
||||
plugin-type: <$text text={{MyCustomTitle!!plugin-type}}/>
|
||||
~$:/StoryList: <$text text={{$:/StoryList!!list}}/>
|
||||
+
|
||||
title: Actions
|
||||
|
||||
<$navigator story="$:/StoryList">
|
||||
<$action-sendmessage
|
||||
$message="tm-import-tiddlers"
|
||||
$param='[{"title": "Elephants"}, {"title": "Eagles"}]'
|
||||
importTitle=MyCustomTitle/>
|
||||
</$navigator>
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>text: {
|
||||
"tiddlers": {
|
||||
"Elephants": {
|
||||
"title": "Elephants"
|
||||
},
|
||||
"Eagles": {
|
||||
"title": "Eagles"
|
||||
}
|
||||
}
|
||||
}
|
||||
plugin-type: import
|
||||
$:/StoryList: MyCustomTitle</p>
|
||||
@@ -0,0 +1,35 @@
|
||||
title: Message/tm-import-tiddlers/NoAutoOpen
|
||||
description: tm-import-tiddlers can import without automatically opening the import tiddler
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
text: <$text text={{$:/Import}}/>
|
||||
plugin-type: <$text text={{$:/Import!!plugin-type}}/>
|
||||
~$:/StoryList: <$text text={{$:/StoryList!!list}}/>
|
||||
+
|
||||
title: Actions
|
||||
|
||||
<$navigator story="$:/StoryList">
|
||||
<$action-sendmessage
|
||||
$message="tm-import-tiddlers"
|
||||
$param='[{"title": "Elephants"}, {"title": "Eagles"}]'
|
||||
autoOpenOnImport=no/>
|
||||
</$navigator>
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>text: {
|
||||
"tiddlers": {
|
||||
"Elephants": {
|
||||
"title": "Elephants"
|
||||
},
|
||||
"Eagles": {
|
||||
"title": "Eagles"
|
||||
}
|
||||
}
|
||||
}
|
||||
plugin-type: import
|
||||
$:/StoryList: </p>
|
||||
@@ -0,0 +1,36 @@
|
||||
title: Message/tm-import-tiddlers/NoAutoOpenViaVar
|
||||
description: tm-import-tiddlers can import and open based on tv-auto-open-on-import
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
text: <$text text={{$:/Import}}/>
|
||||
plugin-type: <$text text={{$:/Import!!plugin-type}}/>
|
||||
~$:/StoryList: <$text text={{$:/StoryList!!list}}/>
|
||||
+
|
||||
title: Actions
|
||||
|
||||
<$let tv-auto-open-on-import="no">
|
||||
<$navigator story="$:/StoryList">
|
||||
<$action-sendmessage
|
||||
$message="tm-import-tiddlers"
|
||||
$param='[{"title": "Elephants"}, {"title": "Eagles"}]'/>
|
||||
</$navigator>
|
||||
</$let>
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>text: {
|
||||
"tiddlers": {
|
||||
"Elephants": {
|
||||
"title": "Elephants"
|
||||
},
|
||||
"Eagles": {
|
||||
"title": "Eagles"
|
||||
}
|
||||
}
|
||||
}
|
||||
plugin-type: import
|
||||
$:/StoryList: </p>
|
||||
@@ -0,0 +1,34 @@
|
||||
title: Message/tm-import-tiddlers/default
|
||||
description: tm-import-tiddlers message by default should import to $:/Import and open the tiddler
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
text: <$text text={{$:/Import}}/>
|
||||
plugin-type: <$text text={{$:/Import!!plugin-type}}/>
|
||||
~$:/StoryList: <$text text={{$:/StoryList!!list}}/>
|
||||
+
|
||||
title: Actions
|
||||
|
||||
<$navigator story="$:/StoryList">
|
||||
<$action-sendmessage
|
||||
$message="tm-import-tiddlers"
|
||||
$param='[{"title": "Elephants"}, {"title": "Eagles"}]'/>
|
||||
</$navigator>
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>text: {
|
||||
"tiddlers": {
|
||||
"Elephants": {
|
||||
"title": "Elephants"
|
||||
},
|
||||
"Eagles": {
|
||||
"title": "Eagles"
|
||||
}
|
||||
}
|
||||
}
|
||||
plugin-type: import
|
||||
$:/StoryList: $:/Import</p>
|
||||
@@ -0,0 +1,15 @@
|
||||
title: Widgets/LetWidgetSelfReferences
|
||||
description: Test let widget self references
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
<$let default={{{ [[default]is[variable]then[aa]else[bb]] }}} >
|
||||
<<default>>
|
||||
</$let>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>bb</p>
|
||||
@@ -0,0 +1,15 @@
|
||||
title: Widgets/LetWidgetUndefinedVariable
|
||||
description: Test let widget undefined variable
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
<$let test1=<<test>> test2={{{ [<test1>] }}}>
|
||||
<<test2>>
|
||||
</$let>
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p></p>
|
||||
@@ -1071,6 +1071,20 @@ Tests the filtering mechanism.
|
||||
expect(wiki.filterTiddlers("[charcode[9],[10]]").join(" ")).toBe(String.fromCharCode(9) + String.fromCharCode(10));
|
||||
expect(wiki.filterTiddlers("[charcode[]]").join(" ")).toBe("");
|
||||
});
|
||||
|
||||
it("should handle the levenshtein operator", function() {
|
||||
expect(wiki.filterTiddlers("[[apple]levenshtein[apple]]").join(" ")).toBe("0");
|
||||
expect(wiki.filterTiddlers("[[apple]levenshtein[banana]]").join(" ")).toBe("9");
|
||||
expect(wiki.filterTiddlers("[[representation]levenshtein[misreprehensionisation]]").join(" ")).toBe("10");
|
||||
expect(wiki.filterTiddlers("[[the cat sat on the mat]levenshtein[the hat saw in every category]]").join(" ")).toBe("13");
|
||||
});
|
||||
|
||||
it("should handle the makepatches operator", function() {
|
||||
expect(wiki.filterTiddlers("[[apple]makepatches[apple]]").join(" ")).toBe("");
|
||||
expect(wiki.filterTiddlers("[[apple]makepatches[banana]]").join(" ")).toBe("@@ -1,5 +1,6 @@\n-apple\n+banana\n");
|
||||
expect(wiki.filterTiddlers("[[representation]makepatches[misreprehensionisation]]").join(" ")).toBe("@@ -1,13 +1,21 @@\n+mis\n repre\n-sent\n+hensionis\n atio\n");
|
||||
expect(wiki.filterTiddlers("[[the cat sat on the mat]makepatches[the hat saw in every category]]").join(" ")).toBe("@@ -1,22 +1,29 @@\n the \n-c\n+h\n at sa\n-t on the mat\n+w in every category\n");
|
||||
});
|
||||
|
||||
it("should parse filter variable parameters", function(){
|
||||
expect($tw.utils.parseFilterVariable("currentTiddler")).toEqual(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20150117190213631
|
||||
modified: 20201201154211507
|
||||
modified: 20230226144641763
|
||||
tags: Concepts
|
||||
title: Date Fields
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -21,6 +21,8 @@ Values of date fields are 17 or 18-character strings:
|
||||
|
||||
To avoid problems arising from differences of time zone, TiddlyWiki always uses [[UTC|https://en.wikipedia.org/wiki/Coordinated_Universal_Time]].
|
||||
|
||||
The [[DateFormat]] template for storage of dates in these fields is `[UTC]YYYY0MM0DD0hh0mm0ss0XXX`.
|
||||
|
||||
As an example, the <<.field created>> field of this tiddler has the value <<.value """<$view field="created"/>""">>.
|
||||
|
||||
Dates can be [[converted to other formats|DateFormat]] for display:
|
||||
|
||||
@@ -8,4 +8,4 @@ A JSON tiddler is a [[data tiddler|DataTiddlers]] containing a [[JSON|JavaScript
|
||||
|
||||
Its [[ContentType]] is `application/json`.
|
||||
|
||||
The [[history list|$:/HistoryList]] is an of a JSON tiddler.
|
||||
The [[history list|$:/HistoryList]] is an example of a JSON tiddler.
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
created: 20131205155227468
|
||||
modified: 20140919191220377
|
||||
modified: 20230303214711802
|
||||
tags: Concepts Reference
|
||||
title: WikiText
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
~WikiText is a concise, expressive way of typing a wide range of text formatting, hypertext and interactive features. It allows you to focus on writing without a complex user interface getting in the way. It is designed to be familiar for users of [[MarkDown|http://daringfireball.net/projects/markdown/]], but with more of a focus on linking and the interactive features.
|
||||
~WikiText is a concise, expressive way of typing a wide range of text formatting, hypertext and interactive features. It allows you to focus on writing without a complex user interface getting in the way. It is designed to be familiar for users of [[Markdown]] but with more of a focus on linking and the interactive features.
|
||||
|
||||
~WikiText can also be inserted to the text field using the [[Editor toolbar]].
|
||||
~WikiText can also be inserted to the text field using the [[Editor toolbar]] buttons.
|
||||
|
||||
See [[Formatting text in TiddlyWiki]] for an introduction to WikiText.
|
||||
See [[Formatting in WikiText]] and [[Formatting text in TiddlyWiki]] for an introduction to ~WikiText.
|
||||
|
||||
The following elements of WikiText syntax are built into the core:
|
||||
The following elements of ~WikiText syntax are built into the core:
|
||||
|
||||
<<list-links "[tag[WikiText]]">>
|
||||
<<list-links filter:"[tag[WikiText]]" class:"multi-columns">>
|
||||
|
||||
10
editions/tw5.com/tiddlers/definitions/Markdown.tid
Normal file
10
editions/tw5.com/tiddlers/definitions/Markdown.tid
Normal file
@@ -0,0 +1,10 @@
|
||||
created: 20220727090611178
|
||||
modified: 20220728191637376
|
||||
tags: Definitions
|
||||
title: Markdown
|
||||
|
||||
<<<
|
||||
Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).
|
||||
<<<https://daringfireball.net/projects/markdown/
|
||||
|
||||
~TiddlyWiki and Markdown share some formatting rules eg: [[inline code|Formatting in WikiText]] and [[code blocks|Code Blocks in WikiText]] but WikiText also offers advanced functions like [[transclusions|Transclusion in WikiText]] and [[macros|Macro Calls in WikiText]]
|
||||
@@ -1,12 +1,12 @@
|
||||
created: 20140418142957325
|
||||
modified: 20221121131150032
|
||||
modified: 20230226144359284
|
||||
tags: Features
|
||||
title: DateFormat
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The default representation of dates is a compact string such as `20211002153802059`. For example, the `created` and `modified` fields are stored like this.
|
||||
The default representation of dates is a compact string such as <<.value 20211002153802059>>. The associated template is `[UTC]YYYY0MM0DD0hh0mm0ss0XXX`. For example, the <<.field created>> and <<.field modified>> fields are stored like this.
|
||||
|
||||
The display format for this string can be controlled with a template. For example, transcluding the `modified` field automatically applies a template to display the date as `Sat Oct 02 2021 17:40:50 GMT+0200 (Central European Summer Time)`. A few widgets and filter operators allow you to manually specify a template, for example the ViewWidget:
|
||||
The display format for this string can be controlled with a template. For example, transcluding the <<.field modified>> field automatically applies a template to display the date as <<.value "Sat Oct 02 2021 17:40:50 GMT+0200 (Central European Summer Time)">>. A few widgets and filter operators allow you to manually specify a template, for example the ViewWidget:
|
||||
|
||||
`<$view field=modified format=date template="DDth mmm YYYY 0hh:0mm:0ss" />`
|
||||
|
||||
@@ -52,7 +52,7 @@ The date string is processed with the following substitutions:
|
||||
|
||||
Note that other text is passed through unchanged, allowing commas, colons or other separators to be used.
|
||||
|
||||
The `{era:BCE||CE}` notation can specify different strings for years that are negative, zero or positive. For example `{era:BC|Z|AD}` would display `BC` for negative years, `AD` for positive years, and `Z` for year zero.
|
||||
The `{era:BCE||CE}` notation can specify different strings for years that are negative, zero or positive. For example `{era:BC|Z|AD}` would display <<.value BC>> for negative years, <<.value AD>> for positive years, and <<.value Z>> for year zero.
|
||||
|
||||
! Examples
|
||||
|
||||
@@ -61,7 +61,7 @@ The `{era:BCE||CE}` notation can specify different strings for years that are ne
|
||||
|`DDth MMM \M\M\M YYYY` |16th February MMM 2011 |
|
||||
|`DDth mmm YYYY 0hh:0mm:0ss` |16th Feb 2011 11:38:42 |
|
||||
|
||||
!! Using `TIMESTAMP` to calculate time difference
|
||||
!! Using <<.value TIMESTAMP>> to calculate time difference
|
||||
|
||||
You can calculate the difference between two dates by doing the following:
|
||||
|
||||
@@ -71,8 +71,9 @@ You can calculate the difference between two dates by doing the following:
|
||||
|
||||
Here is an example of calculating the number of days that passed between creation and last modification of current tiddler:
|
||||
|
||||
* Fields `modified` and `created` contain their respective datetimes in the format `[UTC]YYYY0MM0DD0hh0mm0ssXXX` so convert them to timestamps
|
||||
* `86400000` is the number of milliseconds in a day (1000 * 60 * 60 * 24)
|
||||
* Convert the <<.field created>> and <<.field modified>> fields to timestamps
|
||||
* Divide their difference by <<.value 86400000>> which is the number of milliseconds in a day
|
||||
** 1000 milliseconds per second × 60 seconds per minute × 60 minutes per hour × 24 hours per day = 86,400,000 milliseconds per day
|
||||
|
||||
<$macrocall $name=".example" n="0" eg="""<$let
|
||||
timestamp-modified={{{ [{!!modified}format:date[TIMESTAMP]] }}}
|
||||
|
||||
15
editions/tw5.com/tiddlers/filters/applypatches Operator.tid
Normal file
15
editions/tw5.com/tiddlers/filters/applypatches Operator.tid
Normal file
@@ -0,0 +1,15 @@
|
||||
caption: applypatches
|
||||
created: 20230304154824762
|
||||
modified: 20230304154826621
|
||||
op-purpose: applies a set of patches to transform the input
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-parameter: a string containing patches from the [[makepatches Operator]]
|
||||
op-parameter-name: P
|
||||
op-output: the transformed input to which the patches <<.place P>> have been applied
|
||||
tags: [[Filter Operators]] [[String Operators]]
|
||||
title: applypatches Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.from-version "5.2.6">>
|
||||
|
||||
<<.operator-examples "makepatches and applypatches">>
|
||||
16
editions/tw5.com/tiddlers/filters/decodebase64 Operator.tid
Normal file
16
editions/tw5.com/tiddlers/filters/decodebase64 Operator.tid
Normal file
@@ -0,0 +1,16 @@
|
||||
caption: decodebase64
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: the input with base 64 decoding applied
|
||||
op-parameter:
|
||||
op-parameter-name:
|
||||
op-purpose: apply base 64 decoding to a string
|
||||
tags: [[Filter Operators]] [[String Operators]]
|
||||
title: decodebase64 Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
from-version: 5.2.6
|
||||
|
||||
See Mozilla Developer Network for details of [[base 64 encoding|https://developer.mozilla.org/en-US/docs/Glossary/Base64]]. TiddlyWiki uses [[library code from @nijikokun|https://gist.github.com/Nijikokun/5192472]] to handle the conversion.
|
||||
|
||||
The input strings must be base64 encoded. The output strings are binary data.
|
||||
|
||||
<<.operator-examples "decodebase64">>
|
||||
16
editions/tw5.com/tiddlers/filters/encodebase64 Operator.tid
Normal file
16
editions/tw5.com/tiddlers/filters/encodebase64 Operator.tid
Normal file
@@ -0,0 +1,16 @@
|
||||
caption: encodebase64
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: the input with base 64 encoding applied
|
||||
op-parameter:
|
||||
op-parameter-name:
|
||||
op-purpose: apply base 64 encoding to a string
|
||||
tags: [[Filter Operators]] [[String Operators]]
|
||||
title: encodebase64 Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
from-version: 5.2.6
|
||||
|
||||
See Mozilla Developer Network for details of [[base 64 encoding|https://developer.mozilla.org/en-US/docs/Glossary/Base64]]. TiddlyWiki uses [[library code from @nijikokun|https://gist.github.com/Nijikokun/5192472]] to handle the conversion.
|
||||
|
||||
The input strings are interpreted as binary data. The output strings are base64 encoded.
|
||||
|
||||
<<.operator-examples "encodebase64">>
|
||||
11
editions/tw5.com/tiddlers/filters/examples/Hamlet.tid
Normal file
11
editions/tw5.com/tiddlers/filters/examples/Hamlet.tid
Normal file
@@ -0,0 +1,11 @@
|
||||
created: 20230304161453213
|
||||
modified: 20230304162156826
|
||||
tags: [[Operator Examples]]
|
||||
title: Hamlet
|
||||
type: application/json
|
||||
|
||||
{
|
||||
"Shakespeare-old": "Hamlet: Do you see yonder cloud that's almost in shape of a camel?\nPolonius: By the mass, and 'tis like a camel, indeed.\nHamlet: Methinks it is like a weasel.\nPolonius: It is backed like a weasel.\nHamlet: Or like a whale?\nPolonius: Very like a whale.\n-- Shakespeare",
|
||||
"Shakespeare-new": "Hamlet: Do you see the cloud over there that's almost the shape of a camel?\nPolonius: By golly, it is like a camel, indeed.\nHamlet: I think it looks like a weasel.\nPolonius: It is shaped like a weasel.\nHamlet: Or like a whale?\nPolonius: It's totally like a whale.\n-- Shakespeare",
|
||||
"Trekkie-old": "Kirk: Do you see yonder cloud that's almost in shape of a Klingon?\nSpock: By the mass, and 'tis like a Klingon, indeed.\nKirk: Methinks it is like a Vulcan.\nSpock: It is backed like a Vulcan.\nKirk: Or like a Romulan?\nSpock: Very like a Romulan.\n-- Trekkie"
|
||||
}
|
||||
@@ -1,9 +1,22 @@
|
||||
created: 20150118134611000
|
||||
modified: 20150124201839000
|
||||
modified: 20230325163424379
|
||||
myfield:
|
||||
tags: [[get Operator]] [[Operator Examples]]
|
||||
title: get Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.operator-example 1 "[all[current]get[draft.of]]" "the title of the tiddler of which the current tiddler is a draft">>
|
||||
<<.operator-example 2 "[get[tags]]">>
|
||||
<<.operator-example 3 "[each[tags]get[tags]]">>
|
||||
|
||||
<<.operator-example 2 "[get[tags]]" "returns the tags of all tiddlers without de-duplication">>
|
||||
|
||||
<<.operator-example 3 "[get[tags]unique[]]" "returns the tags of all tiddlers with de-duplication">>
|
||||
|
||||
<<.tip """If a data tiddler contains a field with an empty value, the empty string is not appended to the results.""">>
|
||||
|
||||
<<.operator-example 4 "[all[current]get[myfield]]" "the empty value of field <<.field myfield>> is not returned by the <<.olink get>> operator">>
|
||||
|
||||
<<.operator-example 5 "[all[current]has:field[myfield]] :map[get[myfield]]" "also returns the empty string">>
|
||||
The above example works by first checking if the input title has the field <<.field myfield>> and then using the [[Map Filter Run Prefix]] to replace the title with their value of that field. If the input tiddler does not have the field, an empty <<.em selection>> is returned. The subsequent [[Map Filter Run Prefix]] outputs an empty <<.em string>> when its run returns an empty [[selection|Title Selection]] (because the field is empty).
|
||||
|
||||
<<.operator-example 6 "[all[tiddlers]] :filter[get[created]compare:date:lt{HelloThere!!created}]" "return all tiddlers that are older than [[HelloThere]]">>
|
||||
The above example demonstrates two different ways of accessing field values in filters: Use <<.olink get>> when the title is not known in advance as with the [[Filter Filter Run Prefix]] where <<.var currentTiddler>> is set to the current input title. Use a [[TextReference]] as an indirect [[Filter Parameter]] when the title is known.
|
||||
|
||||
@@ -1,8 +1,19 @@
|
||||
created: 20150203140000000
|
||||
modified: 20170608150301791
|
||||
modified: 20230325163543621
|
||||
tags: [[getindex Operator]] [[Operator Examples]]
|
||||
title: getindex Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.operator-example 1 "[[$:/palettes/Vanilla]getindex[background]]" "returns the value at index ''background'' of the [[DataTiddler|DataTiddlers]] [[$:/palettes/Vanilla]]">>
|
||||
<<.operator-example 2 "[all[shadows+tiddlers]tag[$:/tags/Palette]getindex[background]]" "returns all background colors defined in any of the ColourPalettes">>
|
||||
<<.operator-example 1 "[[$:/palettes/Vanilla]getindex[background]]" "returns the value of property <<.value background>> of the [[DataTiddler|DataTiddlers]] [[$:/palettes/Vanilla]]">>
|
||||
|
||||
<<.operator-example 2 "[all[shadows+tiddlers]tag[$:/tags/Palette]getindex[background]]" "returns all background colors defined in any of the ColourPalettes (notice the duplicates in the resulting list)">>
|
||||
|
||||
<<.tip """If a data tiddler contains a property with an empty value, the empty string is not appended to the results.""">>
|
||||
|
||||
<<.operator-example 3 "[[ListopsData]getindex[DataIndex]]" "the empty value of the property <<.field ~DataIndex>> in [[ListopsData]] is not returned by the <<.olink getindex>> operator">>
|
||||
|
||||
<<.operator-example 4 "[[ListopsData]has:index[DataIndex]] :map[getindex[DataIndex]]" "also returns the empty string">>
|
||||
The above example works by first checking if the input title has the property <<.field ~DataIndex>> and then using the [[Map Filter Run Prefix]] to replace the title with their value of that property. If the input tiddler does not have the property, an empty <<.em selection>> is returned. The subsequent [[Map Filter Run Prefix]] outputs an empty <<.em string>> when its run returns an empty [[selection|Title Selection]] (because the property is empty).
|
||||
|
||||
<<.operator-example 5 "[[$:/palettes/Vanilla]indexes[]] :filter[[$:/palettes/Vanilla]getindex<currentTiddler>count[]compare:number:eq[0]]" "returns those colors in [[$:/palettes/Vanilla]] which are defined, but have no value assigned">>
|
||||
In the above example, <<.olink count>> is used to check if <<.olink getindex>> returns a result (i.e. the corresponding property has a value) or not.
|
||||
@@ -0,0 +1,21 @@
|
||||
created: 20230304183158728
|
||||
modified: 20230304183159654
|
||||
tags: [[levenshtein Operator]] [[Operator Examples]]
|
||||
title: levenshtein Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Determine the Levenshtein distance between two words:
|
||||
|
||||
<<.operator-example 1 "[[motel]levenshtein[money]]">>
|
||||
|
||||
List the 10 tiddler titles with the smallest Levenstein distance to "~TiddlyWiki":
|
||||
|
||||
<$macrocall $name='wikitext-example-without-html'
|
||||
src="""<ul>
|
||||
<$list filter="[all[tiddlers]!is[system]] :sort:number[levenshtein[TiddlyWiki]] :and[first[10]]">
|
||||
<li>
|
||||
<$link /> (<$text text={{{ [all[current]levenshtein[TiddlyWiki]] }}} />)
|
||||
</li>
|
||||
</$list>
|
||||
</ul>
|
||||
"""/>
|
||||
@@ -0,0 +1,43 @@
|
||||
created: 20230304160331362
|
||||
modified: 20230304160332927
|
||||
tags: [[makepatches Operator]] [[applypatches Operator]] [[Operator Examples]]
|
||||
title: makepatches and applypatches Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
These examples use the example texts in [[Hamlet]], taken from [[https://neil.fraser.name/software/diff_match_patch/demos/patch.html]]
|
||||
|
||||
|^!Shakespeare's original |@@white-space: pre-wrap;{{Hamlet##Shakespeare-old}}@@ |
|
||||
|^!Modern English |@@white-space: pre-wrap;{{Hamlet##Shakespeare-new}}@@ |
|
||||
|^!Trekkie's Copy |@@white-space: pre-wrap;{{Hamlet##Trekkie-old}}@@ |
|
||||
|
||||
<div class="doc-examples-hard-breaks">
|
||||
|
||||
Use `makepatches` to generate the set of patches to transform Shakepeare's original into Modern English:
|
||||
|
||||
<<.operator-example 1 "[{Hamlet##Shakespeare-old}makepatches{Hamlet##Shakespeare-new}]">>
|
||||
|
||||
Use `applypatches` to apply the patches to Shakespeare's original text:
|
||||
|
||||
<<.operator-example 2 "[{Hamlet##Shakespeare-old}makepatches{Hamlet##Shakespeare-new}] :map[{Hamlet##Shakespeare-old}applypatches<currentTiddler>]">>
|
||||
|
||||
In the above example, the [[Map Filter Run Prefix]] is used to pass the patches information as a parameter to `applypatches`. Inside `:map`, <<.value currentTiddler>> is set to the input title (i.e. the previously generated patches).
|
||||
|
||||
The patch information from the Shakepeare texts can also be used to transform the //Trekkie's Copy// to a Modern English version:
|
||||
|
||||
<<.operator-example 3 "[{Hamlet##Shakespeare-old}makepatches{Hamlet##Shakespeare-new}] :map[{Hamlet##Trekkie-old}applypatches<currentTiddler>]">>
|
||||
|
||||
The above examples used the character mode of `makepatches`. The `word` mode yields very similar results in this case, even when applied to the //Trekkie's Copy//.
|
||||
|
||||
<<.operator-example 4 "[{Hamlet##Shakespeare-old}makepatches:words{Hamlet##Shakespeare-new}]">>
|
||||
|
||||
<<.operator-example 5 "[{Hamlet##Shakespeare-old}makepatches:words{Hamlet##Shakespeare-new}] :map[{Hamlet##Trekkie-old}applypatches<currentTiddler>]">>
|
||||
|
||||
The `lines` mode doesn't work as well in this application:
|
||||
|
||||
<<.operator-example 6 "[{Hamlet##Shakespeare-old}makepatches:lines{Hamlet##Shakespeare-new}]">>
|
||||
|
||||
<<.operator-example 7 "[{Hamlet##Shakespeare-old}makepatches:lines{Hamlet##Shakespeare-new}] :map[{Hamlet##Trekkie-old}applypatches<currentTiddler>]">>
|
||||
|
||||
It is better suited as a very fast algorithm to detect line-wise incremental changes to texts and store only the changes instead of multiple versions of the whole texts.
|
||||
|
||||
</div>
|
||||
@@ -17,5 +17,5 @@ The regular expression `[0-9]{2}` matches two consecutive digits. Because it con
|
||||
<$macrocall
|
||||
$name="wikitext-example-without-html"
|
||||
src="""<$set name="digit-pattern" value="[0-9]{2}">
|
||||
<<list-links "[regexp:title<digit-pattern>]">>
|
||||
<<list-links "[regexp:title<digit-pattern>]" field:"title">>
|
||||
</$set>"""/>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
caption: get
|
||||
created: 20140426183123179
|
||||
modified: 20150203185001000
|
||||
modified: 20230309163844434
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: the values of field <<.place F>> in each of the input titles
|
||||
op-parameter: the name of a [[field|TiddlerFields]]
|
||||
op-parameter-name: F
|
||||
op-purpose: select all values of a field in the input titles
|
||||
tags: [[Filter Operators]] [[Field Operators]]
|
||||
title: get Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: get
|
||||
op-purpose: select all values of a field in the input titles
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-parameter: the name of a [[field|TiddlerFields]]
|
||||
op-parameter-name: F
|
||||
op-output: the values of field <<.place F>> in each of the input titles
|
||||
|
||||
Each input title is processed in turn. If the corresponding tiddler contains field <<.place F>>, and the value of this field is not empty, then its value is appended to the output.
|
||||
|
||||
Unlike most other [[Filter Operators]], the [[selection|Title Selection]] output by <<.op get>> can contain duplicates. To avoid duplicates, use `each[F]get[F]`.
|
||||
<<.tip "Unlike most other [[Filter Operators]], the [[selection|Title Selection]] output by <<.op get>> can contain duplicates. To avoid duplicates, use `get[F]unique[]`.">>
|
||||
|
||||
<<.operator-examples "get">>
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
caption: getindex
|
||||
created: 20150203140000000
|
||||
modified: 20150203140000000
|
||||
modified: 20230309163838670
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: the values of property <<.place P>> in each of the input titles
|
||||
op-parameter: the name of a [[property|DataTiddlers]]
|
||||
op-parameter-name: P
|
||||
op-purpose: select all values of a data property in the input titles
|
||||
tags: [[Filter Operators]] [[Field Operators]]
|
||||
title: getindex Operator
|
||||
caption: getindex
|
||||
op-purpose: select all values of a data property in the input titles
|
||||
|
||||
<$macrocall $name=".operator-def"
|
||||
input="a [[selection of titles|Title Selection]]"
|
||||
parameter="the name of a [[property|DataTiddlers]]"
|
||||
paramName="P"
|
||||
output="the values of property <<.place P>> in each of the input titles"
|
||||
/>
|
||||
Each input title is processed in turn, and is ignored if it does not denote a [[data tiddler|DataTiddlers]]. If the corresponding tiddler contains property <<.place P>>, and the value of this property is not empty, then its value is appended to the output.
|
||||
|
||||
Each input title is processed in turn, and is ignored if it does not denote a [[data tiddler|DataTiddlers]]. If the tiddler contains property <<.place P>>, the value of that property is [[dominantly appended|Dominant Append]] to the output.
|
||||
<<.tip "Unlike most other [[Filter Operators]], the [[selection|Title Selection]] output by <<.op getindex>> can contain duplicates. To avoid duplicates, use `getindex[P]unique[]`.">>
|
||||
|
||||
<<.operator-examples "getindex">>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
caption: has
|
||||
created: 20140410103123179
|
||||
modified: 20190518145446047
|
||||
modified: 20230306143207920
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-neg-output: ''without suffix''<br>» those input tiddlers in which field <<.place F>> does <<.em not>> exist or has an empty value<br>''suffix `field`''<br>» those input tiddlers in which field <<.place F>> does <<.em not>> exist<br>''suffix `index`''<br>» those input tiddlers in which index <<.place F>> does <<.em not>> exist
|
||||
op-output: ''without suffix''<br>» those input tiddlers in which field <<.place F>> has a non-empty value<br>''suffix `field`''<br>» those input tiddlers in which field <<.place F>> exists
|
||||
op-neg-output: ''without suffix''<br>» those input tiddlers in which field <<.place F>> does <<.em not>> exist or has an empty value<br>''suffix `field`''<br>» those input tiddlers in which field <<.place F>> does <<.em not>> exist<br>''suffix `index`''<br>» those input data tiddlers in which index <<.place F>> does <<.em not>> exist
|
||||
op-output: ''without suffix''<br>» those input tiddlers in which field <<.place F>> has a non-empty value<br>''suffix `field`''<br>» those input tiddlers in which field <<.place F>> exists<br>''suffix `index`''<br>» those input data tiddlers in which index <<.place F>> exists
|
||||
op-parameter: the name of a [[field|TiddlerFields]]<br>''suffix `index`''<br>» those input tiddlers in which index <<.place F>> exists
|
||||
op-parameter: the name of a [[field|TiddlerFields]] or, optionally an [[index|TextReference]]
|
||||
op-parameter-name: F
|
||||
|
||||
17
editions/tw5.com/tiddlers/filters/levenshtein Operator.tid
Normal file
17
editions/tw5.com/tiddlers/filters/levenshtein Operator.tid
Normal file
@@ -0,0 +1,17 @@
|
||||
caption: levenshtein
|
||||
created: 20230304181639768
|
||||
modified: 20230304181642365
|
||||
op-purpose: determine the Levenshtein distance of the input title(s) and a given string
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-parameter: a string
|
||||
op-parameter-name: S
|
||||
op-output: the Levenshtein distance between the input title(s) and <<.place S>>
|
||||
tags: [[Filter Operators]] [[String Operators]]
|
||||
title: levenshtein Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.from-version "5.2.6">>
|
||||
|
||||
The Levenshtein distance is a metric for measuring the difference between two strings. Informally, the Levenshtein distance between two strings is the //minimum// number of single-character edits required to change one string into the other.
|
||||
|
||||
<<.operator-examples "levenshtein">>
|
||||
23
editions/tw5.com/tiddlers/filters/makepatches Operator.tid
Normal file
23
editions/tw5.com/tiddlers/filters/makepatches Operator.tid
Normal file
@@ -0,0 +1,23 @@
|
||||
caption: makepatches
|
||||
created: 20230304122354967
|
||||
modified: 20230304122400128
|
||||
op-purpose: returns a set of patches that transform the input to a given string
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-parameter: a string of characters
|
||||
op-parameter-name: S
|
||||
op-output: a set of patch instructions per input title to be used by the [[applypatches Operator]] to transform the input title(s) into the string <<.place S>>
|
||||
op-suffix: `lines` to operate in line mode, `words` to operate in word mode. If omitted (default), the algorithm operates in character mode. See notes below.
|
||||
op-suffix-name: T
|
||||
tags: [[Filter Operators]] [[String Operators]]
|
||||
title: makepatches Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.from-version "5.2.6">>
|
||||
|
||||
The difference algorithm operates in character mode by default. This produces the most detailed diff possible. In `words` mode, each word in the input text is transformed into a meta-character, upon which the algorithm then operates. In the default character mode, the filter would find two patches between "ActionWidget" and "Action-Widgets" (the hyphen and the plural s), while in `words` mode, the whole word is found to be changed. In `lines` mode, the meta-character is formed from the whole line, delimited by newline characters, and is found to be changed independent of the number of changes within the line.
|
||||
|
||||
The different modes influence the result when the patches are applied to texts other than the original, as well as the runtime.
|
||||
|
||||
<<.tip "The calculation in `words` mode is roughly 10 times faster than the default character mode, while `lines` mode can be more than 100 times faster than the default.">>
|
||||
|
||||
<<.operator-examples "makepatches and applypatches">>
|
||||
@@ -1,6 +1,6 @@
|
||||
created: 20130822170200000
|
||||
list: [[A Gentle Guide to TiddlyWiki]] [[Discover TiddlyWiki]] [[Some of the things you can do with TiddlyWiki]] [[Ten reasons to switch to TiddlyWiki]] Examples [[What happened to the original TiddlyWiki?]]
|
||||
modified: 20221219184500440
|
||||
modified: 20230326083239710
|
||||
tags: TableOfContents
|
||||
title: HelloThere
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -33,29 +33,17 @@ Note the various places you need to indicate the number of columns
|
||||
|
||||
```
|
||||
@@.fourcolumns
|
||||
<$list filter="[tag[Filter Operators]]" variable="foo"><br>
|
||||
<<foo>>
|
||||
<$list filter="[tag[Filter Operators]]" variable="foo">
|
||||
<<foo>><br>
|
||||
</$list>
|
||||
@@
|
||||
```
|
||||
|
||||
!! Example showing partial list of filter operators
|
||||
|
||||
<style>
|
||||
.fourcolumns {
|
||||
display:block;
|
||||
column-count:4;
|
||||
column-gap:1em;
|
||||
-moz-column-count:4;
|
||||
-moz-column-gap:1em;
|
||||
-webkit-column-count: 4;
|
||||
-webkit-column-gap:1em;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@.fourcolumns
|
||||
<$list filter="[tag[Filter Operators]limit[24]]" variable="foo"><br>
|
||||
<<foo>>
|
||||
<$list filter="[tag[Filter Operators]limit[24]]" variable="foo">
|
||||
<<foo>><br>
|
||||
</$list>
|
||||
@@
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ type: text/vnd.tiddlywiki
|
||||
Here's how to display the last modification date of a wiki in a banner in the corner of the window:
|
||||
|
||||
# [[Install the plugin|Installing a plugin from the plugin library]] <<.def "Corner ribbon">> in your ~TiddlyWiki
|
||||
# Save (<<.icon $:/core/images/save-button>>) and reload (<<.icon $:/core/images/refresh-button>>) your wiki
|
||||
# Save (<<.icon $:/core/images/save-button-dynamic>>) and reload (<<.icon $:/core/images/refresh-button>>) your wiki
|
||||
# Create a new tiddler called [[$:/_MyRibbon]] tagged [[$:/tags/PageControls]] and containing:<div>
|
||||
|
||||
```
|
||||
|
||||
@@ -27,7 +27,7 @@ This process will work on most desktop browsers. Note that none of your personal
|
||||
#* If the file is encrypted you will be prompted for the password
|
||||
# Review the list of tiddlers that will be upgraded
|
||||
# Click ''Upgrade''
|
||||
# Save changes to save the new version (<<.icon $:/core/images/save-button>>)
|
||||
# Save changes to save the new version (<<.icon $:/core/images/save-button-dynamic>>)
|
||||
|
||||
This will download a file called ''upgrade.html'' to your computer. This file is the upgrade of your old file. You may need to open the location where ''upgrade.html'' was downloaded, rename ''upgrade.html'' with the name of the old file you are upgrading, and replace the old file by moving the new file in its place.
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 80 KiB |
@@ -6,7 +6,7 @@ type: text/vnd.tiddlywiki
|
||||
|
||||
Making lists of items plays a central role in working with TiddlyWiki. The following is a brief run-through of some of the more common techniques.
|
||||
|
||||
~TiddlyWiki [[uses|The Extended Listops Filters]] lists [[internally|ListField]] for many purposes so the word can have several meanings. Here we are concerned with displaying sequences of items, but not necessarily presented as a conventional bullet list.
|
||||
~TiddlyWiki [[uses|Extended Listops Filters]] lists [[internally|ListField]] for many purposes so the word can have several meanings. Here we are concerned with displaying sequences of items, but not necessarily presented as a conventional bullet list.
|
||||
|
||||
! Manually Typed Lists
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Note: Each first [[step|Filter Step]] of a [[filter run|Filter Run]] not given a
|
||||
|
||||
;filter
|
||||
: A [[filter|Filters]] selecting which tiddlers to include
|
||||
;caption
|
||||
;field
|
||||
: The name of the field to transclude for each list item, defaulting to `caption`
|
||||
;type
|
||||
: An HTML element to use for the overall list element, defaulting to `ul`
|
||||
|
||||
@@ -32,7 +32,7 @@ type: text/vnd.tiddlywiki
|
||||
## Visit http://127.0.0.1:8080/ in your browser
|
||||
## Try editing and creating tiddlers
|
||||
# Optionally, make an offline copy:
|
||||
#* click the <<.icon $:/core/images/save-button>> ''save changes'' button in the sidebar, ''OR''
|
||||
#* click the <<.icon $:/core/images/save-button-dynamic>> ''save changes'' button in the sidebar, ''OR''
|
||||
#* `tiddlywiki mynewwiki --build index`
|
||||
|
||||
The `-g` flag causes TiddlyWiki to be installed globally. Without it, TiddlyWiki will only be available in the directory where you installed it.
|
||||
|
||||
@@ -27,7 +27,7 @@ Follow these instructions when using TiddlyWiki as a standalone, single file wik
|
||||
|
||||
# Click the ''install'' button to install a plugin
|
||||
|
||||
# Save your TiddlyWiki <<.icon $:/core/images/save-button>>
|
||||
# Save your TiddlyWiki <<.icon $:/core/images/save-button-dynamic>>
|
||||
|
||||
# If a yellow warning bar appears at the top of the window, refresh the window so that TiddlyWiki completes installation of the plugin <<.icon $:/core/images/refresh-button>>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ If you want to follow the steps //side by side// you can <<open-external-window
|
||||
|
||||
# Import the new plugin shown in the $:/Import tiddler
|
||||
|
||||
# Save your TiddlyWiki (<<.icon $:/core/images/save-button>>)
|
||||
# Save your TiddlyWiki (<<.icon $:/core/images/save-button-dynamic>>)
|
||||
|
||||
# If a yellow warning bar appears at the top of the window, refresh the window so that TiddlyWiki completes installation of the plugin <<.icon $:/core/images/refresh-button>>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Follow these instructions when using TiddlyWiki as a standalone, single file wik
|
||||
|
||||
# Click the <<.icon $:/core/images/down-arrow>> ''more'' button and <<.icon $:/core/images/delete-button>> ''delete'' the tiddler
|
||||
|
||||
# Save your TiddlyWiki <<.icon $:/core/images/save-button>>
|
||||
# Save your TiddlyWiki <<.icon $:/core/images/save-button-dynamic>>
|
||||
|
||||
# If a yellow warning bar appears at the top of the window, refresh the window so that TiddlyWiki completely removes the plugin <<.icon $:/core/images/refresh-button>>
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ Prompted by the [[General Data Protection Regulation (GDPR)|https://en.wikipedia
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/3093]] problem with crash when dragging over TiddlyWiki on some browsers
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/3079]] issue with new journal button
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/3164]] problem with ''filter'' and ''value'' attributes of SetWidget
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/3190]] problem with numeric operands in the [[The Extended Listops Filters]]
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/3190]] problem with numeric operands in the [[Extended Listops Filters]]
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/commit/df1f7e9798b5f6c3d2c3fd82e438cbc9713ade04]] problem with "put" saver and 412 return codes
|
||||
* [[Fixed|https://github.com/Jermolene/TiddlyWiki5/pull/3048]] problem with variable references in field values in the edit template
|
||||
* [[Extended|https://github.com/Jermolene/TiddlyWiki5/pull/3219]] behaviour of list-after field so that the tiddler is placed at the end of the list if the list-after field is present but empty
|
||||
|
||||
@@ -1,39 +1,72 @@
|
||||
caption: 5.2.6
|
||||
created: 20230119221001957
|
||||
modified: 20230119221001957
|
||||
created: 20230320184352916
|
||||
modified: 20230320184352916
|
||||
released: 20230320184352916
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.2.6
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.5...master]]//
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.5...v5.2.6]]//
|
||||
|
||||
<<.banner-credits
|
||||
credit:"""Congratulations to [[StS|https://talk.tiddlywiki.org/u/StS]] for their winning design for the banner for this release (here is the [[competition thread|https://talk.tiddlywiki.org/t/new-release-banner-competition-for-tiddlywiki-v5-2-6/6403/3]] and the [[voting thread|https://talk.tiddlywiki.org/t/vote-for-the-tiddlywiki-banner-v5-2-6/6469]]).
|
||||
"""
|
||||
url:"https://raw.githubusercontent.com/Jermolene/TiddlyWiki5/3a2831870b4418b8b01d155b057db5b7485562c1/editions/tw5.com/tiddlers/images/New%20Release%20Banner.png"
|
||||
>>
|
||||
|
||||
! Major Improvements
|
||||
|
||||
!! Improved Markdown Plugin
|
||||
|
||||
* <<.link-badge-updated "https://github.com/Jermolene/TiddlyWiki5/pull/6528">> the [[Markdown Plugin]] to use the newer and better maintained [[markdown-it|https://github.com/markdown-it/markdown-it]] library. The previous Markdown plugin remains available as "markdown-legacy"
|
||||
|
||||
!! Better Handling of Loss of Network Connectivity with Client Server Configuration
|
||||
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7169">> integration between the [[BrowserStorage Plugin]] and the client-server configuration to allow changes to be made while offline and then later resynchronised with the server
|
||||
|
||||
!! New Diff-Match-Patch Primitives
|
||||
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7290">> three new operators exposing previously hidden features of the [[Diff-Match-Patch|https://neil.fraser.name/software/diff_match_patch]] library that is integrated with TiddlyWiki:
|
||||
** new [[levenshtein Operator]] to calculate the similarity of two strings as the number of characters that need to be inserted, deleted or modified in order to turn one into the other
|
||||
** new [[makepatches Operator]] and [[applypatches Operator]] that can be used to make and apply patches that represent the difference between two different texts. See the [[examples|makepatches and applypatches Operator (Examples)]]
|
||||
|
||||
! Translation Improvements
|
||||
|
||||
Improvements to the following translations:
|
||||
|
||||
* Chinese
|
||||
* German
|
||||
* Italian
|
||||
* Polish
|
||||
|
||||
! Plugin Improvements
|
||||
|
||||
* <<.link-badge-updated "https://github.com/Jermolene/TiddlyWiki5/pull/6528">> the [[Markdown Plugin]] to use the newer and better maintained [[markdown-it|https://github.com/markdown-it/markdown-it]] library. The previous Markdown plugin remains available as "markdown-legacy"
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7176">> [[Innerwiki Plugin]] to allow the `<$data>` widget to override existing tiddler fields
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7207">>, <<.link-badge-here "https://github.com/Jermolene/TiddlyWiki5/commit/c39ef398bffae12c0ed7324d9b6d9d29f0f2f9ff">> and <<.link-badge-here "https://github.com/Jermolene/TiddlyWiki5/commit/8f7441f296351a4dd0852c3c782f8874d398e052">> problem preventing [[Share Plugin]] from working properly
|
||||
* <<.link-badge-updated "https://github.com/Jermolene/TiddlyWiki5/commit/524cee1489f260375cac8cfe878fdc5942a4596e">> [[XLSX Plugin|XLSX Utilities Edition]] to handle importing numeric fields
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/81f514116657d0d567be7a4c45762a85beaa8bc0">> Dynannotate plugin crash when using the fake DOM used for static rendering
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7281">> bug where pasting text into the CodeMirror editor also opened an `$:/Import` tiddler
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7334">> documentation for the [[Railroad Plugin]]
|
||||
|
||||
! Accessibility Improvements
|
||||
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7232">> appearance of save wiki button so that it is accessible to users without colour vision
|
||||
|
||||
! Usability Improvements
|
||||
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7217">> consistency of tiddler deletion by allowing missing tiddlers to be 'deleted', which just results in them being closed
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/commit/34643a42790777f1b235f57b5093bb29bd0b3a14">> layout switcher to include an optional icon for each layout
|
||||
* <<.link-badge-removed "https://github.com/Jermolene/TiddlyWiki5/commit/c0615e20ecf7d5d5e66d8a2acd28b80e8d59688d">> [[improvements to table layout|https://github.com/Jermolene/TiddlyWiki5/pull/7010]] from v5.2.5 that have proved to not be backwards compatible
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7323">> support for `$` HTML entity
|
||||
|
||||
! Widget Improvements
|
||||
|
||||
*
|
||||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/7222">> EditTextWidget to support `focusSelectFromStart` and `focusSelectFromEnd` attributes to give better control over text selection
|
||||
|
||||
! Filter improvements
|
||||
|
||||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/pull/7121">> [[encodeuricomponent Operator]] to encode characters such as `*` that are illegal in Windows filenames
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/commit/89fd8871b6217634c9896b9402069757ca5ea189">> [[encodebase64 Operator]] and [[decodebase64 Operator]]
|
||||
|
||||
! Hackability Improvements
|
||||
|
||||
@@ -41,6 +74,7 @@ Improvements to the following translations:
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7118">> readability of [[tag-picker Macro]] and [[keyboard-driven-input Macro]]
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7129">> reliability of [[list-links-draggable Macro]] and [[list-tagged-draggable Macro]] by using the new GenesisWidget instead of textual substitution
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7210">> [[external JavaScript core support|Using the external JavaScript template]] to make it possible to save an external JS wiki as a standard single file wiki
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7007">> a warning message in the browser console when the Zoomin storyview fails due to the tiddler view template lacking a single containing element
|
||||
|
||||
! Bug Fixes
|
||||
|
||||
@@ -50,43 +84,60 @@ Improvements to the following translations:
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7121">> (and <<.link-badge-here "https://github.com/Jermolene/TiddlyWiki5/pull/7219">>) overriding `toc-caption` macro for [[Table-of-Contents Macros]]
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7212">> rendering of $:/core/ui/MoreSideBar/Tags when viewed within the story river
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7156">> undefined variable crash in [[reduce Operator]], [[filter Operator]] and [[sortsub Operator]]
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7153">> GenesisWidget not to create anything if the `$type` attribute is blank or missing
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/issues/7153">> GenesisWidget not to create anything if the `$type` attribute is blank or missing
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7230">> GenesisWidget to pass `isBlock` flag to the generated widget
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7160">> crash using [[jsonget Operator]] with "fixed" as key name
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/0b39e47ce88c7620b7a66c1553a71efaff06edb9">> importing of MP3 files to match current browser implementations
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7122">> crash when attempting to create an element with a blank tag name
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7224">> layout issue with "save tiddler" button
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/3d0ec5b1bdc157f87d65b8c9b76e681c14337eb4">> (and <<.link-badge-here "https://github.com/Jermolene/TiddlyWiki5/commit/4e5c957e975459350cd7df3038e5fb3c7aea859f">>) handling of whitespace in lists to cover all Unicode whitespace characters
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7228">> test spacing of parser rule checkboxes in control panel
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/f249b79e81e51d48364ea8147fe27850df9f577f">> CSS classes assigned to edit toolbar buttons
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7247">> usage of broken CSS class `tc-storyview-zoomin-tiddler` in Zoomin story view
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7243">> usage of `importTitle` and `autoOpenOnImport` options for [[WidgetMessage: tm-import-tiddlers]]
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7276">> fixed text editor refresh when the palette is changed
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7270">> crash with LetWidget when referencing a variable that exists but has an undefined value
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7354">> unwanted double braces around tags specified in $:/config/NewTiddler/Tags when using "new here" button
|
||||
|
||||
! Node.js Improvements
|
||||
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7169">> integration between the [[BrowserStorage Plugin]] and the client-server configuration to allow changes to be made while offline and then later resynchronised with the server
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7130">> duplicate fields in internal templates used in client-server configuration
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7138">> lazy loading not triggering a sync from the server
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/bf8e1ca5b0587787bf80692b0213bb7b038c7868">> crash on creating a new tiddler if anonymous users manage to create syncable tiddlers in a read only wiki
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/commit/95e61688397ff1bc9be04193bc4ce2e3c8c48dce">> handling of logout in the client-server configuration to avoid 404 errors
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/issues/7238">> problem with saving tiddlers with `_canonical_uri` field as `.tid` files
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/6953">> missing meta viewport to static river template
|
||||
|
||||
! Performance Improvements
|
||||
|
||||
*
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7299">> field indexer to more efficiently process lookups
|
||||
|
||||
! Acknowledgements
|
||||
|
||||
[[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki:
|
||||
|
||||
<<.contributors """
|
||||
andrigamerita
|
||||
AnthonyMuscio
|
||||
BramChen
|
||||
btheado
|
||||
cdruan
|
||||
CrossEye
|
||||
cs8425
|
||||
EvidentlyCube
|
||||
fkmiec
|
||||
flibbles
|
||||
GameDungeon
|
||||
hffqyd
|
||||
jeffrey4l
|
||||
joebordes
|
||||
kookma
|
||||
linonetwo
|
||||
m42e
|
||||
Marxsal
|
||||
mateuszwilczek
|
||||
newmedicine
|
||||
michsa
|
||||
pippep
|
||||
pmario
|
||||
saqimtiaz
|
||||
@@ -94,4 +145,4 @@ Telumire
|
||||
twMat
|
||||
wincentbalin
|
||||
yaisog
|
||||
""">>
|
||||
""">>
|
||||
25
editions/tw5.com/tiddlers/releasenotes/Release 5.2.7.tid
Normal file
25
editions/tw5.com/tiddlers/releasenotes/Release 5.2.7.tid
Normal file
@@ -0,0 +1,25 @@
|
||||
caption: 5.2.7
|
||||
created: 20230326083239710
|
||||
modified: 20230326083239710
|
||||
released: 20230326083239710
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.2.7
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.6...v5.2.7]]//
|
||||
|
||||
<<.banner-credits
|
||||
credit:"""Congratulations to [[StS|https://talk.tiddlywiki.org/u/StS]] for their winning design for the banner for this release (here is the [[competition thread|https://talk.tiddlywiki.org/t/new-release-banner-competition-for-tiddlywiki-v5-2-6/6403/3]] and the [[voting thread|https://talk.tiddlywiki.org/t/vote-for-the-tiddlywiki-banner-v5-2-6/6469]]).
|
||||
"""
|
||||
url:"https://raw.githubusercontent.com/Jermolene/TiddlyWiki5/7926af85419ef2f813276a05833598d6d65e2ecd/editions/tw5.com/tiddlers/images/New%20Release%20Banner.png"
|
||||
>>
|
||||
|
||||
This is a bug fix release intended to resolve a backwards compatibility issue discovered in v5.2.6. See [[this GitHub ticket|https://github.com/Jermolene/TiddlyWiki5/issues/7371]] for the background.
|
||||
|
||||
The issue is that trailing newlines within a macro definitions were being ignored, which affected whether the content were parsed in inline or block mode.
|
||||
|
||||
Since v5.2.7 replaces v5.2.6 that was only released for less than a week, here is the [[release note for v5.2.6|Release 5.2.6]].
|
||||
|
||||
! Release Note for v5.2.6
|
||||
|
||||
{{Release 5.2.6}}
|
||||
@@ -17,7 +17,7 @@ Instructions for use:
|
||||
# Open Quine 2
|
||||
# Tap the + toolbar button to create and open a new TiddlyWiki
|
||||
# From the file list tap an existing TiddlyWiki file to open it
|
||||
# Edit the TiddlyWiki as normal, and save as normal using either Autosave or the TiddlyWiki save button <<.icon $:/core/images/save-button>>
|
||||
# Edit the TiddlyWiki as normal, and save as normal using either Autosave or the TiddlyWiki save button <<.icon $:/core/images/save-button-dynamic>>
|
||||
# Tap the left hand "Documents" toolbar button to close an open TiddlyWiki
|
||||
|
||||
*Quine 2 works natively in iOS with the local file system and the iCloud file system
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
caption: tw5-server
|
||||
color: #70c9a0
|
||||
community-author: hffqyd
|
||||
created: 20230302011710789
|
||||
delivery: Server-side Script
|
||||
description: Web server for saving and uploading
|
||||
method: save
|
||||
modified: 20230302055929311
|
||||
tags: Android Chrome Firefox [[Internet Explorer]] Linux Mac Opera Safari Saving Windows iOS Edge
|
||||
title: Saving via a Minimal Web Server
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
A local server for TiddlyWiki5 that saves and backups wikis, inspired by
|
||||
[[tw5-server.rb | https://gist.github.com/jimfoltz/ee791c1bdd30ce137bc23cce826096da]].
|
||||
|
||||
tw5-server provides features of:
|
||||
|
||||
* Server for TiddlyWiki5, as well as other files (e.g. images used in TW5 `[img[images/*.png]]`);
|
||||
* Easy to save wiki via browsers;
|
||||
* Backup wiki in compress format (.gz), to save disk space;
|
||||
* Auto clean backups: keep one newest per previous month, keep all backups in current month.
|
||||
* Upload files/images to server, for use in tiddlywiki as external links.
|
||||
* Offer binary executable for Linux, macos and windows.
|
||||
|
||||
Download executable script and binary at the github.com [[tw5-server|https://github.com/hffqyd/tw5-server]].
|
||||
|
||||
! Usage
|
||||
|
||||
```bash
|
||||
# python script:
|
||||
python tw5-server.py -p 8000 -d ./ -b backup_dir
|
||||
|
||||
# binary file:
|
||||
tw5server -a:192.168.0.10 -p:8000 -d:./ -b:backup
|
||||
|
||||
-h usage help
|
||||
-a address, defautl localhost
|
||||
-p port, default 8000
|
||||
-d directory to servering, default `current dir`
|
||||
-b backup directory name, default `backup`
|
||||
-l log saving messages to stdout
|
||||
|
||||
Backups auto-clean strategy:
|
||||
Keep all backups in current month, keep only the newest one for previous months.
|
||||
```
|
||||
|
||||
In Unix/Linux, just excute `./tw5-server.py` (with `chmod +x tw5-server.py`).
|
||||
|
||||
Then go to http://localhost:8000 (or other address:port specified in command) in your web browser, and click on your wiki html file.
|
||||
@@ -19,6 +19,6 @@ type: text/vnd.tiddlywiki
|
||||
# Choose to open the file in Firefox (rather than the default Android viewer)
|
||||
# Click ''OK'' in response to the prompt from TiddlyFox that asks whether to enable saving for this file
|
||||
# Try creating a new tiddler using the ''new tiddler'' <<.icon $:/core/images/new-button>> button in the sidebar. Type some content for the tiddler, and click the <<.icon $:/core/images/done-button>> ''ok'' button
|
||||
# Save your changes by clicking the <<.icon $:/core/images/save-button>> ''save changes'' button in the sidebar
|
||||
# Save your changes by clicking the <<.icon $:/core/images/save-button-dynamic>> ''save changes'' button in the sidebar
|
||||
#* Look for the yellow notification ''Saved wiki'' at the top right of the window
|
||||
# Refresh the browser window to verify that your changes have been saved correctly
|
||||
|
||||
@@ -25,6 +25,6 @@ If you're using [[Firefox for Android]], see the instructions for [[Saving with
|
||||
#* If you are using TiddlyFox v2.x.x you will need to click on the icon of a kitten standing on a blue globe to activate saving. There is no prompt in v2.0.1.
|
||||
#** For TiddlyFox v2.0.1, you can not be using Private Browsing mode nor can you be using "Never Remember History".
|
||||
# Try creating a new tiddler using the ''new tiddler'' <<.icon $:/core/images/new-button>> button in the sidebar. Type some content for the tiddler, and click the <<.icon $:/core/images/done-button>> ''ok'' button
|
||||
# Save your changes by clicking the <<.icon $:/core/images/save-button>> ''save changes'' button in the sidebar
|
||||
# Save your changes by clicking the <<.icon $:/core/images/save-button-dynamic>> ''save changes'' button in the sidebar
|
||||
#* Look for the yellow notification ''Saved wiki'' at the top right of the window
|
||||
# Refresh the browser window to verify that your changes have been saved correctly
|
||||
|
||||
@@ -20,5 +20,5 @@ type: text/vnd.tiddlywiki
|
||||
#* You may rename it, but be sure to keep the `.html` or `.htm` extension
|
||||
# Open the file in Internet Explorer
|
||||
# Try creating a new tiddler using the ''new tiddler'' <<.icon $:/core/images/new-button>> button in the sidebar. Type some content for the tiddler, and click the <<.icon $:/core/images/done-button>> ''ok'' button
|
||||
# Save your changes by clicking the <<.icon $:/core/images/save-button>> ''save changes'' button in the sidebar. Internet Explorer will ask for your consent to save the file locally by presenting a file ''Save As'' dialog.
|
||||
# Save your changes by clicking the <<.icon $:/core/images/save-button-dynamic>> ''save changes'' button in the sidebar. Internet Explorer will ask for your consent to save the file locally by presenting a file ''Save As'' dialog.
|
||||
# Refresh the browser window to verify that your changes have been saved correctly
|
||||
|
||||
@@ -19,7 +19,7 @@ This is the default method of saving if no other method is installed. It uses yo
|
||||
#* You may rename it, but be sure to keep the `.html` or `.htm` extension
|
||||
# Open the file in your browser
|
||||
# Try creating a new tiddler using the ''new tiddler'' <<.icon $:/core/images/new-button>> button in the sidebar. Type some content for the tiddler, and click the <<.icon $:/core/images/done-button>> ''ok'' button
|
||||
# Save your changes by clicking the <<.icon $:/core/images/save-button>> ''save changes'' button in the sidebar
|
||||
# Save your changes by clicking the <<.icon $:/core/images/save-button-dynamic>> ''save changes'' button in the sidebar
|
||||
# Your browser will download a new copy of the wiki incorporating your changes
|
||||
# Locate the newly downloaded file and open it in your browser
|
||||
# Verify that your changes have been saved correctly
|
||||
|
||||
@@ -133,6 +133,10 @@ td svg {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.doc-examples-hard-breaks .doc-example-result li {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.doc-bad-example code, .doc-bad-example pre, table.doc-bad-example {
|
||||
background-color:#ffff80;
|
||||
}
|
||||
|
||||
@@ -325,3 +325,22 @@ type: text/vnd.tiddlywiki
|
||||
.tc-btn-download:active {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* WikiText rules */
|
||||
|
||||
.multi-columns,
|
||||
.fourcolumns {
|
||||
display: block;
|
||||
column-count: 4;
|
||||
column-gap: 1em;
|
||||
-moz-column-count: 4;
|
||||
-moz-column-gap: 1em;
|
||||
-webkit-column-count: 4;
|
||||
-webkit-column-gap: 1em;
|
||||
}
|
||||
|
||||
@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {
|
||||
.multi-columns {
|
||||
column-count: 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
caption: $:/tags/ClassFilters/TiddlerTemplate
|
||||
created: 20221020035738692
|
||||
description: marks filters evaluated to dynamically add classes to the page template.
|
||||
modified: 20221020035933363
|
||||
modified: 20230326153057521
|
||||
tags: SystemTags
|
||||
title: SystemTag: $:/tags/ClassFilters/TiddlerTemplate
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The [[system tag|SystemTags]] `$:/tags/ClassFilters/TiddlerTemplate` marks filters evaluated to dynamically add their output as CSS classes to the tiddler template.
|
||||
|
||||
The variables available are within each filter:
|
||||
|
||||
* <<.var storyTiddler>>: the tiddler in the story for which the filter should be evaluated.
|
||||
* <<.var currentTiddler>>: the tiddler holding the filter definition being evaluated.
|
||||
|
||||
@@ -1,25 +1,11 @@
|
||||
caption: action-listops
|
||||
created: 20141025120850184
|
||||
list: efg hlm pqr
|
||||
modified: 20211115091121133
|
||||
modified: 20230301183438774
|
||||
myfield:
|
||||
revision: 0
|
||||
tags: ActionWidgets Widgets
|
||||
title: ActionListopsWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\define .operator-rows(filter)
|
||||
<$list filter="$filter$"><tr>
|
||||
<td><$link>{{!!caption}}</$link></td>
|
||||
<td>{{!!op-purpose}} <$list filter="[all[current]tag[Common Operators]]">{{$:/core/images/done-button}}</$list></td>
|
||||
<td align="center"><$list filter="[all[current]tag[Negatable Operators]]">`!`</$list></td>
|
||||
</tr></$list>
|
||||
\end
|
||||
|
||||
\define .group-heading(_)
|
||||
<tr class="doc-table-subheading"><th colspan="3" align="center">$_$</th></tr>
|
||||
\end
|
||||
|
||||
! Introduction
|
||||
|
||||
The ''action-listops'' widget is an [[action widget|ActionWidgets]] that manipulates user lists in any field or data index. ActionWidgets are used within triggering widgets such as the ButtonWidget.
|
||||
@@ -34,9 +20,9 @@ The ''action-listops'' widget is invisible. Any content within it is ignored.
|
||||
|$index |Optional index of a property in a [[data tiddler|DataTiddlers]] index to be manipulated as a list |
|
||||
|$filter |An optional filter expression, the output of which will be saved to the field/index being manipulated |
|
||||
|$subfilter |An optional subfilter expression, which takes the list being manipulated as input, and saves the modified list back to the field/index being manipulated |
|
||||
|$tags |An optional subfilter expression, which takes the 'tags' field of the target tiddler as input, and saves the modified list of tags back to the 'tags' field |
|
||||
|$tags |An optional subfilter expression, which takes the <<.field tags>> field of the target tiddler as input, and saves the modified list of tags back to the <<.field tags>> field |
|
||||
|
||||
! $filter vs. $subfilter
|
||||
!! Using $filter or $subfilter
|
||||
|
||||
Standalone use of the `$subfilter` attribute can be replaced by using a (more complicated) `$filter` attribute value.
|
||||
|
||||
@@ -46,15 +32,15 @@ For example, the items "abc" and "123" can be appended to the field `myfield` us
|
||||
<$action-listops $field="myfield" $subfilter="abc 123"/>
|
||||
```
|
||||
|
||||
The same can be achieved using the `$filter` attribute and prepending the [[Filter Run]] `[all[current]get[myfield]enlist-input[]]` to the [[Filter Expression]]:
|
||||
The same can be achieved using the `$filter` attribute and prepending the [[Filter Run]] `[enlist{!!myfield}]` to the [[Filter Expression]]:
|
||||
|
||||
```
|
||||
<$action-listops $field="myfield" $filter="[all[current]get[myfield]enlist-input[]] abc 123"/>
|
||||
<$action-listops $field="myfield" $filter="[enlist{!!myfield}] abc 123"/>
|
||||
```
|
||||
|
||||
The short form is more convenient, but the long form is useful for live-debugging complicated `$subfilter` values using the filter tab of [[$:/AdvancedSearch]]. By using [[$:/AdvancedSearch]], the [[Filter Expression]] can be tested before using ''action-listops'' to modify actual tiddler fields. For this use case, the `all[current]` portion of the expression needs to be changed to select the proper test tiddler.
|
||||
|
||||
! $tags vs. $field + $subfilter
|
||||
!! Using $tags or $subfilter
|
||||
|
||||
[[Tagging]] is implemented using a tiddler's 'tags' field, so appending the tags "abc" and "123" using the `$tags` attribute like this:
|
||||
|
||||
@@ -68,110 +54,53 @@ is mostly equivalent to using `$subfilter` along with "tags" for the value of `$
|
||||
<$action-listops $field="tags" $subfilter="abc 123"/>
|
||||
```
|
||||
|
||||
! $action-listops widget vs. $action-setfield widget
|
||||
!! Comparison to [[ActionSetFieldWidget]]
|
||||
|
||||
The ActionSetFieldWidget replaces a field's value using `$field`/`$value` attributes. A single ActionSetFieldWidget can be used to set any number of fields by using attributes not starting with $.
|
||||
In general, ActionSetFieldWidget is better for setting multiple fields at once and for replacing the value of a field, which can also be a list. The ActionListopsWidget is better for modifying a list field based on the existing list and for using a [[Filter Expression]] to derive the value of the field.
|
||||
|
||||
The ActionListopsWidget replaces or modifies a single field's value. The new value is generated using filters.
|
||||
The ~ActionSetFieldWidget sets the value of a field using `$field` and `$value` attribute pairs or attributes that do not start with a `$`. A single ~ActionSetFieldWidget can be used to set any number of fields of a single tiddler.
|
||||
|
||||
The following two examples are functionally equivalent:
|
||||
The ~ActionListopsWidget replaces or modifies a single field's value using filter expressions.
|
||||
|
||||
The following widgets are functionally equivalent:
|
||||
|
||||
```
|
||||
<$action-setfield $field="myfield" $value="abc 123"/>
|
||||
```
|
||||
|
||||
```
|
||||
<$action-setfield myfield="abc 123"/>
|
||||
<$action-listops $field="myfield" $filter="abc 123"/>
|
||||
```
|
||||
Note that <<.value "abc 123">> in the first two cases is a literal string that is assigned to the field <<.field myfield>>, but in the third case a filter expression which evaluates to the same string.
|
||||
|
||||
In general, ActionSetFieldWidget is better for setting multiple fields at once and for replacing a field's value. The ActionListopsWidget is better for modifying a field based on the field's existing value and for using a [[Filter Expression]] to derive the value.
|
||||
!! Extended Filter Operators
|
||||
|
||||
! Extended Filter Operators
|
||||
A number of [[Extended Listops Filters]] are necessary for the manipulation of lists. These operators have been designed primarily for use in subfilter expressions whereby the modified current list is returned in place of the current list.
|
||||
|
||||
A number of [[extended filter operators|The Extended Listops Filters]] are necessary for the manipulation of lists. These operators have been designed primarily for use in subfilter expressions whereby the modified current list is returned in place of the current list.
|
||||
!! Notes on de-duplication
|
||||
|
||||
<table>
|
||||
<<.group-heading "Listops Operators">>
|
||||
<tr>
|
||||
<th align="left">Operator</th>
|
||||
<th align="left">Purpose</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<<.operator-rows "[tag[Filter Operators]tag[Listops Operators]tag[Order Operators]!tag[String Operators]!tag[Tag Operators]!tag[Special Operators]sort[]]">>
|
||||
</table>
|
||||
In some cases, there may occur unexpected de-duplication of lists.
|
||||
|
||||
! Examples
|
||||
!!! Assignments to the <<.field list>> field
|
||||
|
||||
In this example we shall populate and then clear a list in an ordinary field (myfield) of this tiddler (the default.)
|
||||
When assigning filter results to the <<.field list>> field (default), the generated list is automatically de-duplicated, so
|
||||
|
||||
```
|
||||
<$action-listops $filter="[[1]] :and[[1]]"/>
|
||||
```
|
||||
will result in the <<.field list>> field of the current tiddler containing the string <<.value 1>>, but not <<.value "1 1">>.
|
||||
|
||||
!!! Input to the subfilter expression
|
||||
|
||||
The input to the subfilter expression in the `$subfilter` attribute is also de-duplicated. If you rely on lists containing duplicates, consider using this alternative using the `$filter` attribute:
|
||||
|
||||
<$macrocall $name='wikitext-example-without-html'
|
||||
src="""<$button>
|
||||
<$action-listops $field="myfield" $subfilter="efg hlm pqr"/>
|
||||
Populate 'myfield'
|
||||
</$button>
|
||||
<$button>
|
||||
<$action-listops $field="myfield" $subfilter="abc xyz"/>
|
||||
Append More Items
|
||||
</$button>
|
||||
<$button>
|
||||
<$action-listops $field="myfield" $subfilter="-abc -hlm"/>
|
||||
Remove Items
|
||||
</$button>
|
||||
<$button>
|
||||
<$action-listops $field="myfield" $filter="[[]]"/>
|
||||
Clear 'myfield'
|
||||
<$action-listops $field="myfield" $filter="[enlist:raw{!!myfield}] :all[[abc]]" />
|
||||
Add 'abc' to 'myfield'
|
||||
</$button>
|
||||
|
||||
<$list filter="[list[!!myfield]]">
|
||||
<$list filter="[enlist:raw{!!myfield}]" template="$:/core/ui/ListItemTemplate" />
|
||||
"""/>
|
||||
The [[enlist Operator]] with `raw` suffix will enlist the list saved in <<.field myfield>> of the current tiddler without de-duplication, while e.g. the [[list Operator]] will always de-duplicate. The widget then adds the item <<.value abc>> -- whether or not it is already included in the list -- and replaces the original list in <<.field myfield>>.
|
||||
|
||||
</$list>"""/>
|
||||
|
||||
---
|
||||
In this example we shall append and remove items from a list in an ordinary field (myfield) of this tiddler (the default) and sort the resultant list. We shall then remove some of the appended items and sort the resulting list in reverse order.
|
||||
|
||||
<$macrocall $name='wikitext-example-without-html'
|
||||
src="""<$button>
|
||||
<$action-listops $field="myfield" $subfilter="-efg ijk xyz [[this is a title]] +[sort[]]"/>
|
||||
Mangle List
|
||||
</$button>
|
||||
<$button>
|
||||
<$action-listops $field="myfield" $subfilter="-xyz -[[this is a title]] +[!sort[]]"/>
|
||||
Unmangle List
|
||||
</$button>
|
||||
|
||||
<$list filter="[list[!!myfield]]">
|
||||
|
||||
</$list>"""/>
|
||||
|
||||
---
|
||||
In this example we shall append a few tags to the 'tags' field of this tiddler (the default.) We shall then remove some of the appended tags.
|
||||
|
||||
<$macrocall $name='wikitext-example-without-html'
|
||||
src="""<$button>
|
||||
<$action-listops $tags="+[append{Days of the Week!!short}] $:/tag1 $:/tag2 $:/tag3"/>
|
||||
Populate 'tags'
|
||||
</$button>
|
||||
<$button>
|
||||
<$action-listops $tags="+[!remove:2{!!tags}]"/>
|
||||
Remove Last Two Tags
|
||||
</$button>
|
||||
<$button>
|
||||
<$action-listops $tags="+[!prefix[$:/]]"/>
|
||||
Remove System Tags
|
||||
</$button>
|
||||
<$button>
|
||||
<$action-listops $tags="-Mon -Tue"/>
|
||||
Remove Mon and Tue
|
||||
</$button>
|
||||
<$button>
|
||||
<$action-listops $tags="+[prefix[$:/]] ActionWidgets Widgets"/>
|
||||
Remove User Tags
|
||||
</$button>
|
||||
<$button>
|
||||
<$action-listops $tags="+[[]] ActionWidgets Widgets"/>
|
||||
Clear Tags
|
||||
</$button>
|
||||
|
||||
<$list filter="[list[!!tags]]">
|
||||
|
||||
</$list>"""/>
|
||||
! [[Examples|ActionListopsWidget (Examples)]]
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user