From 260080164f24e1714ed9bab3b68bc3faf45fd929 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Sun, 23 Feb 2014 12:33:00 +0000
Subject: [PATCH 01/16] Update setTiddlerData() to preserve tiddler
dictionaries
Previously, data tiddlers were always being saved in JSON format,
regardless of the original format.
---
core/modules/utils/utils.js | 11 +++++++++++
core/modules/wiki.js | 13 +++++++++++--
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/core/modules/utils/utils.js b/core/modules/utils/utils.js
index 703b0178f..3b28ce7b6 100644
--- a/core/modules/utils/utils.js
+++ b/core/modules/utils/utils.js
@@ -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");
+};
+
})();
diff --git a/core/modules/wiki.js b/core/modules/wiki.js
index b62aaca1a..51486e185 100755
--- a/core/modules/wiki.js
+++ b/core/modules/wiki.js
@@ -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()));
};
/*
From 2b4dfba2ff7d9a5599cd345bfbf710fd1a0a9dd8 Mon Sep 17 00:00:00 2001
From: Bram Chen
Date: Sun, 23 Feb 2014 20:41:44 +0800
Subject: [PATCH 02/16] Get back on the right path
---
languages/zh-Hans/ControlPanel.multids | 8 ++++----
languages/zh-Hant/ControlPanel.multids | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/languages/zh-Hans/ControlPanel.multids b/languages/zh-Hans/ControlPanel.multids
index f5cea96c3..854b14cfe 100644
--- a/languages/zh-Hans/ControlPanel.multids
+++ b/languages/zh-Hans/ControlPanel.multids
@@ -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: 保存
diff --git a/languages/zh-Hant/ControlPanel.multids b/languages/zh-Hant/ControlPanel.multids
index 7974da2dd..d8e3df7cd 100644
--- a/languages/zh-Hant/ControlPanel.multids
+++ b/languages/zh-Hant/ControlPanel.multids
@@ -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: 儲存
From 7f5f4df56291d1820b9e3c8040f09f0e99e89973 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Sun, 23 Feb 2014 17:19:58 +0000
Subject: [PATCH 03/16] Tweaks to the vanilla theme and palette entries
---
core/palettes/Blanca.tid | 15 ++++++++-
core/palettes/Blue.tid | 15 ++++++++-
core/palettes/Contrast.tid | 15 ++++++++-
core/palettes/Rocker.tid | 15 ++++++++-
core/palettes/Vanilla.tid | 15 ++++++++-
themes/tiddlywiki/vanilla/base.tid | 50 ++++++++++++++++++++++--------
6 files changed, 107 insertions(+), 18 deletions(-)
diff --git a/core/palettes/Blanca.tid b/core/palettes/Blanca.tid
index b11dd7563..11b61983f 100644
--- a/core/palettes/Blanca.tid
+++ b/core/palettes/Blanca.tid
@@ -22,6 +22,12 @@ dropdown-border: <>
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: <>
+sidebar-tab-border-selected: <>
+sidebar-tab-border: <>
+sidebar-tab-divider: <>
+sidebar-tab-foreground-selected:
+sidebar-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: <>
tab-foreground: #666666
table-border: #dddddd
table-footer-background: #a8a8a8
diff --git a/core/palettes/Blue.tid b/core/palettes/Blue.tid
index fe5dedda8..d0316419f 100644
--- a/core/palettes/Blue.tid
+++ b/core/palettes/Blue.tid
@@ -22,6 +22,12 @@ dropdown-border: <>
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: <>
+sidebar-tab-background: <>
+sidebar-tab-border-selected: <>
+sidebar-tab-border: <>
+sidebar-tab-divider: <>
+sidebar-tab-foreground-selected:
+sidebar-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: <>
tab-foreground: #666666
table-border: #dddddd
table-footer-background: #a8a8a8
diff --git a/core/palettes/Contrast.tid b/core/palettes/Contrast.tid
index 7249e9fd7..031c0dd93 100644
--- a/core/palettes/Contrast.tid
+++ b/core/palettes/Contrast.tid
@@ -22,6 +22,12 @@ dropdown-border: <>
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: <>
+sidebar-tab-border-selected: <>
+sidebar-tab-border: <>
+sidebar-tab-divider: <>
+sidebar-tab-foreground-selected:
+sidebar-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: <>
tab-foreground: #666666
table-border: #dddddd
table-footer-background: #a8a8a8
diff --git a/core/palettes/Rocker.tid b/core/palettes/Rocker.tid
index d5113fc2f..8ac6cb558 100644
--- a/core/palettes/Rocker.tid
+++ b/core/palettes/Rocker.tid
@@ -22,6 +22,12 @@ dropdown-border: <>
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: <>
+sidebar-tab-border-selected: <>
+sidebar-tab-border: <>
+sidebar-tab-divider: <>
+sidebar-tab-foreground-selected:
+sidebar-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: <>
tab-foreground: #666666
table-border: #dddddd
table-footer-background: #a8a8a8
diff --git a/core/palettes/Vanilla.tid b/core/palettes/Vanilla.tid
index 7ddd3a0e2..ed5251889 100644
--- a/core/palettes/Vanilla.tid
+++ b/core/palettes/Vanilla.tid
@@ -22,6 +22,12 @@ dropdown-border: <>
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: <>
+sidebar-tab-border-selected: <>
+sidebar-tab-border: <>
+sidebar-tab-divider: #e4e4e4
+sidebar-tab-foreground-selected:
+sidebar-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: <>
tab-foreground: #666666
table-border: #dddddd
table-footer-background: #a8a8a8
diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid
index c879b7658..c8764bf62 100644
--- a/themes/tiddlywiki/vanilla/base.tid
+++ b/themes/tiddlywiki/vanilla/base.tid
@@ -150,6 +150,18 @@ a.tw-tiddlylink-missing {
a.tw-tiddlylink-external {
text-decoration: underline;
+ color: <>;
+ background-color: <>;
+}
+
+a.tw-tiddlylink-external:visited {
+ color: <>;
+ background-color: <>;
+}
+
+a.tw-tiddlylink-external:hover {
+ color: <>;
+ background-color: <>;
}
/*
@@ -301,6 +313,10 @@ a.tw-tiddlylink-external {
margin-bottom: 3px;
}
+.sidebar-header .tw-missing-tiddler-label {
+ color: <>;
+}
+
.tw-search a svg {
height: 0.75em;
}
@@ -816,6 +832,14 @@ canvas.tw-edit-bitmapeditor {
margin-bottom: -1px;
}
+.tw-tab-buttons button.tw-tab-selected {
+ color: <>;
+ background-color: <>;
+ border-left: 1px solid <>;
+ border-top: 1px solid <>;
+ border-right: 1px solid <>;
+}
+
.tw-tab-buttons button {
color: <>;
margin-left: 2px;
@@ -823,16 +847,6 @@ canvas.tw-edit-bitmapeditor {
font-weight: 300;
border: none;
background: inherit;
-}
-
-.tw-tab-buttons button.tw-tab-selected {
- background-color: <>;
- border-left: 1px solid <>;
- border-top: 1px solid <>;
- border-right: 1px solid <>;
-}
-
-.tw-tab-buttons button:not(.tw-tab-selected) {
background-color: <>;
border-left: 1px solid <>;
border-top: 1px solid <>;
@@ -849,12 +863,22 @@ canvas.tw-edit-bitmapeditor {
.tw-sidebar-lists .tw-tab-buttons button.tw-tab-selected {
background-color: <>;
+ color: <>;
+ border-left: 1px solid <>;
+ border-top: 1px solid <>;
+ border-right: 1px solid <>;
+}
+
+.tw-sidebar-lists .tw-tab-buttons button {
+ background-color: <>;
+ color: <>;
+ border-left: 1px solid <>;
+ border-top: 1px solid <>;
+ border-right: 1px solid <>;
}
.tw-sidebar-lists .tw-tab-divider {
- border-top: none;
- height: 1px;
- <>
+ border-top: 1px solid <>;
}
.tw-more-sidebar {
From 99ccdf4584887caf274ba196b0decae403d3ee94 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Sun, 23 Feb 2014 17:37:30 +0000
Subject: [PATCH 04/16] Add confirmation when deleting tiddlers
Fixes #381
---
core/modules/widgets/navigator.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js
index 13c7ec22a..a74796011 100755
--- a/core/modules/widgets/navigator.js
+++ b/core/modules/widgets/navigator.js
@@ -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);
}
From 0623dd5b7f0a7393d942b2390891369059e9e83b Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Sun, 23 Feb 2014 17:54:38 +0000
Subject: [PATCH 05/16] Include toolbar button colours in palettes
---
core/palettes/Blanca.tid | 9 ++++++
core/palettes/Blue.tid | 9 ++++++
core/palettes/Contrast.tid | 9 ++++++
core/palettes/Rocker.tid | 9 ++++++
core/palettes/Vanilla.tid | 9 ++++++
themes/tiddlywiki/starlight/styles.tid | 41 --------------------------
themes/tiddlywiki/vanilla/base.tid | 40 +++++++++++++++++++++++++
7 files changed, 85 insertions(+), 41 deletions(-)
diff --git a/core/palettes/Blanca.tid b/core/palettes/Blanca.tid
index 11b61983f..4983104e9 100644
--- a/core/palettes/Blanca.tid
+++ b/core/palettes/Blanca.tid
@@ -90,5 +90,14 @@ tiddler-link-background: <>
tiddler-link-foreground: <>
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
diff --git a/core/palettes/Blue.tid b/core/palettes/Blue.tid
index d0316419f..d7c9ca4e6 100644
--- a/core/palettes/Blue.tid
+++ b/core/palettes/Blue.tid
@@ -90,5 +90,14 @@ tiddler-link-background: <>
tiddler-link-foreground: <>
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
diff --git a/core/palettes/Contrast.tid b/core/palettes/Contrast.tid
index 031c0dd93..c271c137d 100644
--- a/core/palettes/Contrast.tid
+++ b/core/palettes/Contrast.tid
@@ -90,5 +90,14 @@ tiddler-link-background: <>
tiddler-link-foreground: <>
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
diff --git a/core/palettes/Rocker.tid b/core/palettes/Rocker.tid
index 8ac6cb558..f2a04f6ab 100644
--- a/core/palettes/Rocker.tid
+++ b/core/palettes/Rocker.tid
@@ -90,5 +90,14 @@ tiddler-link-background: <>
tiddler-link-foreground: <>
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
diff --git a/core/palettes/Vanilla.tid b/core/palettes/Vanilla.tid
index ed5251889..abcdc2f3e 100644
--- a/core/palettes/Vanilla.tid
+++ b/core/palettes/Vanilla.tid
@@ -90,5 +90,14 @@ tiddler-link-background: <>
tiddler-link-foreground: <>
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
diff --git a/themes/tiddlywiki/starlight/styles.tid b/themes/tiddlywiki/starlight/styles.tid
index 25b374277..769fb4cc2 100644
--- a/themes/tiddlywiki/starlight/styles.tid
+++ b/themes/tiddlywiki/starlight/styles.tid
@@ -22,44 +22,3 @@ html body {
.tw-page-controls svg {
<>
}
-
-/*
-** 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 */
-}
-
diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid
index c8764bf62..5cced0ba4 100644
--- a/themes/tiddlywiki/vanilla/base.tid
+++ b/themes/tiddlywiki/vanilla/base.tid
@@ -559,6 +559,46 @@ canvas.tw-edit-bitmapeditor {
display: block;
}
+/*
+** Toolbar buttons
+*/
+
+.tw-page-controls svg.tw-image-new-button {
+ fill: <>;
+}
+
+.tw-page-controls svg.tw-image-options-button {
+ fill: <>;
+}
+
+.tw-page-controls svg.tw-image-save-button {
+ fill: <>;
+}
+
+.tw-tiddler-controls button svg.tw-image-info-button {
+ fill: <>;
+}
+
+.tw-tiddler-controls button svg.tw-image-edit-button {
+ fill: <>;
+}
+
+.tw-tiddler-controls button svg.tw-image-close-button {
+ fill: <>;
+}
+
+.tw-tiddler-controls button svg.tw-image-delete-button {
+ fill: <>;
+}
+
+.tw-tiddler-controls button svg.tw-image-cancel-button {
+ fill: <>;
+}
+
+.tw-tiddler-controls button svg.tw-image-done-button {
+ fill: <>;
+}
+
/*
** Tiddler edit mode
*/
From 6cd13efd48cbd5a783f8891003c91c63ff73cb11 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Sun, 23 Feb 2014 19:22:42 +0000
Subject: [PATCH 06/16] Docs updates
---
.../tw5.com/tiddlers/Release 5.0.8beta.tid | 7 ++-
.../Notes for upgrading to 5.0.8-beta.tid | 57 +++++++++++++++++++
2 files changed, 62 insertions(+), 2 deletions(-)
create mode 100644 editions/tw5.com/tiddlers/howtos/Notes for upgrading to 5.0.8-beta.tid
diff --git a/editions/tw5.com/tiddlers/Release 5.0.8beta.tid b/editions/tw5.com/tiddlers/Release 5.0.8beta.tid
index dc2e4c3bd..403dc559c 100644
--- a/editions/tw5.com/tiddlers/Release 5.0.8beta.tid
+++ b/editions/tw5.com/tiddlers/Release 5.0.8beta.tid
@@ -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
diff --git a/editions/tw5.com/tiddlers/howtos/Notes for upgrading to 5.0.8-beta.tid b/editions/tw5.com/tiddlers/howtos/Notes for upgrading to 5.0.8-beta.tid
new file mode 100644
index 000000000..8d5713661
--- /dev/null
+++ b/editions/tw5.com/tiddlers/howtos/Notes for upgrading to 5.0.8-beta.tid
@@ -0,0 +1,57 @@
+created: 20140223183404938
+modified: 20140223192031783
+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 `` 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:
+
+<
+
+! This is a heading
+
+And a paragraph of text.
+
+
+">>
+
+Secondly, here's an HTML tag with just a single line break. Notice how the heading is no longer recognised as a heading
+
+<
+! This is a heading
+
+And a paragraph of text.
+
+">>
+
+! 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 CreateWikiCommand.
From 327403b3c9abf15505d92a0d34aea470bc78c8e6 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Sun, 23 Feb 2014 19:28:05 +0000
Subject: [PATCH 07/16] Docs update
---
editions/tw2/readme.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/editions/tw2/readme.md b/editions/tw2/readme.md
index c75154fc9..5eaadaea2 100644
--- a/editions/tw2/readme.md
+++ b/editions/tw2/readme.md
@@ -1,5 +1,5 @@
-Building TiddlyWikiClassic
TiddlyWiki5 can be used to build older 2.x.x versions of TiddlyWikiClassic from their constituent components. Doing so involves these features:
- The
tiddlywiki/classictools
plugin, containing a deserializer module which allows tiddlers to be loaded from TiddlyWiki 2.x.x .recipe
files - The
stripcomments
format for the ViewWidget, which strips single line JavaScript comments starting //#
- The
stripTitlePrefix='yes'
attribute of the FieldsWidget, which removes prefixes wrapped in curly braces from the title
attribute- For example,
{tiddler}HelloThere
would be transformed to HelloThere
Usage
TiddlyWikiClassic is built from the command line by running TiddlyWiki on Node.js. A typical usage would be:
node ../../tiddlywiki.js \
+Building TiddlyWikiClassic
TiddlyWiki5 can be used to build older 2.x.x versions of TiddlyWikiClassic from their constituent components. Doing so involves these features:
- The
tiddlywiki/classictools
plugin, containing a deserializer module which allows tiddlers to be loaded from TiddlyWiki 2.x.x .recipe
files - The
stripcomments
format for the ViewWidget, which strips single line JavaScript comments starting //#
- The
stripTitlePrefix='yes'
attribute of the FieldsWidget, which removes prefixes wrapped in curly braces from the title
attribute- For example,
{tiddler}HelloThere
would be transformed to HelloThere
Usage
TiddlyWikiClassic is built from the command line by running TiddlyWiki on Node.js. A typical usage would be:
node ../../tiddlywiki.js \
--verbose \
--load <path_to_recipe_file> \
--rendertiddler $:/core/templates/tiddlywiki2.template.html <path_to_write_index_file> text/plain \
- || exit 1
\ No newline at end of file
+ || exit 1
\ No newline at end of file
From b0394f1560abb8844c4a924ecf96c47ba6211f3d Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Sun, 23 Feb 2014 22:57:25 +0000
Subject: [PATCH 08/16] Add support for utils-node modules that are only run
under Node.js
---
core/language/en-GB/Docs/ModuleTypes.multids | 1 +
core/modules/startup.js | 3 +++
2 files changed, 4 insertions(+)
diff --git a/core/language/en-GB/Docs/ModuleTypes.multids b/core/language/en-GB/Docs/ModuleTypes.multids
index 99c6e7cf8..c94056db5 100644
--- a/core/language/en-GB/Docs/ModuleTypes.multids
+++ b/core/language/en-GB/Docs/ModuleTypes.multids
@@ -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.
diff --git a/core/modules/startup.js b/core/modules/startup.js
index 81aaca530..83223f1f4 100755
--- a/core/modules/startup.js
+++ b/core/modules/startup.js
@@ -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) {
From f3930ad69c343d24343a594c7de876a046584923 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Sun, 23 Feb 2014 22:58:17 +0000
Subject: [PATCH 09/16] Add init command to initialise a wiki folder
Fixes #362
---
boot/boot.js | 1 +
core/modules/commands/init.js | 47 ++++++++
core/modules/utils/filesystem.js | 111 ++++++++++++++++++
.../tw5.com/tiddlers/commands/InitCommand.tid | 21 ++++
.../Notes for upgrading to 5.0.8-beta.tid | 4 +-
5 files changed, 182 insertions(+), 2 deletions(-)
create mode 100644 core/modules/commands/init.js
create mode 100644 core/modules/utils/filesystem.js
create mode 100644 editions/tw5.com/tiddlers/commands/InitCommand.tid
diff --git a/boot/boot.js b/boot/boot.js
index ae026fc46..eaad53776 100644
--- a/boot/boot.js
+++ b/boot/boot.js
@@ -1456,6 +1456,7 @@ $tw.boot.startup = function(options) {
pluginsPath: "../plugins/",
themesPath: "../themes/",
languagesPath: "../languages/",
+ editionsPath: "../editions/",
wikiInfo: "./tiddlywiki.info",
wikiPluginsSubDir: "./plugins",
wikiThemesSubDir: "./themes",
diff --git a/core/modules/commands/init.js b/core/modules/commands/init.js
new file mode 100644
index 000000000..5eda044bc
--- /dev/null
+++ b/core/modules/commands/init.js
@@ -0,0 +1,47 @@
+/*\
+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 path = require("path"),
+ editionName = this.params[0] || "empty";
+ // Check that we don't already have a valid wiki folder
+ if($tw.boot.wikiTiddlersPath) {
+ return "Wiki folder is not empty";
+ }
+ // 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");
+ }
+ return err;
+};
+
+exports.Command = Command;
+
+})();
diff --git a/core/modules/utils/filesystem.js b/core/modules/utils/filesystem.js
new file mode 100644
index 000000000..82b816ff9
--- /dev/null
+++ b/core/modules/utils/filesystem.js
@@ -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 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
+```
+
+The "edition" defaults to ''empty''.
+
+For example:
+
+```
+tiddlywiki ./MyWikiFolder --init empty
+```
+
+Note that the init command will fail if the wiki folder does not exist, or is not empty.
diff --git a/editions/tw5.com/tiddlers/howtos/Notes for upgrading to 5.0.8-beta.tid b/editions/tw5.com/tiddlers/howtos/Notes for upgrading to 5.0.8-beta.tid
index 8d5713661..08843b7c9 100644
--- a/editions/tw5.com/tiddlers/howtos/Notes for upgrading to 5.0.8-beta.tid
+++ b/editions/tw5.com/tiddlers/howtos/Notes for upgrading to 5.0.8-beta.tid
@@ -1,5 +1,5 @@
created: 20140223183404938
-modified: 20140223192031783
+modified: 20140223195514667
tags: howto
title: Notes for upgrading to 5.0.8-beta
type: text/vnd.tiddlywiki
@@ -54,4 +54,4 @@ And a paragraph of text.
! 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 CreateWikiCommand.
+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.
From dd299bf7697d4d359f47451fe86cc65e9c403797 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Sun, 23 Feb 2014 23:09:58 +0000
Subject: [PATCH 10/16] Typos and style tweaks
---
core/palettes/Blue.tid | 2 +-
themes/tiddlywiki/vanilla/base.tid | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/palettes/Blue.tid b/core/palettes/Blue.tid
index d7c9ca4e6..65e4f4b40 100644
--- a/core/palettes/Blue.tid
+++ b/core/palettes/Blue.tid
@@ -75,7 +75,7 @@ tag-background: #eeeeff
tag-foreground: #000
tiddler-background: <>
tiddler-border: <>
-tiddler-controls-foreground-hover: #888888
+tiddler-controls-foreground-hover: #666666
tiddler-controls-foreground-selected: #444444
tiddler-controls-foreground: #cccccc
tiddler-editor-background: #f8f8f8
diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid
index 5cced0ba4..a8e47d4cd 100644
--- a/themes/tiddlywiki/vanilla/base.tid
+++ b/themes/tiddlywiki/vanilla/base.tid
@@ -341,7 +341,7 @@ a.tw-tiddlylink-external:hover {
}
.tw-page-controls button:hover svg, .tw-page-controls a:hover svg {
- fill: <;
+ fill: <>;
}
.tw-menu-list-item {
@@ -509,7 +509,7 @@ a.tw-tiddlylink-external:hover {
fill: <>;
}
-.tw-tiddler-controls button:hover svg {
+.tw-tiddler-controls button.btn-invisible:hover svg {
fill: <>;
}
From 886d64856819251335cc7fcf811c84acd0ef22b4 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Mon, 24 Feb 2014 09:39:45 +0000
Subject: [PATCH 11/16] Remove obsolete plugins from tw5.com edition
---
editions/tw5.com/tiddlywiki.info | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/editions/tw5.com/tiddlywiki.info b/editions/tw5.com/tiddlywiki.info
index 66c6f2643..12269a73e 100644
--- a/editions/tw5.com/tiddlywiki.info
+++ b/editions/tw5.com/tiddlywiki.info
@@ -12,10 +12,7 @@
"tiddlywiki/starlight",
"tiddlywiki/stickytitles",
"tiddlywiki/centralised",
- "tiddlywiki/readonly",
- "giffmex/rocker",
- "giffmex/blue",
- "giffmex/blanca"
+ "tiddlywiki/readonly"
],
"languages": [
"en-US",
From 3f6bf2452a781bfb170c9b9176d69d218e9b92e7 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Mon, 24 Feb 2014 10:14:17 +0000
Subject: [PATCH 12/16] Init command should remove any includeWikis definitions
The includeWikis references will otherwise be broken when the edition
is copied.
---
core/modules/commands/init.js | 8 +++++++-
editions/tw5.com/tiddlers/commands/InitCommand.tid | 8 ++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/core/modules/commands/init.js b/core/modules/commands/init.js
index 5eda044bc..3ebe0e73f 100644
--- a/core/modules/commands/init.js
+++ b/core/modules/commands/init.js
@@ -23,7 +23,8 @@ var Command = function(params,commander) {
};
Command.prototype.execute = function() {
- var path = require("path"),
+ var fs = require("fs"),
+ path = require("path"),
editionName = this.params[0] || "empty";
// Check that we don't already have a valid wiki folder
if($tw.boot.wikiTiddlersPath) {
@@ -39,6 +40,11 @@ Command.prototype.execute = function() {
if(!err) {
this.commander.streams.output.write("Copied edition '" + editionName + "' to " + $tw.boot.wikiPath + "\n");
}
+ // 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 err;
};
diff --git a/editions/tw5.com/tiddlers/commands/InitCommand.tid b/editions/tw5.com/tiddlers/commands/InitCommand.tid
index df01cb2e7..d1297a0c5 100644
--- a/editions/tw5.com/tiddlers/commands/InitCommand.tid
+++ b/editions/tw5.com/tiddlers/commands/InitCommand.tid
@@ -10,7 +10,6 @@ Initialise an empty [[WikiFolder|WikiFolders]] with a copy of the specified edit
--init
```
-The "edition" defaults to ''empty''.
For example:
@@ -18,4 +17,9 @@ For example:
tiddlywiki ./MyWikiFolder --init empty
```
-Note that the init command will fail if the wiki folder does not exist, or is not empty.
+Note:
+
+* 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
+
From a1ad735822aeccb3572d6db63bf133cc41c1b962 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Mon, 24 Feb 2014 10:58:11 +0000
Subject: [PATCH 13/16] Extend the init command to allow editions to be merged
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Now we can say “—init tw5.com clientserver” to get the tw5.com content
with the client server plugins.
---
core/modules/commands/init.js | 30 +++++++++++--------
.../tw5.com/tiddlers/commands/InitCommand.tid | 4 +--
2 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/core/modules/commands/init.js b/core/modules/commands/init.js
index 3ebe0e73f..14705f8b0 100644
--- a/core/modules/commands/init.js
+++ b/core/modules/commands/init.js
@@ -24,28 +24,34 @@ var Command = function(params,commander) {
Command.prototype.execute = function() {
var fs = require("fs"),
- path = require("path"),
- editionName = this.params[0] || "empty";
+ path = require("path");
// Check that we don't already have a valid wiki folder
if($tw.boot.wikiTiddlersPath) {
return "Wiki folder is not empty";
}
- // 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");
+ // Loop through each of the specified editions
+ var editions = this.params.length > 0 ? this.params : ["empty"];
+ for(var editionIndex=0; editionIndex
```
-
For example:
```
@@ -19,7 +18,8 @@ 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
-
+* The init command can be used multiple times to merge editions. Editions initialised later will overwrite any files shared with earlier editions (so, the final `tiddlywiki.info` file will be copied from the last edition)
From 042698b508ed79d205779c5a510838a0552f95a3 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Mon, 24 Feb 2014 13:28:55 +0000
Subject: [PATCH 14/16] Some rejigging of the editions folders
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Now we’re optimising the editions for use with the —init command.
Documentation coming up.
---
editions/server/tiddlywiki.info | 12 ++++++++++++
.../tiddlers/system/GoogleAnalyticsAccount.tid | 0
.../tiddlers/system/GoogleAnalyticsDomain.tid | 0
.../tiddlers/system/favicon.ico | Bin
.../tiddlers/system/favicon.ico.meta | 0
.../tiddlywiki.info | 0
editions/tw5.com/tiddlers/commands/InitCommand.tid | 5 +++--
serve.cmd | 2 +-
serve.sh | 2 +-
9 files changed, 17 insertions(+), 4 deletions(-)
create mode 100644 editions/server/tiddlywiki.info
rename editions/{clientserver => tw5.com-server}/tiddlers/system/GoogleAnalyticsAccount.tid (100%)
rename editions/{clientserver => tw5.com-server}/tiddlers/system/GoogleAnalyticsDomain.tid (100%)
rename editions/{clientserver => tw5.com-server}/tiddlers/system/favicon.ico (100%)
rename editions/{clientserver => tw5.com-server}/tiddlers/system/favicon.ico.meta (100%)
rename editions/{clientserver => tw5.com-server}/tiddlywiki.info (100%)
diff --git a/editions/server/tiddlywiki.info b/editions/server/tiddlywiki.info
new file mode 100644
index 000000000..b82b28fae
--- /dev/null
+++ b/editions/server/tiddlywiki.info
@@ -0,0 +1,12 @@
+{
+ "plugins": [
+ "tiddlywiki/tiddlyweb",
+ "tiddlywiki/filesystem",
+ "tiddlywiki/codemirror",
+ "tiddlywiki/highlight"
+ ],
+ "themes": [
+ "tiddlywiki/vanilla",
+ "tiddlywiki/snowwhite"
+ ]
+}
diff --git a/editions/clientserver/tiddlers/system/GoogleAnalyticsAccount.tid b/editions/tw5.com-server/tiddlers/system/GoogleAnalyticsAccount.tid
similarity index 100%
rename from editions/clientserver/tiddlers/system/GoogleAnalyticsAccount.tid
rename to editions/tw5.com-server/tiddlers/system/GoogleAnalyticsAccount.tid
diff --git a/editions/clientserver/tiddlers/system/GoogleAnalyticsDomain.tid b/editions/tw5.com-server/tiddlers/system/GoogleAnalyticsDomain.tid
similarity index 100%
rename from editions/clientserver/tiddlers/system/GoogleAnalyticsDomain.tid
rename to editions/tw5.com-server/tiddlers/system/GoogleAnalyticsDomain.tid
diff --git a/editions/clientserver/tiddlers/system/favicon.ico b/editions/tw5.com-server/tiddlers/system/favicon.ico
similarity index 100%
rename from editions/clientserver/tiddlers/system/favicon.ico
rename to editions/tw5.com-server/tiddlers/system/favicon.ico
diff --git a/editions/clientserver/tiddlers/system/favicon.ico.meta b/editions/tw5.com-server/tiddlers/system/favicon.ico.meta
similarity index 100%
rename from editions/clientserver/tiddlers/system/favicon.ico.meta
rename to editions/tw5.com-server/tiddlers/system/favicon.ico.meta
diff --git a/editions/clientserver/tiddlywiki.info b/editions/tw5.com-server/tiddlywiki.info
similarity index 100%
rename from editions/clientserver/tiddlywiki.info
rename to editions/tw5.com-server/tiddlywiki.info
diff --git a/editions/tw5.com/tiddlers/commands/InitCommand.tid b/editions/tw5.com/tiddlers/commands/InitCommand.tid
index 50e037a80..41edae0f6 100644
--- a/editions/tw5.com/tiddlers/commands/InitCommand.tid
+++ b/editions/tw5.com/tiddlers/commands/InitCommand.tid
@@ -7,7 +7,7 @@ type: text/vnd.tiddlywiki
Initialise an empty [[WikiFolder|WikiFolders]] with a copy of the specified edition.
```
---init
+--init [ ...]
```
For example:
@@ -22,4 +22,5 @@ Note:
* 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
-* The init command can be used multiple times to merge editions. Editions initialised later will overwrite any files shared with earlier editions (so, the final `tiddlywiki.info` file will be copied from the last edition)
+* 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)
+
diff --git a/serve.cmd b/serve.cmd
index 213016222..a399a4192 100644
--- a/serve.cmd
+++ b/serve.cmd
@@ -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
diff --git a/serve.sh b/serve.sh
index 9e3738269..2d0c0f8c6 100755
--- a/serve.sh
+++ b/serve.sh
@@ -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
From 599f5978c90dbbf17cf2f11bbba2011eda1b11d2 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Mon, 24 Feb 2014 14:09:29 +0000
Subject: [PATCH 15/16] Docs updates
---
editions/tw5.com/tiddlers/community/OXTWIG.tid | 2 ++
.../tiddlers/dev/Installing TiddlyWiki on Node.js.tid | 9 ++++-----
editions/tw5.com/tiddlers/dev/TiddlyWiki on Node.js.tid | 8 +-------
.../howtos/Notes for upgrading to 5.0.8-beta.tid | 7 +++++++
4 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/editions/tw5.com/tiddlers/community/OXTWIG.tid b/editions/tw5.com/tiddlers/community/OXTWIG.tid
index bad6622ab..ee6683f15 100644
--- a/editions/tw5.com/tiddlers/community/OXTWIG.tid
+++ b/editions/tw5.com/tiddlers/community/OXTWIG.tid
@@ -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:
diff --git a/editions/tw5.com/tiddlers/dev/Installing TiddlyWiki on Node.js.tid b/editions/tw5.com/tiddlers/dev/Installing TiddlyWiki on Node.js.tid
index df7130022..9cc5780bf 100644
--- a/editions/tw5.com/tiddlers/dev/Installing TiddlyWiki on Node.js.tid
+++ b/editions/tw5.com/tiddlers/dev/Installing TiddlyWiki on Node.js.tid
@@ -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
diff --git a/editions/tw5.com/tiddlers/dev/TiddlyWiki on Node.js.tid b/editions/tw5.com/tiddlers/dev/TiddlyWiki on Node.js.tid
index 79c2e685f..f9c92f907 100644
--- a/editions/tw5.com/tiddlers/dev/TiddlyWiki on Node.js.tid
+++ b/editions/tw5.com/tiddlers/dev/TiddlyWiki on Node.js.tid
@@ -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:
-
-<$list filter="[tag[command]]">- <$link to={{!!title}}><$view field="title"/>$link>
$list>
diff --git a/editions/tw5.com/tiddlers/howtos/Notes for upgrading to 5.0.8-beta.tid b/editions/tw5.com/tiddlers/howtos/Notes for upgrading to 5.0.8-beta.tid
index 08843b7c9..4b5e86ea5 100644
--- a/editions/tw5.com/tiddlers/howtos/Notes for upgrading to 5.0.8-beta.tid
+++ b/editions/tw5.com/tiddlers/howtos/Notes for upgrading to 5.0.8-beta.tid
@@ -55,3 +55,10 @@ And a paragraph of text.
! 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
+```
From f42246f17177438ea2d006b7dff6c0bad53bb922 Mon Sep 17 00:00:00 2001
From: Jermolene
Date: Mon, 24 Feb 2014 14:40:41 +0000
Subject: [PATCH 16/16] Docs update
---
readme.md | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/readme.md b/readme.md
index 3763dbb77..ea0e52148 100644
--- a/readme.md
+++ b/readme.md
@@ -1,6 +1,5 @@
-Welcome to TiddlyWiki, a complete interactive wiki in JavaScript. 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 WikiText.
This is version 5.0.8-prerelease of TiddlyWiki, a major reboot designed for the next 25 years. It is currently in beta (see the detailed ReleaseHistory). There is a RoadMap for moving to the full release. It is a great time to get involved and support the future development of TiddlyWiki.
TiddlyWiki is a free, open source project that depends on your love and support for its survival.
On this site, unless noted otherwise, "TiddlyWiki" refers to the new version 5, and "TiddlyWikiClassic" is used to identify the older version.
The deep internal improvements mean that the new version of TiddlyWiki is not fully compatible with TiddlyWikiClassic. Existing content will need massaging, while plugins and themes will have to be completely rewritten. The upgrade path will get smoother as the new version matures.
-
Getting started with TiddlyWiki under Node.js
Running TiddlyWiki on Node.js brings several important benefits over and above the single file version:
- You can edit your content on any suitably compatible HTML5 browser, including smartphones and tablets
- Individual tiddlers are stored in separate files, which you can organise as you wish
- The ability to build multiple wikis that blend different combinations of shared and unique content
Installation
- Install Node.js from http://nodejs.org
- Open a command line terminal and type:
npm install -g tiddlywiki
If it fails with an error you may need to re-run the command as an administrator:
npm install -g tiddlywiki
(Windows)
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) - Try it out:
mkdir mywiki
to create a folder for a new wikicd mywiki
to move into the new foldertiddlywiki --server
to start TiddlyWiki- Visit http://127.0.0.1:8080/ in your browser
- Try editing and creating tiddlers
The -g
flag causes TiddlyWiki to be installed globally. Without it, TiddlyWiki will only be available in the directory where you installed it.
A slightly different method for installation is recommended if you plan on forking the source code in order to study it or contribute to it. See Working with the TiddlyWiki5 repository.
-
Usage
TiddlyWiki5 can be used on the command line to perform an extensive set of operations based on TiddlyWikiFolders, TiddlerFiles and TiddlyWikiFiles.
For example, the following command loads the tiddlers from a TiddlyWiki HTML file and then saves one of them in static HTML:
tiddlywiki --verbose --load mywiki.html --rendertiddler ReadMe ./readme.html
Running tiddlywiki
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.
The first argument is the optional path to the TiddlyWikiFolder to be loaded. If not present, then the current directory is used.
The commands and their individual arguments follow, each command being identified by the prefix --
.
tiddlywiki [<wikipath>] [--<command> [<arg>[,<arg>]]]
The available commands are:
-
Upgrading
If you've installed TiddlyWiki on Node.js on the usual way, when a new version is released you can upgrade it with this command:
npm update -g tiddlywiki
On Mac or Linux you'll need to add sudo like this:
sudo npm update -g tiddlywiki
Commands
The following commands are available:
-
Working with the TiddlyWiki5 repository
Setting Up
If you plan on working with the TiddlyWiki5 source code then follow these steps:
- Fork the TiddlyWiki5 GitHub repository from https://github.com/Jermolene/TiddlyWiki5
- Clone a local copy of your fork
- Open a command line terminal and change the current working directory to the root of the repo
- Type
npm link
(Windows) or sudo npm link
(Mac/Linux) to tell npm to use this copy of the repo as the globally installed one
After this procedure you can work with TiddlyWiki5 via npm as though it were installed in the usual way with npm install -g tiddlywiki
.
See also Scripts for TiddlyWiki on Node.js.
This readme file was automatically generated by TiddlyWiki
+
Welcome to TiddlyWiki, a complete interactive wiki in JavaScript. 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 WikiText.
This is version 5.0.8-prerelease of TiddlyWiki, a major reboot designed for the next 25 years. It is currently in beta (see the detailed ReleaseHistory). There is a RoadMap for moving to the full release. It is a great time to get involved and support the future development of TiddlyWiki.
Version 5.0.8-beta includes changes that may break existing content – see: Notes for upgrading to 5.0.8-beta and ReleaseHistory
TiddlyWiki is a free, open source project that depends on your love and support for its survival.
On this site, unless noted otherwise, "TiddlyWiki" refers to the new version 5, and "TiddlyWikiClassic" is used to identify the older version.
The deep internal improvements mean that the new version of TiddlyWiki is not fully compatible with TiddlyWikiClassic. Existing content will need massaging, while plugins and themes will have to be completely rewritten. The upgrade path will get smoother as the new version matures.
+
Getting started with TiddlyWiki under Node.js
Running TiddlyWiki on Node.js brings several important benefits over and above the single file version:
- You can edit your content on any suitably compatible HTML5 browser, including smartphones and tablets
- Individual tiddlers are stored in separate files, which you can organise as you wish
- The ability to build multiple wikis that blend different combinations of shared and unique content
Installation
- Install Node.js from http://nodejs.org
- Open a command line terminal and type:
npm install -g tiddlywiki
If it fails with an error you may need to re-run the command as an administrator:
npm install -g tiddlywiki
(Windows)
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.8-beta
; you may also see other debugging information reported) - Try it out:
tiddlywiki mynewwiki --init server
to create a folder for a new wiki that includes server-related componentstiddlywiki mynewwiki --server
to start TiddlyWiki- Visit http://127.0.0.1:8080/ in your browser
- Try editing and creating tiddlers
The -g
flag causes TiddlyWiki to be installed globally. Without it, TiddlyWiki will only be available in the directory where you installed it.
A slightly different method for installation is recommended if you plan on forking the source code in order to study it or contribute to it. See Working with the TiddlyWiki5 repository.
+
Usage
TiddlyWiki5 can be used on the command line to perform an extensive set of operations based on TiddlyWikiFolders, TiddlerFiles and TiddlyWikiFiles.
For example, the following command loads the tiddlers from a TiddlyWiki HTML file and then saves one of them in static HTML:
tiddlywiki --verbose --load mywiki.html --rendertiddler ReadMe ./readme.html
Running tiddlywiki
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.
The first argument is the optional path to the TiddlyWikiFolder to be loaded. If not present, then the current directory is used.
The commands and their individual arguments follow, each command being identified by the prefix --
.
tiddlywiki [<wikipath>] [--<command> [<arg>[,<arg>]]]
The available commands are:
+Upgrading
If you've installed TiddlyWiki on Node.js on the usual way, when a new version is released you can upgrade it with this command:
npm update -g tiddlywiki
On Mac or Linux you'll need to add sudo like this:
sudo npm update -g tiddlywiki
Working with the TiddlyWiki5 repository
Setting Up
If you plan on working with the TiddlyWiki5 source code then follow these steps:
- Fork the TiddlyWiki5 GitHub repository from https://github.com/Jermolene/TiddlyWiki5
- Clone a local copy of your fork
- Open a command line terminal and change the current working directory to the root of the repo
- Type
npm link
(Windows) or sudo npm link
(Mac/Linux) to tell npm to use this copy of the repo as the globally installed one
After this procedure you can work with TiddlyWiki5 via npm as though it were installed in the usual way with npm install -g tiddlywiki
.
See also Scripts for TiddlyWiki on Node.js.
This readme file was automatically generated by TiddlyWiki
\ No newline at end of file