Merge branch 'master' of https://github.com/Jermolene/TiddlyWiki5 into de-DE

This commit is contained in:
Mario Pietsch 2014-02-25 12:13:30 +01:00
commit 470c056b8d
34 changed files with 527 additions and 99 deletions

View File

@ -1456,6 +1456,7 @@ $tw.boot.startup = function(options) {
pluginsPath: "../plugins/",
themesPath: "../themes/",
languagesPath: "../languages/",
editionsPath: "../editions/",
wikiInfo: "./tiddlywiki.info",
wikiPluginsSubDir: "./plugins",
wikiThemesSubDir: "./themes",

View File

@ -16,6 +16,7 @@ tiddlerdeserializer: Converts different content types into tiddlers.
tiddlerfield: Defines the behaviour of an individual tiddler field.
tiddlermethod: Adds methods to the `$tw.Tiddler` prototype.
utils: Adds methods to `$tw.utils`.
utils-node: Adds Node.js-specific methods to `$tw.utils`.
widget: Widgets encapsulate DOM rendering and refreshing.
wikimethod: Adds methods to `$tw.Wiki`.
wikirule: Individual parser rules for the main WikiText parser.

View File

@ -0,0 +1,59 @@
/*\
title: $:/core/modules/commands/init.js
type: application/javascript
module-type: command
Command to initialise an empty wiki folder
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.info = {
name: "init",
synchronous: true
};
var Command = function(params,commander) {
this.params = params;
this.commander = commander;
};
Command.prototype.execute = function() {
var fs = require("fs"),
path = require("path");
// Check that we don't already have a valid wiki folder
if($tw.boot.wikiTiddlersPath) {
return "Wiki folder is not empty";
}
// Loop through each of the specified editions
var editions = this.params.length > 0 ? this.params : ["empty"];
for(var editionIndex=0; editionIndex<editions.length; editionIndex++) {
var editionName = editions[editionIndex];
// Check the edition exists
var editionPath = path.resolve($tw.boot.corePath,$tw.config.editionsPath) + "/" + editionName;
if(!$tw.utils.isDirectory(editionPath)) {
return "Edition '" + editionName + "' not found";
}
// Copy the edition content
var err = $tw.utils.copyDirectory(editionPath,$tw.boot.wikiPath);
if(!err) {
this.commander.streams.output.write("Copied edition '" + editionName + "' to " + $tw.boot.wikiPath + "\n");
} else {
return err;
}
}
// Tweak the tiddlywiki.info to remove any included wikis
var packagePath = $tw.boot.wikiPath + "/tiddlywiki.info",
packageJson = JSON.parse(fs.readFileSync(packagePath));
delete packageJson.includeWikis;
fs.writeFileSync(packagePath,JSON.stringify(packageJson,null,$tw.config.preferences.jsonSpaces));
return null;
};
exports.Command = Command;
})();

View File

@ -18,6 +18,9 @@ exports.startup = function() {
var modules,n,m,f,commander;
// Load modules
$tw.modules.applyMethods("utils",$tw.utils);
if($tw.node) {
$tw.modules.applyMethods("utils-node",$tw.utils);
}
$tw.modules.applyMethods("global",$tw);
$tw.modules.applyMethods("config",$tw.config);
if($tw.browser) {

View File

@ -0,0 +1,111 @@
/*\
title: $:/core/modules/utils/filesystem.js
type: application/javascript
module-type: utils-node
File system utilities
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var fs = require("fs"),
path = require("path");
/*
Recursively (and synchronously) copy a directory and all its content
*/
exports.copyDirectory = function(srcPath,dstPath) {
// Remove any trailing path separators
srcPath = $tw.utils.removeTrailingSeparator(srcPath);
dstPath = $tw.utils.removeTrailingSeparator(dstPath);
// Create the destination directory
var err = $tw.utils.createDirectory(dstPath);
if(err) {
return err;
}
// Function to copy a folder full of files
var copy = function(srcPath,dstPath) {
var srcStats = fs.lstatSync(srcPath),
dstExists = fs.existsSync(dstPath);
if(srcStats.isFile()) {
$tw.utils.copyFile(srcPath,dstPath);
} else if(srcStats.isDirectory()) {
var items = fs.readdirSync(srcPath);
for(var t=0; t<items.length; t++) {
var item = items[t],
err = copy(srcPath + path.sep + item,dstPath + path.sep + item);
if(err) {
return err;
}
};
}
};
copy(srcPath,dstPath);
return null;
};
/*
Copy a file
*/
var FILE_BUFFER_LENGTH = 64 * 1024,
fileBuffer = $tw.node && new Buffer(FILE_BUFFER_LENGTH);
exports.copyFile = function(srcPath,dstPath) {
// Create any directories in the destination
$tw.utils.createDirectory(path.dirname(dstPath));
// Copy the file
var srcFile = fs.openSync(srcPath,"r"),
dstFile = fs.openSync(dstPath,"w"),
bytesRead = 1,
pos = 0;
while (bytesRead > 0) {
bytesRead = fs.readSync(srcFile,fileBuffer,0,FILE_BUFFER_LENGTH,pos);
fs.writeSync(dstFile,fileBuffer,0,bytesRead);
pos += bytesRead;
}
fs.closeSync(srcFile);
fs.closeSync(dstFile);
return null;
}
/*
Remove trailing path separator
*/
exports.removeTrailingSeparator = function(dirPath) {
var len = dirPath.length;
if(dirPath.charAt(len-1) === path.sep) {
dirPath = dirPath.substr(0,len-1);
}
return dirPath;
};
/*
Recursively create a directory
*/
exports.createDirectory = function(dirPath) {
var parts = dirPath.split(path.sep);
for(var component=0; component<parts.length; component++) {
var subDirPath = parts.slice(0,component+1).join(path.sep);
if(!$tw.utils.isDirectory(subDirPath)) {
try {
fs.mkdirSync(subDirPath);
} catch(e) {
return "Error creating directory '" + subDirPath + "'";
}
}
}
return null;
};
/*
Check if a path identifies a directory
*/
exports.isDirectory = function(dirPath) {
return fs.existsSync(dirPath) && fs.statSync(dirPath).isDirectory();
};
})();

View File

@ -436,4 +436,15 @@ exports.base64Decode = function(string64) {
}
};
/*
Convert a hashmap into a tiddler dictionary format sequence of name:value pairs
*/
exports.makeTiddlerDictionary = function(data) {
var output = [];
for(var name in data) {
output.push(name + ": " + data[name]);
}
return output.join("\n");
};
})();

View File

@ -203,6 +203,10 @@ NavigatorWidget.prototype.handleDeleteTiddlerEvent = function(event) {
if(tiddler.hasField("draft.title")) {
// Delete the original tiddler
var originalTitle = tiddler.fields["draft.of"];
// Ask for confirmation if the tiddler has changed
if(!confirm("Do you wish to delete the tiddler '" + originalTitle + "'")) {
return false;
}
this.wiki.deleteTiddler(originalTitle);
this.removeTitleFromStory(storyList,originalTitle);
}

View File

@ -620,8 +620,17 @@ data: object that can be serialised to JSON
fields: optional hashmap of additional tiddler fields to be set
*/
exports.setTiddlerData = function(title,data,fields) {
var tiddler = this.getTiddler(title);
this.addTiddler(new $tw.Tiddler(tiddler,fields,{title: title, type: "application/json", text: JSON.stringify(data,null,$tw.config.preferences.jsonSpaces)},this.getModificationFields()));
var existingTiddler = this.getTiddler(title),
newFields = {
title: title
};
if(existingTiddler && existingTiddler.fields.type === "application/x-tiddler-dictionary") {
newFields.text = $tw.utils.makeTiddlerDictionary(data);
} else {
newFields.type = "application/json";
newFields.text = JSON.stringify(data,null,$tw.config.preferences.jsonSpaces);
}
this.addTiddler(new $tw.Tiddler(existingTiddler,fields,newFields,this.getModificationFields()));
};
/*

View File

@ -22,6 +22,12 @@ dropdown-border: <<colour muted-foreground>>
dropdown-tab-background-selected: #fff
dropdown-tab-background: #ececec
dropzone-background: rgba(0,200,0,0.7)
external-link-background-hover:
external-link-background-visited:
external-link-background:
external-link-foreground-hover:
external-link-foreground-visited: #0000aa
external-link-foreground: #0000ee
foreground: #333333
message-background: #ecf2ff
message-border: #cfd6e6
@ -41,11 +47,17 @@ pre-border: #cccccc
primary: #7897f3
sidebar-controls-foreground-hover: #000000
sidebar-controls-foreground: #ccc
sidebar-foreground: #acacac
sidebar-foreground-shadow: rgba(255,255,255, 0.8)
sidebar-foreground: #acacac
sidebar-muted-foreground-hover: #444444
sidebar-muted-foreground: #c0c0c0
sidebar-tab-background-selected: #ffffff
sidebar-tab-background: <<colour tab-background>>
sidebar-tab-border-selected: <<colour tab-border-selected>>
sidebar-tab-border: <<colour tab-border>>
sidebar-tab-divider: <<colour tab-divider>>
sidebar-tab-foreground-selected:
sidebar-tab-foreground: <<colour tab-foreground>>
sidebar-tiddler-link-foreground-hover: #444444
sidebar-tiddler-link-foreground: #7897f3
static-alert-foreground: #aaaaaa
@ -54,6 +66,7 @@ tab-background: #eeeeee
tab-border-selected: #cccccc
tab-border: #cccccc
tab-divider: #d8d8d8
tab-foreground-selected: <<colour tab-foreground>>
tab-foreground: #666666
table-border: #dddddd
table-footer-background: #a8a8a8
@ -77,5 +90,14 @@ tiddler-link-background: <<colour background>>
tiddler-link-foreground: <<colour primary>>
tiddler-subtitle-foreground: #c0c0c0
tiddler-title-foreground: #ff9900
toolbar-new-button:
toolbar-options-button:
toolbar-save-button:
toolbar-info-button:
toolbar-edit-button:
toolbar-close-button:
toolbar-delete-button:
toolbar-cancel-button:
toolbar-done-button:
untagged-background: #999999
very-muted-foreground: #888888

View File

@ -22,6 +22,12 @@ dropdown-border: <<colour muted-foreground>>
dropdown-tab-background-selected: #fff
dropdown-tab-background: #ececec
dropzone-background: rgba(0,200,0,0.7)
external-link-background-hover:
external-link-background-visited:
external-link-background:
external-link-foreground-hover:
external-link-foreground-visited: #0000aa
external-link-foreground: #0000ee
foreground: #333353
message-background: #ecf2ff
message-border: #cfd6e6
@ -41,11 +47,17 @@ pre-border: #cccccc
primary: #5778d8
sidebar-controls-foreground-hover: #000000
sidebar-controls-foreground: #ffffff
sidebar-foreground: #acacac
sidebar-foreground-shadow: rgba(255,255,255, 0.8)
sidebar-foreground: #acacac
sidebar-muted-foreground-hover: #444444
sidebar-muted-foreground: #c0c0c0
sidebar-tab-background-selected: <<colour page-background>>
sidebar-tab-background: <<colour tab-background>>
sidebar-tab-border-selected: <<colour tab-border-selected>>
sidebar-tab-border: <<colour tab-border>>
sidebar-tab-divider: <<colour tab-divider>>
sidebar-tab-foreground-selected:
sidebar-tab-foreground: <<colour tab-foreground>>
sidebar-tiddler-link-foreground-hover: #444444
sidebar-tiddler-link-foreground: #5959c0
static-alert-foreground: #aaaaaa
@ -54,6 +66,7 @@ tab-background: #ccccdd
tab-border-selected: #ccccdd
tab-border: #cccccc
tab-divider: #d8d8d8
tab-foreground-selected: <<colour tab-foreground>>
tab-foreground: #666666
table-border: #dddddd
table-footer-background: #a8a8a8
@ -62,7 +75,7 @@ tag-background: #eeeeff
tag-foreground: #000
tiddler-background: <<colour background>>
tiddler-border: <<colour background>>
tiddler-controls-foreground-hover: #888888
tiddler-controls-foreground-hover: #666666
tiddler-controls-foreground-selected: #444444
tiddler-controls-foreground: #cccccc
tiddler-editor-background: #f8f8f8
@ -77,5 +90,14 @@ tiddler-link-background: <<colour background>>
tiddler-link-foreground: <<colour primary>>
tiddler-subtitle-foreground: #c0c0c0
tiddler-title-foreground: #5959c0
toolbar-new-button: #5eb95e
toolbar-options-button: rgb(128, 88, 165)
toolbar-save-button: #0e90d2
toolbar-info-button: #0e90d2
toolbar-edit-button: rgb(243, 123, 29)
toolbar-close-button: #dd514c
toolbar-delete-button: #dd514c
toolbar-cancel-button: rgb(243, 123, 29)
toolbar-done-button: #5eb95e
untagged-background: #999999
very-muted-foreground: #888888

View File

@ -22,6 +22,12 @@ dropdown-border: <<colour muted-foreground>>
dropdown-tab-background-selected: #fff
dropdown-tab-background: #ececec
dropzone-background: rgba(0,200,0,0.7)
external-link-background-hover:
external-link-background-visited:
external-link-background:
external-link-foreground-hover:
external-link-foreground-visited: #0000aa
external-link-foreground: #0000ee
foreground: #333333
message-background: #ecf2ff
message-border: #cfd6e6
@ -41,11 +47,17 @@ pre-border: #cccccc
primary: #5778d8
sidebar-controls-foreground-hover: #000000
sidebar-controls-foreground: #ffffff
sidebar-foreground: #ffffff
sidebar-foreground-shadow: rgba(255,0,0, 0.5)
sidebar-foreground: #ffffff
sidebar-muted-foreground-hover: #444444
sidebar-muted-foreground: #c0c0c0
sidebar-tab-background-selected: #ececec
sidebar-tab-background: <<colour tab-background>>
sidebar-tab-border-selected: <<colour tab-border-selected>>
sidebar-tab-border: <<colour tab-border>>
sidebar-tab-divider: <<colour tab-divider>>
sidebar-tab-foreground-selected:
sidebar-tab-foreground: <<colour tab-foreground>>
sidebar-tiddler-link-foreground-hover: #444444
sidebar-tiddler-link-foreground: #999999
static-alert-foreground: #aaaaaa
@ -54,6 +66,7 @@ tab-background: #d8d8d8
tab-border-selected: #d8d8d8
tab-border: #cccccc
tab-divider: #d8d8d8
tab-foreground-selected: <<colour tab-foreground>>
tab-foreground: #666666
table-border: #dddddd
table-footer-background: #a8a8a8
@ -77,5 +90,14 @@ tiddler-link-background: <<colour background>>
tiddler-link-foreground: <<colour primary>>
tiddler-subtitle-foreground: #c0c0c0
tiddler-title-foreground: #182955
toolbar-new-button:
toolbar-options-button:
toolbar-save-button:
toolbar-info-button:
toolbar-edit-button:
toolbar-close-button:
toolbar-delete-button:
toolbar-cancel-button:
toolbar-done-button:
untagged-background: #999999
very-muted-foreground: #888888

View File

@ -22,6 +22,12 @@ dropdown-border: <<colour muted-foreground>>
dropdown-tab-background-selected: #fff
dropdown-tab-background: #ececec
dropzone-background: rgba(0,200,0,0.7)
external-link-background-hover:
external-link-background-visited:
external-link-background:
external-link-foreground-hover:
external-link-foreground-visited: #0000aa
external-link-foreground: #0000ee
foreground: #333333
message-background: #ecf2ff
message-border: #cfd6e6
@ -41,11 +47,17 @@ pre-border: #cccccc
primary: #cc0000
sidebar-controls-foreground-hover: #000000
sidebar-controls-foreground: #ffffff
sidebar-foreground: #acacac
sidebar-foreground-shadow: rgba(255,255,255, 0.0)
sidebar-foreground: #acacac
sidebar-muted-foreground-hover: #444444
sidebar-muted-foreground: #c0c0c0
sidebar-tab-background-selected: #000
sidebar-tab-background: <<colour tab-background>>
sidebar-tab-border-selected: <<colour tab-border-selected>>
sidebar-tab-border: <<colour tab-border>>
sidebar-tab-divider: <<colour tab-divider>>
sidebar-tab-foreground-selected:
sidebar-tab-foreground: <<colour tab-foreground>>
sidebar-tiddler-link-foreground-hover: #ffbb99
sidebar-tiddler-link-foreground: #cc0000
static-alert-foreground: #aaaaaa
@ -54,6 +66,7 @@ tab-background: #d8d8d8
tab-border-selected: #d8d8d8
tab-border: #cccccc
tab-divider: #d8d8d8
tab-foreground-selected: <<colour tab-foreground>>
tab-foreground: #666666
table-border: #dddddd
table-footer-background: #a8a8a8
@ -77,5 +90,14 @@ tiddler-link-background: <<colour background>>
tiddler-link-foreground: <<colour primary>>
tiddler-subtitle-foreground: #c0c0c0
tiddler-title-foreground: #cc0000
toolbar-new-button:
toolbar-options-button:
toolbar-save-button:
toolbar-info-button:
toolbar-edit-button:
toolbar-close-button:
toolbar-delete-button:
toolbar-cancel-button:
toolbar-done-button:
untagged-background: #999999
very-muted-foreground: #888888

View File

@ -22,6 +22,12 @@ dropdown-border: <<colour muted-foreground>>
dropdown-tab-background-selected: #fff
dropdown-tab-background: #ececec
dropzone-background: rgba(0,200,0,0.7)
external-link-background-hover:
external-link-background-visited:
external-link-background:
external-link-foreground-hover:
external-link-foreground-visited: #0000aa
external-link-foreground: #0000ee
foreground: #333333
message-background: #ecf2ff
message-border: #cfd6e6
@ -41,11 +47,17 @@ pre-border: #cccccc
primary: #5778d8
sidebar-controls-foreground-hover: #000000
sidebar-controls-foreground: #ffffff
sidebar-foreground: #acacac
sidebar-foreground-shadow: rgba(255,255,255, 0.8)
sidebar-foreground: #acacac
sidebar-muted-foreground-hover: #444444
sidebar-muted-foreground: #c0c0c0
sidebar-tab-background-selected: #ececec
sidebar-tab-background: <<colour tab-background>>
sidebar-tab-border-selected: <<colour tab-border-selected>>
sidebar-tab-border: <<colour tab-border>>
sidebar-tab-divider: #e4e4e4
sidebar-tab-foreground-selected:
sidebar-tab-foreground: <<colour tab-foreground>>
sidebar-tiddler-link-foreground-hover: #444444
sidebar-tiddler-link-foreground: #999999
static-alert-foreground: #aaaaaa
@ -54,6 +66,7 @@ tab-background: #d8d8d8
tab-border-selected: #d8d8d8
tab-border: #cccccc
tab-divider: #d8d8d8
tab-foreground-selected: <<colour tab-foreground>>
tab-foreground: #666666
table-border: #dddddd
table-footer-background: #a8a8a8
@ -77,5 +90,14 @@ tiddler-link-background: <<colour background>>
tiddler-link-foreground: <<colour primary>>
tiddler-subtitle-foreground: #c0c0c0
tiddler-title-foreground: #182955
toolbar-new-button:
toolbar-options-button:
toolbar-save-button:
toolbar-info-button:
toolbar-edit-button:
toolbar-close-button:
toolbar-delete-button:
toolbar-cancel-button:
toolbar-done-button:
untagged-background: #999999
very-muted-foreground: #888888

View File

@ -0,0 +1,12 @@
{
"plugins": [
"tiddlywiki/tiddlyweb",
"tiddlywiki/filesystem",
"tiddlywiki/codemirror",
"tiddlywiki/highlight"
],
"themes": [
"tiddlywiki/vanilla",
"tiddlywiki/snowwhite"
]
}

View File

@ -1,5 +1,5 @@
<h1 class=''>Building <span>TiddlyWikiClassic</span></h1><p><span>TiddlyWiki5</span> can be used to build older 2.x.x versions of <span>TiddlyWikiClassic</span> from their constituent components. Doing so involves these features:</p><ul><li>The <code>tiddlywiki/classictools</code> plugin, containing a deserializer module which allows tiddlers to be loaded from <span>TiddlyWiki</span> 2.x.x <code>.recipe</code> files</li><li>The <code>stripcomments</code> format for the <span>ViewWidget</span>, which strips single line <span>JavaScript</span> comments starting <code>//#</code></li><li>The <code>stripTitlePrefix='yes'</code> attribute of the <span>FieldsWidget</span>, which removes prefixes wrapped in curly braces from the <code>title</code> attribute<ul><li>For example, <code>{tiddler}HelloThere</code> would be transformed to <code>HelloThere</code></li></ul></li></ul><h1 class=''>Usage</h1><p><span>TiddlyWikiClassic</span> is built from the command line by running <span>TiddlyWiki on Node.js</span>. A typical usage would be:</p><pre>node ../../tiddlywiki.js \
<h1 class=''>Building <span>TiddlyWikiClassic</span></h1><p><span>TiddlyWiki5</span> can be used to build older 2.x.x versions of <span>TiddlyWikiClassic</span> from their constituent components. Doing so involves these features:</p><ul><li>The <code>tiddlywiki/classictools</code> plugin, containing a deserializer module which allows tiddlers to be loaded from <span>TiddlyWiki</span> 2.x.x <code>.recipe</code> files</li><li>The <code>stripcomments</code> format for the <span>ViewWidget</span>, which strips single line <span>JavaScript</span> comments starting <code>//#</code></li><li>The <code>stripTitlePrefix='yes'</code> attribute of the <span>FieldsWidget</span>, which removes prefixes wrapped in curly braces from the <code>title</code> attribute<ul><li>For example, <code>{tiddler}HelloThere</code> would be transformed to <code>HelloThere</code></li></ul></li></ul><h1 class=''>Usage</h1><p><span>TiddlyWikiClassic</span> is built from the command line by running <span>TiddlyWiki on Node.js</span>. A typical usage would be:</p><pre><code>node ../../tiddlywiki.js \
--verbose \
--load &lt;path_to_recipe_file&gt; \
--rendertiddler $:/core/templates/tiddlywiki2.template.html &lt;path_to_write_index_file&gt; text/plain \
|| exit 1</pre>
|| exit 1</code></pre>

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -1,5 +1,5 @@
created: 20140127143652456
modified: 20140206191028534
modified: 20140223191618338
tags: releasenote
title: Release 5.0.8-beta
type: text/vnd.tiddlywiki
@ -10,8 +10,9 @@ type: text/vnd.tiddlywiki
See [[Notes for upgrading to 5.0.8-beta]] for more details of these changes:
* Changed wikitext syntax rules for parsing content of HTML elements
* Changed rules for parsing content of HTML elements
* Switched SiteTitle and SiteSubtitle to [[$:/SiteTitle]] and [[$:/SiteSubtitle]]
* Changes to commands used with [[TiddlyWiki on Node.js]]
!! Documentation Improvements
@ -20,6 +21,7 @@ See [[Notes for upgrading to 5.0.8-beta]] for more details of these changes:
!! Usability Improvements
* Rejigged [[$:/ControlPanel]] to use nested tabs
* Added confirmation dialogue when deleting tiddlers
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/e3a05625b2368b2167a2a1b30aa82369e96a7538]] experimental KeyboardWidget, including support for ''ctrl-enter'' (or ''cmd-enter'') to finish editing a tiddler
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/a01bbd4b9c7ca284141078340c8f568b1e0561a2]] [[automatic saving|AutoSave]] on editing a tiddler and a warning when attempting to close the window with unsaved changes
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/e6fa9b8a859867c147fb289859169b204dea003e]] number of tags to control panel ''Basics'' tab
@ -39,6 +41,7 @@ See [[Notes for upgrading to 5.0.8-beta]] for more details of these changes:
!! Hackability Improvements
* Extended ButtonWidget to allow navigating to a tiddler
* Added experimental support for building plugins in the browser: [[How to create plugins in the browser]]
* Extend the TranscludeWidget to display its content as a fallback if the tiddler or field is missing
* Add logging and AlertMechanism

View File

@ -0,0 +1,26 @@
created: 20140223195548209
modified: 20140223195738745
tags: command
title: InitCommand
type: text/vnd.tiddlywiki
Initialise an empty [[WikiFolder|WikiFolders]] with a copy of the specified edition.
```
--init <edition> [<edition> ...]
```
For example:
```
tiddlywiki ./MyWikiFolder --init empty
```
Note:
* The edition directory will be created if necessary
* The "edition" defaults to ''empty''
* The init command will fail if the wiki folder does not exist, or is not empty
* The init command removes any `includeWikis` definitions in the edition's `tiddlywiki.info` file
* When multiple editions are specified, editions initialised later will overwrite any files shared with earlier editions (so, the final `tiddlywiki.info` file will be copied from the last edition)

View File

@ -8,6 +8,8 @@ The ''Oxford ~TiddlyWiki Interest Group'' meets monthly for discussions and demo
See https://oxtwig.eventbrite.co.uk/ for details of our next meeting.
We have an email discussion list, too: https://groups.google.com/forum/#!members/oxtwig
! OXTWIG #2
The second OXTWIG meeting was held on Thursday 16th January 2014:

View File

@ -1,5 +1,5 @@
created: 20131219100608529
modified: 20140102214547249
modified: 20140224134148737
tags: howto
title: Installing TiddlyWiki on Node.js
type: text/vnd.tiddlywiki
@ -12,11 +12,10 @@ type: text/vnd.tiddlywiki
#> `sudo npm install -g tiddlywiki` (Mac/Linux)
# Check TiddlyWiki is installed by typing:
#> `tiddlywiki --version`
# In response, you should see TiddlyWiki report its current version (eg `5.0.4-beta`; you may also see other debugging information reported)
# In response, you should see TiddlyWiki report its current version (eg `5.0.8-beta`; you may also see other debugging information reported)
# Try it out:
## `mkdir mywiki` to create a folder for a new wiki
## `cd mywiki` to move into the new folder
## `tiddlywiki --server` to start TiddlyWiki
## `tiddlywiki mynewwiki --init server` to create a folder for a new wiki that includes server-related components
## `tiddlywiki mynewwiki --server` to start TiddlyWiki
## Visit http://127.0.0.1:8080/ in your browser
## Try editing and creating tiddlers

View File

@ -1,5 +1,5 @@
created: 20131129094353704
modified: 20131219100410583
modified: 20140224134310019
title: TiddlyWiki on Node.js
type: text/vnd.tiddlywiki
@ -20,9 +20,3 @@ Running TiddlyWiki on [[Node.js]] brings several important benefits over and abo
! Upgrading
{{Upgrading TiddlyWiki on Node.js}}
! Commands
The following commands are available:
<ul><$list filter="[tag[command]]"><li><$link to={{!!title}}><$view field="title"/></$link></li></$list></ul>

View File

@ -0,0 +1,64 @@
created: 20140223183404938
modified: 20140223195514667
tags: howto
title: Notes for upgrading to 5.0.8-beta
type: text/vnd.tiddlywiki
Version 5.0.8-beta includes some changes that can break content from earlier releases of ~TiddlyWiki 5.
! Change to [[$:/SiteTitle]] and [[$:/SiteSubtitle]]
You should rename any existing SiteTitle and SiteSubtitle tiddlers to [[$:/SiteTitle]] and [[$:/SiteSubtitle]] respectively.
! Changed parsing rules for content of HTML elements
Version 5.0.8-beta marks a change in the way that TiddlyWiki determines whether to parse the content of an HTML element or widget in //block mode// or //inline mode//.
* In block mode, TiddlyWiki parses text into paragraphs, creating `<p>` tags to wrap them. It also recognises block syntax like headings, lists and tables.
* In inline mode, TiddlyWiki ignores paragraph formatting, and just recognises character formatting, like bold and italic.
It's important to be able to control which type of parsing is performed for different situations.
Prior to 5.0.8-beta, TiddlyWiki parsed the content of an element in inline mode unless the opening tag of the element were immediately followed by a line break. This meant that much of the time element tags would be shunted together into a long line, hindering readability.
The new behaviour for 5.0.8-beta is to parse the content of an element in inline mode unless the opening tag is immediately followed by two line breaks.
To adjust existing content for 5.0.8-beta you will need to manually add the additional line break after the opening tag of elements and widgets whose content should be parsed in block mode.
The positive aspect of the change is that it removes the need to pack multiple HTML tags onto a single line, improving readability.
!! Examples
Consider the difference between these two examples. First, here's an HTML tag that starts with two line breaks:
<<wikitext-example src:"
<blockquote>
! This is a heading
And a paragraph of text.
</blockquote>
">>
Secondly, here's an HTML tag with just a single line break. Notice how the heading is no longer recognised as a heading
<<wikitext-example src:"
<blockquote>
! This is a heading
And a paragraph of text.
</blockquote>
">>
! Changed commands for [[TiddlyWiki on Node.js]]
The handling of wiki folders has changed. Previously, if the `tiddlywiki` command was run against a wiki folder that didn't have the necessary `tiddlywiki.info` file then it would be automatically created. Now, the wiki folder must be initialised with the InitCommand.
This is how to create and start a new server-based wiki:
```
tiddlywiki mywikifolder --init server
tiddlywiki mywikifolder --server
```

View File

@ -12,10 +12,7 @@
"tiddlywiki/starlight",
"tiddlywiki/stickytitles",
"tiddlywiki/centralised",
"tiddlywiki/readonly",
"giffmex/rocker",
"giffmex/blue",
"giffmex/blanca"
"tiddlywiki/readonly"
],
"languages": [
"en-US",

View File

@ -40,10 +40,10 @@ Plugins/Caption: 插件
Plugins/Fields/Description: 说明
Plugins/Fields/Title: 标题
Plugins/Fields/Version: 版本
Saving/AutoSave/Disabled/Button:
Saving/AutoSave/Disabled/Prompt: 自动保存已<$linkcatcher to="$:/config/AutoSave"><$link to="yes">@@color:#c0c0c0;''停用''@@</$link></$linkcatcher>
Saving/AutoSave/Enabled/Button:
Saving/AutoSave/Enabled/Prompt: 自动保存已<$linkcatcher to="$:/config/AutoSave"><$link to="no">@@color:green;''启用''@@</$link></$linkcatcher>
Saving/AutoSave/Disabled/Button: 启用
Saving/AutoSave/Disabled/Prompt: 自动保存已停用
Saving/AutoSave/Enabled/Button: 停用
Saving/AutoSave/Enabled/Prompt: 自动保存已启用
Saving/AutoSave: 自动保存
Saving/Caption: 保存
Saving/Heading: 保存

View File

@ -40,10 +40,10 @@ Plugins/Caption: 插件
Plugins/Fields/Description: 說明
Plugins/Fields/Title: 標題
Plugins/Fields/Version: 版本
Saving/AutoSave/Disabled/Button:
Saving/AutoSave/Disabled/Prompt: 自動儲存已<$linkcatcher to="$:/config/AutoSave"><$link to="yes">@@color:#c0c0c0;''停用''@@</$link></$linkcatcher>
Saving/AutoSave/Enabled/Button:
Saving/AutoSave/Enabled/Prompt: 自動儲存已<$linkcatcher to="$:/config/AutoSave"><$link to="no">@@color:green;''啟用''@@</$link></$linkcatcher>
Saving/AutoSave/Disabled/Button: 啟用
Saving/AutoSave/Disabled/Prompt: 自動儲存已停用
Saving/AutoSave/Enabled/Button: 停用
Saving/AutoSave/Enabled/Prompt: 自動儲存已啟用
Saving/AutoSave: 自動儲存
Saving/Caption: 儲存
Saving/Heading: 儲存

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@ rem serve TiddlyWiki5 over HTTP
rem Optional parameter is the username for signing edits
node .\tiddlywiki.js ^
editions\clientserver ^
editions\tw5.com-server ^
--verbose ^
--server 8080 $:/core/save/all text/plain text/html %1 %2^
|| exit 1

View File

@ -5,7 +5,7 @@
# Optional parameter is the username for signing edits
node ./tiddlywiki.js \
editions/clientserver \
editions/tw5.com-server \
--verbose \
--server 8080 $:/core/save/all text/plain text/html $1 $2\
|| exit 1

View File

@ -22,44 +22,3 @@ html body {
.tw-page-controls svg {
<<filter "drop-shadow(1px 1px 2px rgba(255,255,255,0.9))">>
}
/*
** Some rainbow icon colours
*/
svg.tw-image-new-button {
fill: #5eb95e; /* Green */
}
svg.tw-image-options-button {
fill: rgb(128, 88, 165); /* Purple */
}
svg.tw-image-save-button {
fill: #0e90d2; /* Light blue */
}
.tw-tiddler-controls button svg.tw-image-info-button {
fill: #0e90d2; /* Light blue */
}
.tw-tiddler-controls button svg.tw-image-edit-button {
fill: rgb(243, 123, 29); /* Orange */
}
.tw-tiddler-controls button svg.tw-image-close-button {
fill: #dd514c; /* Red */
}
.tw-tiddler-controls button svg.tw-image-delete-button {
fill: #dd514c; /* Red */
}
.tw-tiddler-controls button svg.tw-image-cancel-button {
fill: rgb(243, 123, 29); /* Orange */
}
.tw-tiddler-controls button svg.tw-image-done-button {
fill: #5eb95e; /* Green */
}

View File

@ -150,6 +150,18 @@ a.tw-tiddlylink-missing {
a.tw-tiddlylink-external {
text-decoration: underline;
color: <<colour external-link-foreground>>;
background-color: <<colour external-link-background>>;
}
a.tw-tiddlylink-external:visited {
color: <<colour external-link-foreground-visited>>;
background-color: <<colour external-link-background-visited>>;
}
a.tw-tiddlylink-external:hover {
color: <<colour external-link-foreground-hover>>;
background-color: <<colour external-link-background-hover>>;
}
/*
@ -301,6 +313,10 @@ a.tw-tiddlylink-external {
margin-bottom: 3px;
}
.sidebar-header .tw-missing-tiddler-label {
color: <<colour sidebar-foreground>>;
}
.tw-search a svg {
height: 0.75em;
}
@ -325,7 +341,7 @@ a.tw-tiddlylink-external {
}
.tw-page-controls button:hover svg, .tw-page-controls a:hover svg {
fill: <<colour sidebar-controls-foreground-hover>;
fill: <<colour sidebar-controls-foreground-hover>>;
}
.tw-menu-list-item {
@ -493,7 +509,7 @@ a.tw-tiddlylink-external {
fill: <<colour tiddler-controls-foreground-selected>>;
}
.tw-tiddler-controls button:hover svg {
.tw-tiddler-controls button.btn-invisible:hover svg {
fill: <<colour tiddler-controls-foreground-hover>>;
}
@ -543,6 +559,46 @@ canvas.tw-edit-bitmapeditor {
display: block;
}
/*
** Toolbar buttons
*/
.tw-page-controls svg.tw-image-new-button {
fill: <<colour toolbar-new-button>>;
}
.tw-page-controls svg.tw-image-options-button {
fill: <<colour toolbar-options-button>>;
}
.tw-page-controls svg.tw-image-save-button {
fill: <<colour toolbar-save-button>>;
}
.tw-tiddler-controls button svg.tw-image-info-button {
fill: <<colour toolbar-info-button>>;
}
.tw-tiddler-controls button svg.tw-image-edit-button {
fill: <<colour toolbar-edit-button>>;
}
.tw-tiddler-controls button svg.tw-image-close-button {
fill: <<colour toolbar-close-button>>;
}
.tw-tiddler-controls button svg.tw-image-delete-button {
fill: <<colour toolbar-delete-button>>;
}
.tw-tiddler-controls button svg.tw-image-cancel-button {
fill: <<colour toolbar-cancel-button>>;
}
.tw-tiddler-controls button svg.tw-image-done-button {
fill: <<colour toolbar-done-button>>;
}
/*
** Tiddler edit mode
*/
@ -816,6 +872,14 @@ canvas.tw-edit-bitmapeditor {
margin-bottom: -1px;
}
.tw-tab-buttons button.tw-tab-selected {
color: <<colour tab-foreground-selected>>;
background-color: <<colour tab-background-selected>>;
border-left: 1px solid <<colour tab-border-selected>>;
border-top: 1px solid <<colour tab-border-selected>>;
border-right: 1px solid <<colour tab-border-selected>>;
}
.tw-tab-buttons button {
color: <<colour tab-foreground>>;
margin-left: 2px;
@ -823,16 +887,6 @@ canvas.tw-edit-bitmapeditor {
font-weight: 300;
border: none;
background: inherit;
}
.tw-tab-buttons button.tw-tab-selected {
background-color: <<colour tab-background-selected>>;
border-left: 1px solid <<colour tab-border-selected>>;
border-top: 1px solid <<colour tab-border-selected>>;
border-right: 1px solid <<colour tab-border-selected>>;
}
.tw-tab-buttons button:not(.tw-tab-selected) {
background-color: <<colour tab-background>>;
border-left: 1px solid <<colour tab-border>>;
border-top: 1px solid <<colour tab-border>>;
@ -849,12 +903,22 @@ canvas.tw-edit-bitmapeditor {
.tw-sidebar-lists .tw-tab-buttons button.tw-tab-selected {
background-color: <<colour sidebar-tab-background-selected>>;
color: <<colour sidebar-tab-foreground-selected>>;
border-left: 1px solid <<colour sidebar-tab-border-selected>>;
border-top: 1px solid <<colour sidebar-tab-border-selected>>;
border-right: 1px solid <<colour sidebar-tab-border-selected>>;
}
.tw-sidebar-lists .tw-tab-buttons button {
background-color: <<colour sidebar-tab-background>>;
color: <<colour sidebar-tab-foreground>>;
border-left: 1px solid <<colour sidebar-tab-border>>;
border-top: 1px solid <<colour sidebar-tab-border>>;
border-right: 1px solid <<colour sidebar-tab-border>>;
}
.tw-sidebar-lists .tw-tab-divider {
border-top: none;
height: 1px;
<<background-linear-gradient "left, rgb(216,216,216) 0%, rgb(236,236,236) 250px">>
border-top: 1px solid <<colour sidebar-tab-divider>>;
}
.tw-more-sidebar {