mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-22 19:04:38 +00:00
Compare commits
3 Commits
allow-filt
...
super-safe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3ca72ebe2 | ||
|
|
1ed3217239 | ||
|
|
e59f97b9c5 |
@@ -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.8
|
||||
TW5_BUILD_VERSION=v5.2.6
|
||||
fi
|
||||
|
||||
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
||||
|
||||
74
boot/boot.js
74
boot/boot.js
@@ -96,42 +96,34 @@ 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)) {
|
||||
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);
|
||||
}
|
||||
// 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.prototype.push.apply(array,value);
|
||||
}
|
||||
}
|
||||
// Push the values on top of the main array
|
||||
array.push.apply(array,value);
|
||||
}
|
||||
} else {
|
||||
if($tw.config._temp_allowDuplicates) {
|
||||
array.push(value);
|
||||
} else {
|
||||
p = array.indexOf(value);
|
||||
if(p !== -1) {
|
||||
array.splice(p,1);
|
||||
}
|
||||
array.push(value);
|
||||
p = array.indexOf(value);
|
||||
if(p !== -1) {
|
||||
array.splice(p,1);
|
||||
}
|
||||
array.push(value);
|
||||
}
|
||||
return array;
|
||||
};
|
||||
@@ -405,7 +397,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 || $tw.config._temp_allowDuplicates)) {
|
||||
if(item !== undefined && (!$tw.utils.hop(names,item) || allowDuplicate)) {
|
||||
results.push(item);
|
||||
names[item] = true;
|
||||
}
|
||||
@@ -1550,6 +1542,8 @@ $tw.Wiki.prototype.processSafeMode = function() {
|
||||
this.addTiddler(new $tw.Tiddler({title: titleReportTiddler, text: report.join("\n\n")}));
|
||||
// Set $:/DefaultTiddlers to point to our report
|
||||
this.addTiddler(new $tw.Tiddler({title: "$:/DefaultTiddlers", text: "[[" + titleReportTiddler + "]]"}));
|
||||
// Switch to the safe mode layout
|
||||
this.addTiddler({title: "$:/layout", text: "$:/core/ui/SafeLayout"});
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -2313,25 +2307,14 @@ $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,{
|
||||
@@ -2340,7 +2323,6 @@ $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/",
|
||||
@@ -2493,14 +2475,6 @@ $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) {
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
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>
|
||||
@@ -56,6 +56,7 @@ Manager/Controls/Show/Option/Tiddlers: tiddlers
|
||||
Manager/Controls/Show/Prompt: Show:
|
||||
Manager/Controls/Sort/Prompt: Sort by:
|
||||
Manager/Item/Colour: Colour
|
||||
Manager/Item/Editor: Editor
|
||||
Manager/Item/Fields: Fields
|
||||
Manager/Item/Icon/None: (none)
|
||||
Manager/Item/Icon: Icon
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
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
|
||||
@@ -84,7 +84,8 @@ exports.parseTokenString = function(source,pos,token) {
|
||||
};
|
||||
|
||||
/*
|
||||
Look for a token matching a regex. Returns null if not found, otherwise returns {type: "regexp", match:, start:, end:,}
|
||||
Look for a token matching a regex at a specified position. Returns null if not found, otherwise returns {type: "regexp", match:, start:, end:,}
|
||||
Use the "Y" (sticky) flag to avoid searching the entire rest of the string
|
||||
*/
|
||||
exports.parseTokenRegExp = function(source,pos,reToken) {
|
||||
var node = {
|
||||
@@ -145,7 +146,7 @@ exports.parseMacroParameter = function(source,pos) {
|
||||
start: pos
|
||||
};
|
||||
// Define our regexp
|
||||
var reMacroParameter = /(?:([A-Za-z0-9\-_]+)\s*:)?(?:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|((?:(?:>(?!>))|[^\s>"'])+)))/g;
|
||||
var reMacroParameter = /(?:([A-Za-z0-9\-_]+)\s*:)?(?:\s*(?:"""([\s\S]*?)"""|"([^"]*)"|'([^']*)'|\[\[([^\]]*)\]\]|((?:(?:>(?!>))|[^\s>"'])+)))/y;
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Look for the parameter
|
||||
@@ -184,7 +185,7 @@ exports.parseMacroInvocation = function(source,pos) {
|
||||
params: []
|
||||
};
|
||||
// Define our regexps
|
||||
var reMacroName = /([^\s>"'=]+)/g;
|
||||
var reMacroName = /([^\s>"'=]+)/y;
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Look for a double less than sign
|
||||
@@ -221,7 +222,7 @@ exports.parseFilterVariable = function(source) {
|
||||
params: [],
|
||||
},
|
||||
pos = 0,
|
||||
reName = /([^\s"']+)/g;
|
||||
reName = /([^\s"']+)/y;
|
||||
// If there is no whitespace or it is an empty string then there are no macro parameters
|
||||
if(/^\S*$/.test(source)) {
|
||||
node.name = source;
|
||||
@@ -246,10 +247,10 @@ exports.parseAttribute = function(source,pos) {
|
||||
start: pos
|
||||
};
|
||||
// Define our regexps
|
||||
var reAttributeName = /([^\/\s>"'=]+)/g,
|
||||
reUnquotedAttribute = /([^\/\s<>"'=]+)/g,
|
||||
reFilteredValue = /\{\{\{([\S\s]+?)\}\}\}/g,
|
||||
reIndirectValue = /\{\{([^\}]+)\}\}/g;
|
||||
var reAttributeName = /([^\/\s>"'=]+)/y,
|
||||
reUnquotedAttribute = /([^\/\s<>"'=]+)/y,
|
||||
reFilteredValue = /\{\{\{([\S\s]+?)\}\}\}/y,
|
||||
reIndirectValue = /\{\{([^\}]+)\}\}/y;
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Get the attribute name
|
||||
|
||||
@@ -48,7 +48,7 @@ exports.parse = function() {
|
||||
// Advance the parser position to past the tag
|
||||
this.parser.pos = tag.end;
|
||||
// Check for an immediately following double linebreak
|
||||
var hasLineBreak = !tag.isSelfClosing && !!$tw.utils.parseTokenRegExp(this.parser.source,this.parser.pos,/([^\S\n\r]*\r?\n(?:[^\S\n\r]*\r?\n|$))/g);
|
||||
var hasLineBreak = !tag.isSelfClosing && !!$tw.utils.parseTokenRegExp(this.parser.source,this.parser.pos,/([^\S\n\r]*\r?\n(?:[^\S\n\r]*\r?\n|$))/y);
|
||||
// Set whether we're in block mode
|
||||
tag.isBlock = this.is.block || hasLineBreak;
|
||||
// Parse the body if we need to
|
||||
@@ -78,7 +78,7 @@ exports.parseTag = function(source,pos,options) {
|
||||
orderedAttributes: []
|
||||
};
|
||||
// Define our regexps
|
||||
var reTagName = /([a-zA-Z0-9\-\$]+)/g;
|
||||
var reTagName = /([a-zA-Z0-9\-\$]+)/y;
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Look for a less than sign
|
||||
@@ -129,7 +129,7 @@ exports.parseTag = function(source,pos,options) {
|
||||
pos = token.end;
|
||||
// Check for a required line break
|
||||
if(options.requireLineBreak) {
|
||||
token = $tw.utils.parseTokenRegExp(source,pos,/([^\S\n\r]*\r?\n(?:[^\S\n\r]*\r?\n|$))/g);
|
||||
token = $tw.utils.parseTokenRegExp(source,pos,/([^\S\n\r]*\r?\n(?:[^\S\n\r]*\r?\n|$))/y);
|
||||
if(!token) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ exports.parseImage = function(source,pos) {
|
||||
// Skip whitespace
|
||||
pos = $tw.utils.skipWhiteSpace(source,pos);
|
||||
// Get the source up to the terminating `]]`
|
||||
token = $tw.utils.parseTokenRegExp(source,pos,/(?:([^|\]]*?)\|)?([^\]]+?)\]\]/g);
|
||||
token = $tw.utils.parseTokenRegExp(source,pos,/(?:([^|\]]*?)\|)?([^\]]+?)\]\]/y);
|
||||
if(!token) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -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\\n\\r]*\\\\end[^\\S\\n\\r]*(?:" + $tw.utils.escapeRegExp(this.match[1]) + ")?(?:$|\\r?\\n))","mg");
|
||||
reEnd = new RegExp("(\\r?\\n\\s*\\\\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;
|
||||
|
||||
@@ -214,7 +214,7 @@ function updateLocationHash(options) {
|
||||
break;
|
||||
}
|
||||
// Only change the location hash if we must, thus avoiding unnecessary onhashchange events
|
||||
if($tw.utils.getLocationHash() !== $tw.locationHash) {
|
||||
if($tw.utils.getLocationHash() !== $tw.locationHash && !$tw.safeMode) {
|
||||
if(options.updateHistory === "yes") {
|
||||
// Assign the location hash so that history is updated
|
||||
window.location.hash = $tw.locationHash;
|
||||
|
||||
5
core/ui/Manager/ItemMainEditor.tid
Normal file
5
core/ui/Manager/ItemMainEditor.tid
Normal file
@@ -0,0 +1,5 @@
|
||||
title: $:/Manager/ItemMain/Editor
|
||||
tags: $:/tags/Manager/ItemMain
|
||||
caption: {{$:/language/Manager/Item/Editor}}
|
||||
|
||||
<$edit-text tag="textarea" class="tc-edit-texteditor tc-edit-texteditor-body tc-max-width"/>
|
||||
@@ -13,3 +13,8 @@ caption: {{$:/language/Manager/Item/Tools}}
|
||||
{{$:/core/images/edit-button}} edit
|
||||
</$button>
|
||||
</p>
|
||||
<p>
|
||||
<$button message="tm-delete-tiddler" param=<<currentTiddler>>>
|
||||
{{$:/core/images/delete-button}} delete
|
||||
</$button>
|
||||
</p>
|
||||
|
||||
37
core/ui/SafeModeLayout.tid
Normal file
37
core/ui/SafeModeLayout.tid
Normal file
@@ -0,0 +1,37 @@
|
||||
title: $:/core/ui/SafeLayout
|
||||
tags: $:/tags/Layout
|
||||
name: Safe Mode Layout
|
||||
description: Safe Mode Layout
|
||||
icon: $:/core/images/list
|
||||
|
||||
\whitespace trim
|
||||
|
||||
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]
|
||||
|
||||
\define tv-config-toolbar-class() tc-btn-invisible
|
||||
\define tv-config-toolbar-icons() yes
|
||||
\define tv-config-toolbar-text() no
|
||||
|
||||
<div style="margin: 1em;">
|
||||
|
||||
<$navigator story="$:/StoryList" history="$:/HistoryList">
|
||||
|
||||
<h2>Layout</h2>
|
||||
|
||||
{{$:/snippets/LayoutSwitcher}}
|
||||
|
||||
<h2>Controls</h2>
|
||||
|
||||
<div class="tc-page-controls">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]">
|
||||
<$transclude mode="inline"/>
|
||||
</$list>
|
||||
</div>
|
||||
|
||||
<h2>Tiddlers</h2>
|
||||
|
||||
<$transclude tiddler="$:/Manager" mode="block"/>
|
||||
|
||||
</$navigator>
|
||||
|
||||
</div>
|
||||
@@ -1,3 +1,4 @@
|
||||
title: $:/state/popup/manager/item/$:/Manager/
|
||||
|
||||
ItemMain/RawText: hide
|
||||
ItemMain/RawText: hide
|
||||
ItemMain/Editor: hide
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/config/OfficialPluginLibrary
|
||||
tags: $:/tags/PluginLibrary
|
||||
url: https://tiddlywiki.com/library/v5.2.8/index.html
|
||||
url: https://tiddlywiki.com/library/v5.2.6/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}}
|
||||
|
||||
{{$:/language/OfficialPluginLibrary/Hint}}
|
||||
|
||||
@@ -1,18 +1,11 @@
|
||||
caption: 5.2.6
|
||||
created: 20230320184352916
|
||||
modified: 20230320184352916
|
||||
released: 20230320184352916
|
||||
created: 20230304213950684
|
||||
modified: 20230304213950684
|
||||
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...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"
|
||||
>>
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.5...master]]//
|
||||
|
||||
! Major Improvements
|
||||
|
||||
@@ -35,7 +28,6 @@ type: text/vnd.tiddlywiki
|
||||
Improvements to the following translations:
|
||||
|
||||
* Chinese
|
||||
* German
|
||||
* Italian
|
||||
* Polish
|
||||
|
||||
@@ -46,7 +38,6 @@ Improvements to the following translations:
|
||||
* <<.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
|
||||
|
||||
@@ -97,7 +88,6 @@ Improvements to the following translations:
|
||||
* <<.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
|
||||
|
||||
@@ -110,6 +100,7 @@ Improvements to the following translations:
|
||||
|
||||
! Performance Improvements
|
||||
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7297">> wikitext parsing to use "sticky" flag for improved performance
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7299">> field indexer to more efficiently process lookups
|
||||
|
||||
! Acknowledgements
|
||||
@@ -137,7 +128,6 @@ m42e
|
||||
Marxsal
|
||||
mateuszwilczek
|
||||
newmedicine
|
||||
michsa
|
||||
pippep
|
||||
pmario
|
||||
saqimtiaz
|
||||
@@ -1,60 +0,0 @@
|
||||
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.8/index.html
|
||||
url: https://tiddlywiki.com/prerelease/library/v5.2.6/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.
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
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>
|
||||
@@ -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 example of a JSON tiddler.
|
||||
The [[history list|$:/HistoryList]] is an of a JSON tiddler.
|
||||
|
||||
@@ -1,22 +1,9 @@
|
||||
created: 20150118134611000
|
||||
modified: 20230325163424379
|
||||
myfield:
|
||||
modified: 20150124201839000
|
||||
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]]" "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.
|
||||
<<.operator-example 2 "[get[tags]]">>
|
||||
<<.operator-example 3 "[each[tags]get[tags]]">>
|
||||
|
||||
@@ -1,19 +1,8 @@
|
||||
created: 20150203140000000
|
||||
modified: 20230325163543621
|
||||
modified: 20170608150301791
|
||||
tags: [[getindex Operator]] [[Operator Examples]]
|
||||
title: getindex Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.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.
|
||||
<<.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">>
|
||||
@@ -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>]" field:"title">>
|
||||
<<list-links "[regexp:title<digit-pattern>]">>
|
||||
</$set>"""/>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
caption: get
|
||||
created: 20140426183123179
|
||||
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
|
||||
modified: 20150203185001000
|
||||
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.
|
||||
|
||||
<<.tip "Unlike most other [[Filter Operators]], the [[selection|Title Selection]] output by <<.op get>> can contain duplicates. To avoid duplicates, use `get[F]unique[]`.">>
|
||||
Unlike most other [[Filter Operators]], the [[selection|Title Selection]] output by <<.op get>> can contain duplicates. To avoid duplicates, use `each[F]get[F]`.
|
||||
|
||||
<<.operator-examples "get">>
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
caption: getindex
|
||||
created: 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
|
||||
modified: 20150203140000000
|
||||
tags: [[Filter Operators]] [[Field Operators]]
|
||||
title: getindex Operator
|
||||
caption: getindex
|
||||
op-purpose: select all values of a data property in 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.
|
||||
<$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"
|
||||
/>
|
||||
|
||||
<<.tip "Unlike most other [[Filter Operators]], the [[selection|Title Selection]] output by <<.op getindex>> can contain duplicates. To avoid duplicates, use `getindex[P]unique[]`.">>
|
||||
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.
|
||||
|
||||
<<.operator-examples "getindex">>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
caption: has
|
||||
created: 20140410103123179
|
||||
modified: 20230306143207920
|
||||
modified: 20190518145446047
|
||||
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 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-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-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
|
||||
|
||||
@@ -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: 20230326083239710
|
||||
modified: 20221219184500440
|
||||
tags: TableOfContents
|
||||
title: HelloThere
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 68 KiB |
@@ -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
|
||||
;field
|
||||
;caption
|
||||
: 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`
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
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}}
|
||||
@@ -1,14 +1,9 @@
|
||||
caption: $:/tags/ClassFilters/TiddlerTemplate
|
||||
created: 20221020035738692
|
||||
description: marks filters evaluated to dynamically add classes to the page template.
|
||||
modified: 20230326153057521
|
||||
modified: 20221020035933363
|
||||
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.
|
||||
|
||||
@@ -32,7 +32,7 @@ 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]] `[enlist{!!myfield}]` to the [[Filter Expression]]:
|
||||
The same can be achieved using the `$filter` attribute and prepending the [[Filter Run]] `[all[current]get[myfield]enlist-input[]]` to the [[Filter Expression]]:
|
||||
|
||||
```
|
||||
<$action-listops $field="myfield" $filter="[enlist{!!myfield}] abc 123"/>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"],
|
||||
"external-js": [
|
||||
"--render","$:/core/save/offline-external-js","[[external-]addsuffix<version>addsuffix[.html]]","text/plain",
|
||||
"--render","$:/core/save/offline-external-js","index.html","text/plain",
|
||||
"--render","$:/core/templates/tiddlywiki5.js","[[tiddlywikicore-]addsuffix<version>addsuffix[.js]]","text/plain"]
|
||||
},
|
||||
"config": {
|
||||
|
||||
@@ -525,5 +525,3 @@ Mateusz Wilczek, @mateuszwilczek, 2023/02/16
|
||||
Andrea Octo, @andrigamerita, 2023/02/24
|
||||
|
||||
HuanC Fu, @hffqyd, 2023/03/03
|
||||
|
||||
Michelle Saad, @michsa, 2023-03-08
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tiddlywiki",
|
||||
"preferGlobal": "true",
|
||||
"version": "5.2.8-prerelease",
|
||||
"version": "5.2.6-prerelease",
|
||||
"author": "Jeremy Ruston <jeremy@jermolene.com>",
|
||||
"description": "a non-linear personal web notebook",
|
||||
"contributors": [
|
||||
|
||||
10
readme.md
10
readme.md
@@ -1,15 +1,7 @@
|
||||
<p>Welcome to <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a>, a non-linear personal web notebook that anyone can use and keep forever, independently of any corporation.</p><p><a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> is a complete interactive wiki in <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/JavaScript.html">JavaScript</a>. It can be used as a single HTML file in the browser or as a powerful Node.js application. It is highly customisable: the entire user interface is itself implemented in hackable <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/WikiText.html">WikiText</a>.</p><p>Learn more and see it in action at <a class="tc-tiddlylink-external" href="https://tiddlywiki.com/" rel="noopener noreferrer" target="_blank">https://tiddlywiki.com/</a></p><p>Developer documentation is in progress at <a class="tc-tiddlylink-external" href="https://tiddlywiki.com/dev/" rel="noopener noreferrer" target="_blank">https://tiddlywiki.com/dev/</a></p><h1 class="">Join the Community</h1><p>
|
||||
<h2 class="">Official Forums</h2><p>The new official forum for talking about TiddlyWiki: requests for help, announcements of new releases and plugins, debating new features, or just sharing experiences. You can participate via the associated website, or subscribe via email.</p><p><a class="tc-tiddlylink-external" href="https://talk.tiddlywiki.org/" rel="noopener noreferrer" target="_blank">https://talk.tiddlywiki.org/</a></p><p>Note that talk.tiddlywiki.org is a community run service that we host and maintain ourselves. The modest running costs are covered by community contributions.</p><p>For the convenience of existing users, we also continue to operate the original TiddlyWiki group (hosted on Google Groups since 2005):</p><p><a class="tc-tiddlylink-external" href="https://groups.google.com/group/TiddlyWiki" rel="noopener noreferrer" target="_blank">https://groups.google.com/group/TiddlyWiki</a></p><h2 class="">Developer Forums</h2><p>There are several resources for developers to learn more about <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> and to discuss and contribute to its development.</p><ul><li><a class="tc-tiddlylink-external" href="https://tiddlywiki.com/dev" rel="noopener noreferrer" target="_blank">tiddlywiki.com/dev</a> is the official developer documentation</li><li>Get involved in the <a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5" rel="noopener noreferrer" target="_blank">development on GitHub</a><ul><li><a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/discussions" rel="noopener noreferrer" target="_blank">Discussions</a> are for Q&A and open-ended discussion</li><li><a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/issues" rel="noopener noreferrer" target="_blank">Issues</a> are for raising bug reports and proposing specific, actionable new ideas</li></ul></li><li>The older TiddlyWikiDev Google Group is now closed in favour of <a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/discussions" rel="noopener noreferrer" target="_blank">GitHub Discussions</a> but remains a useful archive: <a class="tc-tiddlylink-external" href="https://groups.google.com/group/TiddlyWikiDev" rel="noopener noreferrer" target="_blank">https://groups.google.com/group/TiddlyWikiDev</a><ul><li>An enhanced group search facility is available on <a class="tc-tiddlylink-external" href="https://www.mail-archive.com/tiddlywikidev@googlegroups.com/" rel="noopener noreferrer" target="_blank">mail-archive.com</a></li></ul></li><li>Follow <a class="tc-tiddlylink-external" href="http://twitter.com/#!/TiddlyWiki" rel="noopener noreferrer" target="_blank">@TiddlyWiki on Twitter</a> for the latest news</li><li>Chat at <a class="tc-tiddlylink-external" href="https://gitter.im/TiddlyWiki/public" rel="noopener noreferrer" target="_blank">https://gitter.im/TiddlyWiki/public</a> (development room coming soon)</li></ul><h2 class="">Other Forums</h2><ul><li><a class="tc-tiddlylink-external" href="https://www.reddit.com/r/TiddlyWiki5/" rel="noopener noreferrer" target="_blank">TiddlyWiki Subreddit</a></li><li>Chat with Gitter at <a class="tc-tiddlylink-external" href="https://gitter.im/TiddlyWiki/public" rel="noopener noreferrer" target="_blank">https://gitter.im/TiddlyWiki/public</a> !</li><li>Chat on Discord at <a class="tc-tiddlylink-external" href="https://discord.gg/HFFZVQ8" rel="noopener noreferrer" target="_blank">https://discord.gg/HFFZVQ8</a></li></ul><h3 class="">Documentation</h3><p>There is also a discussion group specifically for discussing <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> documentation improvement initiatives: <a class="tc-tiddlylink-external" href="https://groups.google.com/group/tiddlywikidocs" rel="noopener noreferrer" target="_blank">https://groups.google.com/group/tiddlywikidocs</a>
|
||||
</p>
|
||||
</p><h1 class="">Installing <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> on Node.js</h1><ol><li>Install <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Node.js.html">Node.js</a><ul><li>Linux: <blockquote><div><em>Debian/Ubuntu</em>:<br><code>apt install nodejs</code><br>May need to be followed up by:<br><code>apt install npm</code></div><div><em>Arch Linux</em><br><code>yay -S tiddlywiki</code> <br>(installs node and tiddlywiki)</div></blockquote></li><li>Mac<blockquote><div><code>brew install node</code></div></blockquote></li><li>Android<blockquote><div><a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Serving%2520TW5%2520from%2520Android.html">Termux for Android</a></div></blockquote></li><li>Other <blockquote><div>See <a class="tc-tiddlylink-external" href="http://nodejs.org" rel="noopener noreferrer" target="_blank">http://nodejs.org</a></div></blockquote></li></ul></li><li>Open a command line terminal and type:<blockquote><div><code>npm install -g tiddlywiki</code></div><div>If it fails with an error you may need to re-run the command as an administrator:</div><div><code>sudo npm install -g tiddlywiki</code> (Mac/Linux)</div></blockquote></li><li>Ensure TiddlyWiki is installed by typing:<blockquote><div><code>tiddlywiki --version</code></div></blockquote><ul><li>In response, you should see <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> report its current version (eg "5.2.7". You may also see other debugging information reported.)</li></ul></li><li>Try it out:<ol><li><code>tiddlywiki mynewwiki --init server</code> to create a folder for a new wiki that includes server-related components</li><li><code>tiddlywiki mynewwiki --listen</code> to start <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a></li><li>Visit <a class="tc-tiddlylink-external" href="http://127.0.0.1:8080/" rel="noopener noreferrer" target="_blank">http://127.0.0.1:8080/</a> in your browser</li><li>Try editing and creating tiddlers</li></ol></li><li>Optionally, make an offline copy:<ul><li>click the <span class="doc-icon"><svg class="tc-image-save-button-dynamic tc-image-button" height="22pt" viewBox="0 0 128 128" width="22pt">
|
||||
<g class="tc-image-save-button-dynamic-clean">
|
||||
<path 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" fill-rule="evenodd"></path>
|
||||
</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></span> <strong>save changes</strong> button in the sidebar, <strong>OR</strong></li><li><code>tiddlywiki mynewwiki --build index</code></li></ul></li></ol><p>The <code>-g</code> flag causes <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> to be installed globally. Without it, <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> will only be available in the directory where you installed it.</p><p><div class="doc-icon-block"><div class="doc-block-icon"><svg class="tc-image-warning tc-image-button" height="22pt" viewBox="0 0 128 128" width="22pt"><path d="M57.072 11c3.079-5.333 10.777-5.333 13.856 0l55.426 96c3.079 5.333-.77 12-6.928 12H8.574c-6.158 0-10.007-6.667-6.928-12l55.426-96zM64 37c-4.418 0-8 3.582-8 7.994v28.012C56 77.421 59.59 81 64 81c4.418 0 8-3.582 8-7.994V44.994C72 40.579 68.41 37 64 37zm0 67a8 8 0 100-16 8 8 0 000 16z" fill-rule="evenodd"></path></svg></div> If you are using Debian or Debian-based Linux and you are receiving a <code>node: command not found</code> error though node.js package is installed, you may need to create a symbolic link between <code>nodejs</code> and <code>node</code>. Consult your distro's manual and <code>whereis</code> to correctly create a link. See github <a class="tc-tiddlylink-external" href="http://github.com/Jermolene/TiddlyWiki5/issues/1434" rel="noopener noreferrer" target="_blank">issue 1434</a>. <br><br>Example Debian v8.0: <code>sudo ln -s /usr/bin/nodejs /usr/bin/node</code></div></p><p><br>
|
||||
</p><h1 class="">Installing <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> on Node.js</h1><ol><li>Install <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Node.js.html">Node.js</a><ul><li>Linux: <blockquote><div><em>Debian/Ubuntu</em>:<br><code>apt install nodejs</code><br>May need to be followed up by:<br><code>apt install npm</code></div><div><em>Arch Linux</em><br><code>yay -S tiddlywiki</code> <br>(installs node and tiddlywiki)</div></blockquote></li><li>Mac<blockquote><div><code>brew install node</code></div></blockquote></li><li>Android<blockquote><div><a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Serving%2520TW5%2520from%2520Android.html">Termux for Android</a></div></blockquote></li><li>Other <blockquote><div>See <a class="tc-tiddlylink-external" href="http://nodejs.org" rel="noopener noreferrer" target="_blank">http://nodejs.org</a></div></blockquote></li></ul></li><li>Open a command line terminal and type:<blockquote><div><code>npm install -g tiddlywiki</code></div><div>If it fails with an error you may need to re-run the command as an administrator:</div><div><code>sudo npm install -g tiddlywiki</code> (Mac/Linux)</div></blockquote></li><li>Ensure TiddlyWiki is installed by typing:<blockquote><div><code>tiddlywiki --version</code></div></blockquote><ul><li>In response, you should see <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> report its current version (eg "5.2.5". You may also see other debugging information reported.)</li></ul></li><li>Try it out:<ol><li><code>tiddlywiki mynewwiki --init server</code> to create a folder for a new wiki that includes server-related components</li><li><code>tiddlywiki mynewwiki --listen</code> to start <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a></li><li>Visit <a class="tc-tiddlylink-external" href="http://127.0.0.1:8080/" rel="noopener noreferrer" target="_blank">http://127.0.0.1:8080/</a> in your browser</li><li>Try editing and creating tiddlers</li></ol></li><li>Optionally, make an offline copy:<ul><li>click the <span class="doc-icon"><svg class="tc-image-save-button tc-image-button" height="22pt" viewBox="0 0 128 128" width="22pt"><path 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" fill-rule="evenodd"></path></svg></span> <strong>save changes</strong> button in the sidebar, <strong>OR</strong></li><li><code>tiddlywiki mynewwiki --build index</code></li></ul></li></ol><p>The <code>-g</code> flag causes <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> to be installed globally. Without it, <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> will only be available in the directory where you installed it.</p><p><div class="doc-icon-block"><div class="doc-block-icon"><svg class="tc-image-warning tc-image-button" height="22pt" viewBox="0 0 128 128" width="22pt"><path d="M57.072 11c3.079-5.333 10.777-5.333 13.856 0l55.426 96c3.079 5.333-.77 12-6.928 12H8.574c-6.158 0-10.007-6.667-6.928-12l55.426-96zM64 37c-4.418 0-8 3.582-8 7.994v28.012C56 77.421 59.59 81 64 81c4.418 0 8-3.582 8-7.994V44.994C72 40.579 68.41 37 64 37zm0 67a8 8 0 100-16 8 8 0 000 16z" fill-rule="evenodd"></path></svg></div> If you are using Debian or Debian-based Linux and you are receiving a <code>node: command not found</code> error though node.js package is installed, you may need to create a symbolic link between <code>nodejs</code> and <code>node</code>. Consult your distro's manual and <code>whereis</code> to correctly create a link. See github <a class="tc-tiddlylink-external" href="http://github.com/Jermolene/TiddlyWiki5/issues/1434" rel="noopener noreferrer" target="_blank">issue 1434</a>. <br><br>Example Debian v8.0: <code>sudo ln -s /usr/bin/nodejs /usr/bin/node</code></div></p><p><br>
|
||||
<div class="doc-icon-block"><div class="doc-block-icon"><svg class="tc-image-tip tc-image-button" height="22pt" viewBox="0 0 128 128" width="22pt"><path d="M64 128.242c35.346 0 64-28.654 64-64 0-35.346-28.654-64-64-64-35.346 0-64 28.654-64 64 0 35.346 28.654 64 64 64zm11.936-36.789c-.624 4.129-5.73 7.349-11.936 7.349-6.206 0-11.312-3.22-11.936-7.349C54.33 94.05 58.824 95.82 64 95.82c5.175 0 9.67-1.769 11.936-4.366zm0 4.492c-.624 4.13-5.73 7.349-11.936 7.349-6.206 0-11.312-3.22-11.936-7.349 2.266 2.597 6.76 4.366 11.936 4.366 5.175 0 9.67-1.769 11.936-4.366zm0 4.456c-.624 4.129-5.73 7.349-11.936 7.349-6.206 0-11.312-3.22-11.936-7.349 2.266 2.597 6.76 4.366 11.936 4.366 5.175 0 9.67-1.769 11.936-4.366zm0 4.492c-.624 4.13-5.73 7.349-11.936 7.349-6.206 0-11.312-3.22-11.936-7.349 2.266 2.597 6.76 4.366 11.936 4.366 5.175 0 9.67-1.769 11.936-4.366zM64.3 24.242c11.618 0 23.699 7.82 23.699 24.2S75.92 71.754 75.92 83.576c0 5.873-5.868 9.26-11.92 9.26s-12.027-3.006-12.027-9.26C51.973 71.147 40 65.47 40 48.442s12.683-24.2 24.301-24.2z" fill-rule="evenodd"></path></svg></div> You can also install prior versions like this: <br><code> npm install -g tiddlywiki@5.1.13</code></div>
|
||||
</p><h1 class="">Using <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> on Node.js</h1><p>TiddlyWiki5 includes a set of commands for use on the command line to perform an extensive set of operations based on <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWikiFolders.html">TiddlyWikiFolders</a>, <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlerFiles.html">TiddlerFiles</a>.</p><p>For example, the following command loads the tiddlers from a TiddlyWiki HTML file and then saves one of them in static HTML:</p><pre><code>tiddlywiki --verbose --load mywiki.html --rendertiddler ReadMe ./readme.html</code></pre><p>Running <code>tiddlywiki</code> from the command line boots the TiddlyWiki kernel, loads the core plugins and establishes an empty wiki store. It then sequentially processes the command line arguments from left to right. The arguments are separated with spaces.</p><p><a class="tc-tiddlylink tc-tiddlylink-resolves doc-from-version" href="https://tiddlywiki.com/static/Release%25205.1.20.html"><svg class="tc-image-warning tc-image-button" height="22pt" viewBox="0 0 128 128" width="22pt"><path d="M57.072 11c3.079-5.333 10.777-5.333 13.856 0l55.426 96c3.079 5.333-.77 12-6.928 12H8.574c-6.158 0-10.007-6.667-6.928-12l55.426-96zM64 37c-4.418 0-8 3.582-8 7.994v28.012C56 77.421 59.59 81 64 81c4.418 0 8-3.582 8-7.994V44.994C72 40.579 68.41 37 64 37zm0 67a8 8 0 100-16 8 8 0 000 16z" fill-rule="evenodd"></path></svg> New in: 5.1.20</a> First, there can be zero or more plugin references identified by the prefix <code>+</code> for plugin names or <code>++</code> for a path to a plugin folder. These plugins are loaded in addition to any specified in the <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWikiFolders.html">TiddlyWikiFolder</a>.</p><p>The next argument is the optional path to the <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWikiFolders.html">TiddlyWikiFolder</a> to be loaded. If not present, then the current directory is used.</p><p>The commands and their individual arguments follow, each command being identified by the prefix <code>--</code>.</p><pre><code>tiddlywiki [+<pluginname> | ++<pluginpath>] [<wikipath>] [--<command> [<arg>[,<arg>]]]</code></pre><p>For example:</p><pre><code>tiddlywiki --version
|
||||
tiddlywiki +plugins/tiddlywiki/filesystem +plugins/tiddlywiki/tiddlyweb mywiki --listen
|
||||
|
||||
Reference in New Issue
Block a user