mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-02 14:29:55 +00:00
Rename "shadow" tiddlers to "system" tiddlers
What we have at the moment isn't really the same as TiddlyWiki classic's shadow tiddlers, it's a much simpler system for excluding tiddlers. We'll use the term "shadow" instead to refer to the way that tiddlers in plugins behave, which is exactly like TiddlyWiki classic's shadow tiddlers.
This commit is contained in:
parent
e5443e27cb
commit
623a3ec8f8
2
bld.sh
2
bld.sh
@ -35,7 +35,7 @@ node ./tiddlywiki.js \
|
|||||||
--savetiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/index.html text/plain \
|
--savetiddler $:/core/templates/tiddlywiki5.template.html $TW5_BUILD_OUTPUT/index.html text/plain \
|
||||||
--savetiddler $:/core/templates/static.template.html $TW5_BUILD_OUTPUT/static.html text/plain \
|
--savetiddler $:/core/templates/static.template.html $TW5_BUILD_OUTPUT/static.html text/plain \
|
||||||
--savetiddler $:/core/templates/static.template.css $TW5_BUILD_OUTPUT/static/static.css text/plain \
|
--savetiddler $:/core/templates/static.template.css $TW5_BUILD_OUTPUT/static/static.css text/plain \
|
||||||
--savetiddlers [!is[shadow]] $:/core/templates/static.tiddler.html $TW5_BUILD_OUTPUT/static text/plain \
|
--savetiddlers [!is[system]] $:/core/templates/static.tiddler.html $TW5_BUILD_OUTPUT/static text/plain \
|
||||||
|| exit 1
|
|| exit 1
|
||||||
|
|
||||||
# Second, encrypted.html: a version of the main file encrypted with the password "password"
|
# Second, encrypted.html: a version of the main file encrypted with the password "password"
|
||||||
|
@ -57,7 +57,7 @@ $tw.config = $tw.config || {};
|
|||||||
$tw.config.pluginsPath = "../plugins/";
|
$tw.config.pluginsPath = "../plugins/";
|
||||||
$tw.config.wikiInfo = $tw.config.wikiInfo || "./tiddlywiki.info";
|
$tw.config.wikiInfo = $tw.config.wikiInfo || "./tiddlywiki.info";
|
||||||
$tw.config.wikiPluginsSubDir = $tw.config.wikiPluginsSubDir || "./plugins";
|
$tw.config.wikiPluginsSubDir = $tw.config.wikiPluginsSubDir || "./plugins";
|
||||||
$tw.config.wikiShadowsSubDir = $tw.config.wikiShadowsSubDir || "./wiki";
|
$tw.config.wikiSystemSubDir = $tw.config.wikiSystemSubDir || "./wiki";
|
||||||
$tw.config.wikiTiddlersSubDir = $tw.config.wikiTiddlersSubDir || "./tiddlers";
|
$tw.config.wikiTiddlersSubDir = $tw.config.wikiTiddlersSubDir || "./tiddlers";
|
||||||
|
|
||||||
$tw.config.jsModuleHeaderRegExpString = "^\\/\\*\\\\\\n((?:^[^\\n]*\\n)+?)(^\\\\\\*\\/$\\n?)";
|
$tw.config.jsModuleHeaderRegExpString = "^\\/\\*\\\\\\n((?:^[^\\n]*\\n)+?)(^\\\\\\*\\/$\\n?)";
|
||||||
@ -880,7 +880,7 @@ $tw.loadTiddlers = function() {
|
|||||||
"bootKernel",
|
"bootKernel",
|
||||||
"styleArea",
|
"styleArea",
|
||||||
"storeArea",
|
"storeArea",
|
||||||
"shadowArea"
|
"systemArea"
|
||||||
];
|
];
|
||||||
for(var t=0; t<containerIds.length; t++) {
|
for(var t=0; t<containerIds.length; t++) {
|
||||||
$tw.wiki.addTiddlers($tw.wiki.deserializeTiddlers("(DOM)",document.getElementById(containerIds[t])));
|
$tw.wiki.addTiddlers($tw.wiki.deserializeTiddlers("(DOM)",document.getElementById(containerIds[t])));
|
||||||
@ -1049,7 +1049,7 @@ $tw.loadTiddlers = function() {
|
|||||||
// On the server, we load tiddlers from specified folders
|
// On the server, we load tiddlers from specified folders
|
||||||
var folders = [
|
var folders = [
|
||||||
$tw.boot.bootPath,
|
$tw.boot.bootPath,
|
||||||
path.resolve($tw.boot.wikiPath,$tw.config.wikiShadowsSubDir),
|
path.resolve($tw.boot.wikiPath,$tw.config.wikiSystemSubDir),
|
||||||
path.resolve($tw.boot.wikiPath,$tw.config.wikiTiddlersSubDir)
|
path.resolve($tw.boot.wikiPath,$tw.config.wikiTiddlersSubDir)
|
||||||
];
|
];
|
||||||
for(var t=0; t<folders.length; t++) {
|
for(var t=0; t<folders.length; t++) {
|
||||||
|
@ -61,9 +61,9 @@ Command.prototype.subcommands.tiddlers = function() {
|
|||||||
return null; // No error
|
return null; // No error
|
||||||
};
|
};
|
||||||
|
|
||||||
Command.prototype.subcommands.shadows = function() {
|
Command.prototype.subcommands.system = function() {
|
||||||
var tiddlers = this.commander.wiki.getShadowTitles();
|
var tiddlers = this.commander.wiki.getSystemTitles();
|
||||||
this.output.write("Wiki contains these shadow tiddlers:\n");
|
this.output.write("Wiki contains these system tiddlers:\n");
|
||||||
for(var t=0; t<tiddlers.length; t++) {
|
for(var t=0; t<tiddlers.length; t++) {
|
||||||
this.output.write(tiddlers[t] + "\n");
|
this.output.write(tiddlers[t] + "\n");
|
||||||
}
|
}
|
||||||
|
@ -105,8 +105,8 @@ exports.operators = {
|
|||||||
return "$tw.utils.pushTop(subResults,currTiddlerTitle);";
|
return "$tw.utils.pushTop(subResults,currTiddlerTitle);";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "shadow":
|
case "system":
|
||||||
return "for(title in source) {if(" + op + "this.getTiddler(title).isShadow()) {$tw.utils.pushTop(subResults,title);}}";
|
return "for(title in source) {if(" + op + "this.getTiddler(title).isSystem()) {$tw.utils.pushTop(subResults,title);}}";
|
||||||
default:
|
default:
|
||||||
throw "Unknown operand for 'is' filter operator";
|
throw "Unknown operand for 'is' filter operator";
|
||||||
}
|
}
|
||||||
@ -121,8 +121,8 @@ exports.operators = {
|
|||||||
return "r = subResults.indexOf(currTiddlerTitle);\nif(r !== -1) {subResults = [currTiddlerTitle];} else {subResults = [];}";
|
return "r = subResults.indexOf(currTiddlerTitle);\nif(r !== -1) {subResults = [currTiddlerTitle];} else {subResults = [];}";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "shadow":
|
case "system":
|
||||||
return "for(r=subResults.length-1; r>=0; r--) {if(" + op + "this.getTiddler(subResults[r]).isShadow()) {subResults.splice(r,1);}}";
|
return "for(r=subResults.length-1; r>=0; r--) {if(" + op + "this.getTiddler(subResults[r]).isSystem()) {subResults.splice(r,1);}}";
|
||||||
default:
|
default:
|
||||||
throw "Unknown operand for 'is' filter operator";
|
throw "Unknown operand for 'is' filter operator";
|
||||||
}
|
}
|
||||||
|
@ -16,11 +16,11 @@ exports.hasTag = function(tag) {
|
|||||||
return this.fields.tags && this.fields.tags.indexOf(tag) !== -1;
|
return this.fields.tags && this.fields.tags.indexOf(tag) !== -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.isShadow = function() {
|
exports.isSystem = function() {
|
||||||
if(!$tw.utils.hop(this,"shadowFlag")) {
|
if(!$tw.utils.hop(this,"systemFlag")) {
|
||||||
this.shadowFlag = this.fields.title.indexOf("$:/") === 0;
|
this.systemFlag = this.fields.title.indexOf("$:/") === 0;
|
||||||
}
|
}
|
||||||
return this.shadowFlag;
|
return this.systemFlag;
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.isTemporary = function() {
|
exports.isTemporary = function() {
|
||||||
|
@ -28,11 +28,11 @@ var ListWidget = function(renderer) {
|
|||||||
These types are shorthands for particular filters
|
These types are shorthands for particular filters
|
||||||
*/
|
*/
|
||||||
var typeMappings = {
|
var typeMappings = {
|
||||||
all: "[!is[shadow]sort[title]]",
|
all: "[!is[system]sort[title]]",
|
||||||
recent: "[!is[shadow]sort[modified]]",
|
recent: "[!is[system]sort[modified]]",
|
||||||
missing: "[is[missing]sort[title]]",
|
missing: "[is[missing]sort[title]]",
|
||||||
orphans: "[is[orphan]sort[title]]",
|
orphans: "[is[orphan]sort[title]]",
|
||||||
shadows: "[is[shadow]sort[title]]"
|
system: "[is[system]sort[title]]"
|
||||||
};
|
};
|
||||||
|
|
||||||
ListWidget.prototype.generate = function() {
|
ListWidget.prototype.generate = function() {
|
||||||
@ -70,7 +70,7 @@ ListWidget.prototype.getTiddlerList = function() {
|
|||||||
filter = this.renderer.getAttribute("filter");
|
filter = this.renderer.getAttribute("filter");
|
||||||
}
|
}
|
||||||
if(!filter) {
|
if(!filter) {
|
||||||
filter = "[!is[shadow]]";
|
filter = "[!is[system]]";
|
||||||
}
|
}
|
||||||
this.list = this.renderer.renderTree.wiki.filterTiddlers(filter,this.renderer.getContextTiddlerTitle());
|
this.list = this.renderer.renderTree.wiki.filterTiddlers(filter,this.renderer.getContextTiddlerTitle());
|
||||||
};
|
};
|
||||||
|
@ -171,13 +171,13 @@ exports.addTiddler = function(tiddler) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Return a sorted array of non-shadow tiddler titles, optionally filtered by a tag
|
Return a sorted array of non-system tiddler titles, optionally filtered by a tag
|
||||||
*/
|
*/
|
||||||
exports.getTiddlers = function(sortField,excludeTag) {
|
exports.getTiddlers = function(sortField,excludeTag) {
|
||||||
sortField = sortField || "title";
|
sortField = sortField || "title";
|
||||||
var tiddlers = [], t, titles = [];
|
var tiddlers = [], t, titles = [];
|
||||||
for(t in this.tiddlers) {
|
for(t in this.tiddlers) {
|
||||||
if($tw.utils.hop(this.tiddlers,t) && !this.tiddlers[t].isShadow() && (!excludeTag || !this.tiddlers[t].hasTag(excludeTag))) {
|
if($tw.utils.hop(this.tiddlers,t) && !this.tiddlers[t].isSystem() && (!excludeTag || !this.tiddlers[t].hasTag(excludeTag))) {
|
||||||
tiddlers.push(this.tiddlers[t]);
|
tiddlers.push(this.tiddlers[t]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -257,10 +257,10 @@ exports.getOrphanTitles = function() {
|
|||||||
return []; // Todo
|
return []; // Todo
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.getShadowTitles = function() {
|
exports.getSystemTitles = function() {
|
||||||
var titles = [];
|
var titles = [];
|
||||||
for(var title in this.tiddlers) {
|
for(var title in this.tiddlers) {
|
||||||
if(this.tiddlers[title].isShadow()) {
|
if(this.tiddlers[title].isSystem()) {
|
||||||
titles.push(title);
|
titles.push(title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,6 @@ title: $:/templates/StaticContent
|
|||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
<!-- For Google, and people without JavaScript-->
|
<!-- For Google, and people without JavaScript-->
|
||||||
<$list filter="[!is[shadow]sort[title]]" >
|
<$list filter="[!is[system]sort[title]]" >
|
||||||
<$view field="title" format="text"></$view>
|
<$view field="title" format="text"></$view>
|
||||||
</$list>
|
</$list>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
title: $:/core/templates/static.template.css
|
title: $:/core/templates/static.template.css
|
||||||
|
|
||||||
{{{ [is[shadow]type[text/css]] ||$:/core/templates/plain-text-tiddler}}}
|
{{{ [is[system]type[text/css]] ||$:/core/templates/plain-text-tiddler}}}
|
||||||
{{$:/core/styles/base}}
|
{{$:/core/styles/base}}
|
||||||
|
@ -11,7 +11,7 @@ type: text/vnd.tiddlywiki-html
|
|||||||
<meta name="format-detection" content="telephone=no">
|
<meta name="format-detection" content="telephone=no">
|
||||||
<title>{{$:/core/wiki/title}}</title>
|
<title>{{$:/core/wiki/title}}</title>
|
||||||
<div id="styleArea">
|
<div id="styleArea">
|
||||||
{{{ [is[shadow]type[text/css]] ||$:/core/templates/css-tiddler}}}
|
{{{ [is[system]type[text/css]] ||$:/core/templates/css-tiddler}}}
|
||||||
</div>
|
</div>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
{{$:/core/styles/base}}
|
{{$:/core/styles/base}}
|
||||||
|
@ -2,12 +2,12 @@ title: $:/core/templates/store.area.template.html
|
|||||||
|
|
||||||
<$reveal type="nomatch" state="$:/isEncrypted" text="yes">
|
<$reveal type="nomatch" state="$:/isEncrypted" text="yes">
|
||||||
`<div id="storeArea" style="display:none;">`
|
`<div id="storeArea" style="display:none;">`
|
||||||
{{{ [!is[shadow]] ||$:/core/templates/html-div-tiddler}}}
|
{{{ [!is[system]] ||$:/core/templates/html-div-tiddler}}}
|
||||||
`</div>`
|
`</div>`
|
||||||
</$reveal>
|
</$reveal>
|
||||||
<$reveal type="match" state="$:/isEncrypted" text="yes">
|
<$reveal type="match" state="$:/isEncrypted" text="yes">
|
||||||
`<!------------- Encrypted tiddlers --------->`
|
`<!------------- Encrypted tiddlers --------->`
|
||||||
`<pre id="encryptedStoreArea" type="text/plain" style="display:none;">`
|
`<pre id="encryptedStoreArea" type="text/plain" style="display:none;">`
|
||||||
<$encrypt filter="[!is[shadow]]"/>
|
<$encrypt filter="[!is[system]]"/>
|
||||||
`</pre>`
|
`</pre>`
|
||||||
</$reveal>
|
</$reveal>
|
@ -21,7 +21,7 @@ title: $:/core/templates/tiddlywiki5.template.html
|
|||||||
<body>
|
<body>
|
||||||
<!----------- Static styles ----------->
|
<!----------- Static styles ----------->
|
||||||
<div id="styleArea">
|
<div id="styleArea">
|
||||||
{{{ [is[shadow]type[text/css]] ||$:/core/templates/css-tiddler}}}
|
{{{ [is[system]type[text/css]] ||$:/core/templates/css-tiddler}}}
|
||||||
</div>
|
</div>
|
||||||
<!----------- Static content for Google and browsers without JavaScript ----------->
|
<!----------- Static content for Google and browsers without JavaScript ----------->
|
||||||
<noscript>
|
<noscript>
|
||||||
@ -29,16 +29,16 @@ title: $:/core/templates/tiddlywiki5.template.html
|
|||||||
{{$:/templates/NewStaticContent||$:/core/templates/html-tiddler}}
|
{{$:/templates/NewStaticContent||$:/core/templates/html-tiddler}}
|
||||||
</div>
|
</div>
|
||||||
</noscript>
|
</noscript>
|
||||||
<!----------- Miscellaneous shadow tiddlers ----------->
|
<!----------- Miscellaneous system tiddlers ----------->
|
||||||
<div id="shadowArea" style="display:none;">
|
<div id="systemArea" style="display:none;">
|
||||||
{{{ [is[shadow]] -[type[text/css]] -[type[application/javascript]has[module-type]] -[type[application/javascript]library[yes]] -[[$:/core/boot.js]] -[[$:/core/bootprefix.js]] ||$:/core/templates/html-div-tiddler}}}
|
{{{ [is[system]] -[type[text/css]] -[type[application/javascript]has[module-type]] -[type[application/javascript]library[yes]] -[[$:/core/boot.js]] -[[$:/core/bootprefix.js]] ||$:/core/templates/html-div-tiddler}}}
|
||||||
</div>
|
</div>
|
||||||
<!----------- Ordinary tiddlers ----------->
|
<!----------- Ordinary tiddlers ----------->
|
||||||
{{$:/core/templates/store.area.template.html}}
|
{{$:/core/templates/store.area.template.html}}
|
||||||
<!----------- Library modules ----------->
|
<!----------- Library modules ----------->
|
||||||
<div id="libraryModules" style="display:none;">
|
<div id="libraryModules" style="display:none;">
|
||||||
{{$:/core/lib/jquery.min.js||$:/core/templates/javascript-tiddler}}
|
{{$:/core/lib/jquery.min.js||$:/core/templates/javascript-tiddler}}
|
||||||
{{{ [is[shadow]type[application/javascript]library[yes]] -[[$:/core/lib/jquery.min.js]] ||$:/core/templates/javascript-tiddler}}}
|
{{{ [is[system]type[application/javascript]library[yes]] -[[$:/core/lib/jquery.min.js]] ||$:/core/templates/javascript-tiddler}}}
|
||||||
</div>
|
</div>
|
||||||
<!----------- Boot kernel prologue ----------->
|
<!----------- Boot kernel prologue ----------->
|
||||||
<div id="bootKernelPrefix" style="display:none;">
|
<div id="bootKernelPrefix" style="display:none;">
|
||||||
@ -46,7 +46,7 @@ title: $:/core/templates/tiddlywiki5.template.html
|
|||||||
</div>
|
</div>
|
||||||
<!----------- Plugin modules ----------->
|
<!----------- Plugin modules ----------->
|
||||||
<div id="modules" style="display:none;">
|
<div id="modules" style="display:none;">
|
||||||
{{{ [is[shadow]type[application/javascript]has[module-type]] ||$:/core/templates/module-tiddler}}}
|
{{{ [is[system]type[application/javascript]has[module-type]] ||$:/core/templates/module-tiddler}}}
|
||||||
</div>
|
</div>
|
||||||
<!----------- Boot kernel ----------->
|
<!----------- Boot kernel ----------->
|
||||||
<div id="bootKernel" style="display:none;">
|
<div id="bootKernel" style="display:none;">
|
||||||
|
@ -45,8 +45,8 @@ Welcome to TiddlyWiki created by Jeremy Ruston; Copyright © 2004-2007 Jerem
|
|||||||
</div>
|
</div>
|
||||||
<div id="contentWrapper"></div>
|
<div id="contentWrapper"></div>
|
||||||
<div id="contentStash"></div>
|
<div id="contentStash"></div>
|
||||||
<div id="shadowArea">
|
<div id="systemArea">
|
||||||
{{{ [prefix[{shadow}]] +[sort-case-sensitive[title]] ||$:/core/templates/html-div-tiddler-remove-prefix}}}
|
{{{ [prefix[{system}]] +[sort-case-sensitive[title]] ||$:/core/templates/html-div-tiddler-remove-prefix}}}
|
||||||
</div>
|
</div>
|
||||||
<!--POST-SHADOWAREA-->
|
<!--POST-SHADOWAREA-->
|
||||||
<div id="storeArea">
|
<div id="storeArea">
|
||||||
|
@ -5,7 +5,7 @@ Here are a few features of TiddlyWiki that you can explore:
|
|||||||
|
|
||||||
* Invoke a demonstration wizard: <$button message="tw-modal" param="SampleWizard" class="btn btn-inverse">demo</$button> (the text of the wizard is in the tiddler SampleWizard)
|
* Invoke a demonstration wizard: <$button message="tw-modal" param="SampleWizard" class="btn btn-inverse">demo</$button> (the text of the wizard is in the tiddler SampleWizard)
|
||||||
* Save this wiki as a static HTML file: <$button message="tw-save-wiki" param="$:/core/templates/static.template.html" class="btn">Save Static</$button>
|
* Save this wiki as a static HTML file: <$button message="tw-save-wiki" param="$:/core/templates/static.template.html" class="btn">Save Static</$button>
|
||||||
* Browse the list of AllTiddlers or the ShadowTiddlers
|
* Browse the list of AllTiddlers or the SystemTiddlers
|
||||||
* Examine the example [[bitmap images|Motovun Jack.jpg]] and [[SVG images|Motovun Jack.svg]]
|
* Examine the example [[bitmap images|Motovun Jack.jpg]] and [[SVG images|Motovun Jack.svg]]
|
||||||
* Check out the TaskManagementExample
|
* Check out the TaskManagementExample
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ The machinery tying those concepts together includes:
|
|||||||
* TiddlerTemplates
|
* TiddlerTemplates
|
||||||
* DataTiddlers
|
* DataTiddlers
|
||||||
* ContentType
|
* ContentType
|
||||||
* ShadowTiddlers
|
* SystemTiddlers
|
||||||
* [[Plugins]]
|
* [[Plugins]]
|
||||||
* [[Modules]] and [[ModuleType]]
|
* [[Modules]] and [[ModuleType]]
|
||||||
|
|
||||||
|
@ -17,12 +17,12 @@ Dump the fields of an individual tiddler
|
|||||||
--dump tiddler <title>
|
--dump tiddler <title>
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! dump shadows
|
!!! dump system
|
||||||
|
|
||||||
Dump the titles of the shadow tiddlers in the wiki store
|
Dump the titles of the system tiddlers in the wiki store
|
||||||
|
|
||||||
```
|
```
|
||||||
--dump shadows
|
--dump systems
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! dump config
|
!!! dump config
|
||||||
|
@ -10,5 +10,5 @@ Save a set of tiddlers matching a filter as separate files of a specified Conten
|
|||||||
For example:
|
For example:
|
||||||
|
|
||||||
```
|
```
|
||||||
--savetiddlers [!is[shadow]] $:/core/templates/static.tiddler.html ./static text/plain
|
--savetiddlers [!is[system]] $:/core/templates/static.tiddler.html ./static text/plain
|
||||||
```
|
```
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
title: ShadowTiddlers
|
|
||||||
tags: docs concepts
|
|
||||||
|
|
||||||
TiddlyWiki models everything as [[tiddlers|Tiddlers]], including its internal components and configuration.
|
|
||||||
|
|
||||||
Thus, even an apparently empty TiddlyWiki actually contains dozens of tiddlers that are necessary to enable it function correctly. To prevent them from confusing or intimidating casual users, these system tiddlers are designated //shadow tiddlers// which means that they remain invisible unless one looks for them directly. They don't show up in lists or search results, but linking to one directly works in the usual way.
|
|
||||||
|
|
||||||
The current shadow tiddlers are:
|
|
||||||
|
|
||||||
<$list type="shadows" />
|
|
10
editions/tw5.com/tiddlers/concepts/SystemTiddlers.tid
Normal file
10
editions/tw5.com/tiddlers/concepts/SystemTiddlers.tid
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
title: SystemTiddlers
|
||||||
|
tags: docs concepts
|
||||||
|
|
||||||
|
TiddlyWiki models everything as [[tiddlers|Tiddlers]], including its internal components and configuration.
|
||||||
|
|
||||||
|
Thus, even an apparently empty TiddlyWiki actually contains dozens of tiddlers that are necessary to enable it function correctly. To prevent them from confusing casual users, these system tiddlers are hidden from most operations. They don't show up in lists or search results, but linking to one directly works in the usual way.
|
||||||
|
|
||||||
|
The current system tiddlers are:
|
||||||
|
|
||||||
|
<$list type="system" />
|
@ -48,7 +48,7 @@ The operator defaults to `title` if omitted, so `[[HelloThere]]` is equivalent t
|
|||||||
|
|
||||||
The operands available with the `is` operator are:
|
The operands available with the `is` operator are:
|
||||||
|
|
||||||
* ''shadow'': selects all shadow tiddlers
|
* ''system'': selects all system tiddlers
|
||||||
* ''current'': selects the current ContextTiddler
|
* ''current'': selects the current ContextTiddler
|
||||||
|
|
||||||
! Runs
|
! Runs
|
||||||
|
@ -12,6 +12,6 @@ The included `bld.sh` script includes these commands that are involved in genera
|
|||||||
```
|
```
|
||||||
--savetiddler $:/core/templates/static.template.html $TW5_BUILD_OUTPUT/static.html text/plain \
|
--savetiddler $:/core/templates/static.template.html $TW5_BUILD_OUTPUT/static.html text/plain \
|
||||||
--savetiddler $:/core/templates/static.template.css $TW5_BUILD_OUTPUT/static/static.css text/plain \
|
--savetiddler $:/core/templates/static.template.css $TW5_BUILD_OUTPUT/static/static.css text/plain \
|
||||||
--savetiddlers [!is[shadow]] $:/core/templates/static.tiddler.html $TW5_BUILD_OUTPUT/static text/plain \
|
--savetiddlers [!is[system]] $:/core/templates/static.tiddler.html $TW5_BUILD_OUTPUT/static text/plain \
|
||||||
```
|
```
|
||||||
The first SaveTiddlerCommand saves the static version of the DefaulTiddlers, the second saves the stylesheet, and the final SaveTiddlersCommand generates the HTML representations of individual tiddlers.
|
The first SaveTiddlerCommand saves the static version of the DefaulTiddlers, the second saves the stylesheet, and the final SaveTiddlersCommand generates the HTML representations of individual tiddlers.
|
||||||
|
@ -30,7 +30,7 @@ Each module is an ordinary `node.js`-style module, using the `require()` functio
|
|||||||
|
|
||||||
In the browser, `core/boot.js` is packed into a template HTML file that contains the following elements in order:
|
In the browser, `core/boot.js` is packed into a template HTML file that contains the following elements in order:
|
||||||
|
|
||||||
* Ordinary and shadow tiddlers, packed as HTML `<DIV>` elements
|
* Ordinary and system tiddlers, packed as HTML `<DIV>` elements
|
||||||
* `core/bootprefix.js`, containing a few lines to set up the plugin environment
|
* `core/bootprefix.js`, containing a few lines to set up the plugin environment
|
||||||
* JavaScript modules, packed as HTML `<SCRIPT>` blocks
|
* JavaScript modules, packed as HTML `<SCRIPT>` blocks
|
||||||
* `core/boot.js`, containing the boot kernel
|
* `core/boot.js`, containing the boot kernel
|
||||||
|
@ -3,4 +3,4 @@ tags: navigation
|
|||||||
|
|
||||||
Current tiddlers:
|
Current tiddlers:
|
||||||
|
|
||||||
{{{ [!is[shadow]sort[title]] }} <div><<view title link>></div> }
|
{{{ [!is[system]sort[title]] }} <div><<view title link>></div> }
|
||||||
|
@ -20,7 +20,7 @@ type: text/vnd.tiddlywiki-html
|
|||||||
<link rel="stylesheet" href="//dl-web.dropbox.com/spa/4f6lw6nhu5zn5pr/TiddlyWiki5/public/styles.css" type="text/css" />
|
<link rel="stylesheet" href="//dl-web.dropbox.com/spa/4f6lw6nhu5zn5pr/TiddlyWiki5/public/styles.css" type="text/css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="shadowArea" style="display:none;">
|
<div id="systemArea" style="display:none;">
|
||||||
<<serialize "[[$:/plugins/dropbox/Index]]" application/x-tiddler-html-div>>
|
<<serialize "[[$:/plugins/dropbox/Index]]" application/x-tiddler-html-div>>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@ -2,4 +2,4 @@ title: $:/plugins/dropbox/styles.template.css
|
|||||||
type: text/vnd.tiddlywiki-html
|
type: text/vnd.tiddlywiki-html
|
||||||
|
|
||||||
/* utf8beacon: éçñøåá— */
|
/* utf8beacon: éçñøåá— */
|
||||||
<<serialize "[is[shadow]type[text/css]]" text/plain>>
|
<<serialize "[is[system]type[text/css]]" text/plain>>
|
||||||
|
@ -2,9 +2,9 @@ title: $:/plugins/dropbox/tw5dropbox.template.js
|
|||||||
type: text/vnd.tiddlywiki-html
|
type: text/vnd.tiddlywiki-html
|
||||||
|
|
||||||
/* utf8beacon: éçñøåá— */
|
/* utf8beacon: éçñøåá— */
|
||||||
<<serialize "[is[shadow]type[application/javascript]library[yes]] -[[$:/library/sjcl.js]]" text/plain>>
|
<<serialize "[is[system]type[application/javascript]library[yes]] -[[$:/library/sjcl.js]]" text/plain>>
|
||||||
<<serialize "$:/core/bootprefix.js" text/plain>>
|
<<serialize "$:/core/bootprefix.js" text/plain>>
|
||||||
<<serialize "[is[shadow]] -[type[text/css]] -[type[application/javascript]has[module-type]] -[type[application/javascript]library[yes]] -[[$:/core/boot.js]] -[[$:/core/bootprefix.js]]" application/x-tiddler-javascript>>
|
<<serialize "[is[system]] -[type[text/css]] -[type[application/javascript]has[module-type]] -[type[application/javascript]library[yes]] -[[$:/core/boot.js]] -[[$:/core/bootprefix.js]]" application/x-tiddler-javascript>>
|
||||||
<<serialize "[is[shadow]type[application/javascript]has[module-type]]" application/x-tiddler-module-plain>>
|
<<serialize "[is[system]type[application/javascript]has[module-type]]" application/x-tiddler-module-plain>>
|
||||||
<<serialize "$:/core/boot.js" text/plain>>
|
<<serialize "$:/core/boot.js" text/plain>>
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ type: text/vnd.tiddlywiki-html
|
|||||||
<body>
|
<body>
|
||||||
<!----------- Static styles ----------->
|
<!----------- Static styles ----------->
|
||||||
<div id="styleArea">
|
<div id="styleArea">
|
||||||
<<serialize "[is[shadow]type[text/css]]" application/x-tiddler-css>>
|
<<serialize "[is[system]type[text/css]]" application/x-tiddler-css>>
|
||||||
</div>
|
</div>
|
||||||
<!----------- Static content for Google and browsers without JavaScript ----------->
|
<!----------- Static content for Google and browsers without JavaScript ----------->
|
||||||
<noscript>
|
<noscript>
|
||||||
@ -33,9 +33,9 @@ type: text/vnd.tiddlywiki-html
|
|||||||
<<serialize "$:/templates/StaticContent" text/html>>
|
<<serialize "$:/templates/StaticContent" text/html>>
|
||||||
</div>
|
</div>
|
||||||
</noscript>
|
</noscript>
|
||||||
<!----------- Miscellaneous shadow tiddlers ----------->
|
<!----------- Miscellaneous system tiddlers ----------->
|
||||||
<div id="shadowArea" style="display:none;">
|
<div id="systemArea" style="display:none;">
|
||||||
<<serialize "[is[shadow]] -[type[text/css]] -[type[application/javascript]has[module-type]] -[type[application/javascript]library[yes]] -[[$:/core/boot.js]] -[[$:/core/bootprefix.js]]" application/x-tiddler-html-div>>
|
<<serialize "[is[system]] -[type[text/css]] -[type[application/javascript]has[module-type]] -[type[application/javascript]library[yes]] -[[$:/core/boot.js]] -[[$:/core/bootprefix.js]]" application/x-tiddler-html-div>>
|
||||||
</div>
|
</div>
|
||||||
<!----------- Ordinary tiddlers ----------->
|
<!----------- Ordinary tiddlers ----------->
|
||||||
<div id="storeArea" style="display:none;">
|
<div id="storeArea" style="display:none;">
|
||||||
@ -44,7 +44,7 @@ type: text/vnd.tiddlywiki-html
|
|||||||
<!----------- Library modules ----------->
|
<!----------- Library modules ----------->
|
||||||
<div id="libraryModules" style="display:none;">
|
<div id="libraryModules" style="display:none;">
|
||||||
<<serialize "[[$:/core/lib/jquery.min.js]]" application/x-tiddler-library>>
|
<<serialize "[[$:/core/lib/jquery.min.js]]" application/x-tiddler-library>>
|
||||||
<<serialize "[is[shadow]type[application/javascript]library[yes]] -[[$:/core/lib/jquery.min.js]]" application/x-tiddler-library>>
|
<<serialize "[is[system]type[application/javascript]library[yes]] -[[$:/core/lib/jquery.min.js]]" application/x-tiddler-library>>
|
||||||
</div>
|
</div>
|
||||||
<!----------- Boot kernel prologue ----------->
|
<!----------- Boot kernel prologue ----------->
|
||||||
<div id="bootKernelPrefix" style="display:none;">
|
<div id="bootKernelPrefix" style="display:none;">
|
||||||
@ -52,7 +52,7 @@ type: text/vnd.tiddlywiki-html
|
|||||||
</div>
|
</div>
|
||||||
<!----------- Plugin modules ----------->
|
<!----------- Plugin modules ----------->
|
||||||
<div id="modules" style="display:none;">
|
<div id="modules" style="display:none;">
|
||||||
<<serialize "[is[shadow]type[application/javascript]has[module-type]]" application/x-tiddler-module>>
|
<<serialize "[is[system]type[application/javascript]has[module-type]]" application/x-tiddler-module>>
|
||||||
</div>
|
</div>
|
||||||
<!----------- Boot kernel ----------->
|
<!----------- Boot kernel ----------->
|
||||||
<div id="bootKernel" style="display:none;">
|
<div id="bootKernel" style="display:none;">
|
||||||
|
@ -17,7 +17,7 @@ exports.startup = function(loggedIn) {
|
|||||||
var index = $tw.wiki.getTiddlerData($tw.plugins.dropbox.titleTiddlerIndex);
|
var index = $tw.wiki.getTiddlerData($tw.plugins.dropbox.titleTiddlerIndex);
|
||||||
if(index) {
|
if(index) {
|
||||||
$tw.wiki.addTiddlers(index.tiddlers);
|
$tw.wiki.addTiddlers(index.tiddlers);
|
||||||
$tw.wiki.addTiddlers(index.shadows,true);
|
$tw.wiki.addTiddlers(index.systemTiddlers,true);
|
||||||
$tw.plugins.dropbox.fileInfo = index.fileInfo;
|
$tw.plugins.dropbox.fileInfo = index.fileInfo;
|
||||||
}
|
}
|
||||||
if(loggedIn) {
|
if(loggedIn) {
|
||||||
|
@ -26,7 +26,7 @@ $tw.plugins.dropbox = {
|
|||||||
client: null, // Dropbox.js client object
|
client: null, // Dropbox.js client object
|
||||||
fileInfo: {}, // Hashmap of each filename as retrieved from Dropbox (including .meta files): {versionTag:,title:}
|
fileInfo: {}, // Hashmap of each filename as retrieved from Dropbox (including .meta files): {versionTag:,title:}
|
||||||
titleInfo: {}, // Hashmap of each tiddler title retrieved from Dropbox to filename
|
titleInfo: {}, // Hashmap of each tiddler title retrieved from Dropbox to filename
|
||||||
// Titles of various shadow tiddlers used by the plugin
|
// Titles of various system tiddlers used by the plugin
|
||||||
titleIsLoggedIn: "$:/plugins/dropbox/IsLoggedIn",
|
titleIsLoggedIn: "$:/plugins/dropbox/IsLoggedIn",
|
||||||
titleUserName: "$:/plugins/dropbox/UserName",
|
titleUserName: "$:/plugins/dropbox/UserName",
|
||||||
titlePublicAppUrl: "$:/plugins/dropbox/PublicAppUrl",
|
titlePublicAppUrl: "$:/plugins/dropbox/PublicAppUrl",
|
||||||
@ -385,11 +385,11 @@ Save the index file
|
|||||||
*/
|
*/
|
||||||
$tw.plugins.dropbox.saveTiddlerIndex = function(path,callback) {
|
$tw.plugins.dropbox.saveTiddlerIndex = function(path,callback) {
|
||||||
// Get the tiddler index information
|
// Get the tiddler index information
|
||||||
var index = {tiddlers: [],shadows: [], fileInfo: $tw.plugins.dropbox.fileInfo};
|
var index = {tiddlers: [],systemTiddlers: [], fileInfo: $tw.plugins.dropbox.fileInfo};
|
||||||
// First all the tiddlers
|
// First all the tiddlers
|
||||||
$tw.wiki.forEachTiddler(function(title,tiddler) {
|
$tw.wiki.forEachTiddler(function(title,tiddler) {
|
||||||
if(tiddler.isShadow) {
|
if(tiddler.isSystem) {
|
||||||
index.shadows.push(tiddler.fields);
|
index.systemTiddlers.push(tiddler.fields);
|
||||||
} else {
|
} else {
|
||||||
index.tiddlers.push(tiddler.fields);
|
index.tiddlers.push(tiddler.fields);
|
||||||
}
|
}
|
||||||
|
@ -71,9 +71,9 @@ Dump the titles of the tiddlers in the wiki store </p><pre>
|
|||||||
dump tiddler</h3><p>
|
dump tiddler</h3><p>
|
||||||
Dump the fields of an individual tiddler </p><pre>
|
Dump the fields of an individual tiddler </p><pre>
|
||||||
--dump tiddler <title></pre><h3 class=''>
|
--dump tiddler <title></pre><h3 class=''>
|
||||||
dump shadows</h3><p>
|
dump system</h3><p>
|
||||||
Dump the titles of the shadow tiddlers in the wiki store </p><pre>
|
Dump the titles of the system tiddlers in the wiki store </p><pre>
|
||||||
--dump shadows</pre><h3 class=''>
|
--dump systems</pre><h3 class=''>
|
||||||
dump config</h3><p>
|
dump config</h3><p>
|
||||||
Dump the current core configuration </p><pre>
|
Dump the current core configuration </p><pre>
|
||||||
--dump config</pre></div></div></span></div><div class='tw-list-element'>
|
--dump config</pre></div></div></span></div><div class='tw-list-element'>
|
||||||
@ -115,7 +115,7 @@ text/html</code>) and extension (defaults to <code>
|
|||||||
.html</code>).</p><pre>
|
.html</code>).</p><pre>
|
||||||
--savetiddlers <filter> <template> <pathname> [<type>] [<extension>]</pre><p>
|
--savetiddlers <filter> <template> <pathname> [<type>] [<extension>]</pre><p>
|
||||||
For example:</p><pre>
|
For example:</p><pre>
|
||||||
--savetiddlers [!is[shadow]] $:/core/templates/static.tiddler.html ./static text/plain</pre></div></div></span></div><div class='tw-list-element'>
|
--savetiddlers [!is[system]] $:/core/templates/static.tiddler.html ./static text/plain</pre></div></div></span></div><div class='tw-list-element'>
|
||||||
<span class='tw-transclude'>
|
<span class='tw-transclude'>
|
||||||
<h3 class=''>
|
<h3 class=''>
|
||||||
<span class='tw-view-link'>
|
<span class='tw-view-link'>
|
||||||
|
Loading…
Reference in New Issue
Block a user