mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-24 03:44:41 +00:00
Compare commits
1 Commits
barcode-re
...
fix-global
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71c76c233c |
@@ -5,7 +5,7 @@
|
||||
# Default to the current version number for building the plugin library
|
||||
|
||||
if [ -z "$TW5_BUILD_VERSION" ]; then
|
||||
TW5_BUILD_VERSION=v5.3.2
|
||||
TW5_BUILD_VERSION=v5.3.1
|
||||
fi
|
||||
|
||||
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
||||
@@ -104,15 +104,13 @@ node $TW5_BUILD_TIDDLYWIKI \
|
||||
--build favicon static index \
|
||||
|| exit 1
|
||||
|
||||
# /empty.html Empty
|
||||
# /empty.hta For Internet Explorer
|
||||
# /empty-external-core.html External core empty
|
||||
# /tiddlywikicore-<version>.js Core plugin javascript
|
||||
# /empty.html Empty
|
||||
# /empty.hta For Internet Explorer
|
||||
node $TW5_BUILD_TIDDLYWIKI \
|
||||
./editions/empty \
|
||||
--verbose \
|
||||
--output $TW5_BUILD_OUTPUT \
|
||||
--build empty emptyexternalcore \
|
||||
--build empty \
|
||||
|| exit 1
|
||||
|
||||
|
||||
|
||||
@@ -925,7 +925,7 @@ $tw.modules.execute = function(moduleName,moduleRoot) {
|
||||
}
|
||||
} else {
|
||||
// line number should be included in e.stack for runtime errors
|
||||
$tw.utils.error("Error executing boot module " + name + ": " + String(e) + "\n\n" + e.stack);
|
||||
$tw.utils.error("Error executing boot module " + name + ": " + JSON.stringify(e) + "\n\n" + e.stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
title: $:/language/Help/server
|
||||
description: (deprecated: see 'listen' command) Provides an HTTP server interface to TiddlyWiki
|
||||
description: Provides an HTTP server interface to TiddlyWiki (deprecated in favour of the new listen command)
|
||||
|
||||
Legacy command to serve a wiki over HTTP.
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ function FramedEngine(options) {
|
||||
this.domNode.value = this.value;
|
||||
}
|
||||
// Set the attributes
|
||||
if(this.widget.editType && this.widget.editTag !== "textarea") {
|
||||
if(this.widget.editType) {
|
||||
this.domNode.setAttribute("type",this.widget.editType);
|
||||
}
|
||||
if(this.widget.editPlaceholder) {
|
||||
|
||||
@@ -34,7 +34,7 @@ function SimpleEngine(options) {
|
||||
this.domNode.value = this.value;
|
||||
}
|
||||
// Set the attributes
|
||||
if(this.widget.editType && this.widget.editTag !== "textarea") {
|
||||
if(this.widget.editType) {
|
||||
this.domNode.setAttribute("type",this.widget.editType);
|
||||
}
|
||||
if(this.widget.editPlaceholder) {
|
||||
|
||||
@@ -116,7 +116,7 @@ CheckboxWidget.prototype.getValue = function() {
|
||||
} else {
|
||||
list = $tw.utils.parseStringArray(this.checkboxDefault || "") || [];
|
||||
}
|
||||
} else if(this.checkboxListIndex) {
|
||||
} else if (this.checkboxListIndex) {
|
||||
list = $tw.utils.parseStringArray(this.wiki.extractTiddlerDataItem(tiddler,this.checkboxListIndex,this.checkboxDefault || "")) || [];
|
||||
} else {
|
||||
list = this.wiki.filterTiddlers(this.checkboxFilter,this) || [];
|
||||
@@ -215,8 +215,6 @@ CheckboxWidget.prototype.handleChangeEvent = function(event) {
|
||||
if($tw.utils.isArray(fieldContents)) {
|
||||
// Make a copy so we can modify it without changing original that's refrenced elsewhere
|
||||
listContents = fieldContents.slice(0);
|
||||
} else if(fieldContents === undefined) {
|
||||
listContents = [];
|
||||
} else if(typeof fieldContents === "string") {
|
||||
listContents = $tw.utils.parseStringArray(fieldContents);
|
||||
// No need to copy since parseStringArray returns a fresh array, not refrenced elsewhere
|
||||
|
||||
@@ -41,43 +41,30 @@ TranscludeWidget.prototype.execute = function() {
|
||||
this.collectAttributes();
|
||||
this.collectStringParameters();
|
||||
this.collectSlotFillParameters();
|
||||
// Determine whether we're being used in inline or block mode
|
||||
var parseAsInline = !this.parseTreeNode.isBlock;
|
||||
if(this.transcludeMode === "inline") {
|
||||
parseAsInline = true;
|
||||
} else if(this.transcludeMode === "block") {
|
||||
parseAsInline = false;
|
||||
}
|
||||
// Get the target text and parse tree nodes that we are transcluding
|
||||
var target = this.getTransclusionTarget(),
|
||||
parseTreeNodes;
|
||||
this.sourceText = target.text;
|
||||
this.parserType = target.type;
|
||||
this.parseAsInline = target.parseAsInline;
|
||||
// Set 'thisTiddler'
|
||||
this.setVariable("thisTiddler",this.transcludeTitle);
|
||||
var parseTreeNodes, target;
|
||||
// Process the transclusion according to the output type
|
||||
switch(this.transcludeOutput || "text/html") {
|
||||
case "text/html":
|
||||
// Return the parse tree nodes of the target
|
||||
target = this.parseTransclusionTarget(parseAsInline);
|
||||
this.parseAsInline = target.parseAsInline;
|
||||
// Return the parse tree nodes
|
||||
parseTreeNodes = target.parseTreeNodes;
|
||||
break;
|
||||
case "text/raw":
|
||||
// Just return the raw text
|
||||
target = this.getTransclusionTarget();
|
||||
parseTreeNodes = [{type: "text", text: target.text}];
|
||||
parseTreeNodes = [{type: "text", text: this.sourceText}];
|
||||
break;
|
||||
default:
|
||||
// "text/plain" is the plain text result of wikifying the text
|
||||
target = this.parseTransclusionTarget(parseAsInline);
|
||||
var widgetNode = this.wiki.makeWidget(target.parser,{
|
||||
parentWidget: this,
|
||||
document: $tw.fakeDocument
|
||||
});
|
||||
var container = $tw.fakeDocument.createElement("div");
|
||||
widgetNode.render(container,null);
|
||||
parseTreeNodes = [{type: "text", text: container.textContent}];
|
||||
// text/plain
|
||||
var plainText = this.wiki.renderText("text/plain",this.parserType,this.sourceText,{parentWidget: this});
|
||||
parseTreeNodes = [{type: "text", text: plainText}];
|
||||
break;
|
||||
}
|
||||
this.sourceText = target.text;
|
||||
this.parserType = target.type;
|
||||
// Set the legacy transclusion context variables only if we're not transcluding a variable
|
||||
if(!this.transcludeVariable) {
|
||||
var recursionMarker = this.makeRecursionMarker();
|
||||
@@ -174,44 +161,17 @@ TranscludeWidget.prototype.collectSlotFillParameters = function() {
|
||||
};
|
||||
|
||||
/*
|
||||
Get transcluded details as an object {text:,type:}
|
||||
Get transcluded parse tree nodes as an object {text:,type:,parseTreeNodes:,parseAsInline:}
|
||||
*/
|
||||
TranscludeWidget.prototype.getTransclusionTarget = function() {
|
||||
var self = this;
|
||||
var text;
|
||||
// Return the text and type of the target
|
||||
if(this.hasAttribute("$variable")) {
|
||||
if(this.transcludeVariable) {
|
||||
// Transcluding a variable
|
||||
var variableInfo = this.getVariableInfo(this.transcludeVariable,{params: this.getOrderedTransclusionParameters()});
|
||||
text = variableInfo.text;
|
||||
return {
|
||||
text: variableInfo.text,
|
||||
type: this.transcludeType
|
||||
};
|
||||
}
|
||||
} else {
|
||||
// Transcluding a text reference
|
||||
var parserInfo = this.wiki.getTextReferenceParserInfo(
|
||||
this.transcludeTitle,
|
||||
this.transcludeField,
|
||||
this.transcludeIndex,
|
||||
{
|
||||
subTiddler: this.transcludeSubTiddler,
|
||||
defaultType: this.transcludeType
|
||||
});
|
||||
return {
|
||||
text: parserInfo.text,
|
||||
type: parserInfo.type
|
||||
};
|
||||
// Determine whether we're being used in inline or block mode
|
||||
var parseAsInline = !this.parseTreeNode.isBlock;
|
||||
if(this.transcludeMode === "inline") {
|
||||
parseAsInline = true;
|
||||
} else if(this.transcludeMode === "block") {
|
||||
parseAsInline = false;
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Get transcluded parse tree nodes as an object {text:,type:,parseTreeNodes:,parseAsInline:}
|
||||
*/
|
||||
TranscludeWidget.prototype.parseTransclusionTarget = function(parseAsInline) {
|
||||
var self = this;
|
||||
var parser;
|
||||
// Get the parse tree
|
||||
if(this.hasAttribute("$variable")) {
|
||||
@@ -277,7 +237,7 @@ TranscludeWidget.prototype.parseTransclusionTarget = function(parseAsInline) {
|
||||
}
|
||||
$tw.utils.addAttributeToParseTreeNode(parser.tree[0],name,param["default"])
|
||||
});
|
||||
} else if(srcVariable && !srcVariable.isFunctionDefinition) {
|
||||
} else if(srcVariable && (srcVariable.isMacroDefinition || !srcVariable.isFunctionDefinition)) {
|
||||
// For macros and ordinary variables, wrap the parse tree in a vars widget assigning the parameters to variables named "__paramname__"
|
||||
parser = {
|
||||
tree: [
|
||||
@@ -309,13 +269,22 @@ TranscludeWidget.prototype.parseTransclusionTarget = function(parseAsInline) {
|
||||
});
|
||||
}
|
||||
// Return the parse tree
|
||||
return {
|
||||
parser: parser,
|
||||
parseTreeNodes: parser ? parser.tree : (this.slotFillParseTrees["ts-missing"] || []),
|
||||
parseAsInline: parseAsInline,
|
||||
text: parser && parser.source,
|
||||
type: parser && parser.type
|
||||
};
|
||||
if(parser) {
|
||||
return {
|
||||
parseTreeNodes: parser.tree,
|
||||
parseAsInline: parseAsInline,
|
||||
text: parser.source,
|
||||
type: parser.type
|
||||
};
|
||||
} else {
|
||||
// If there's no parse tree then return the missing slot value
|
||||
return {
|
||||
parseTreeNodes: (this.slotFillParseTrees["ts-missing"] || []),
|
||||
parseAsInline: parseAsInline,
|
||||
text: null,
|
||||
type: null
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/config/OfficialPluginLibrary
|
||||
tags: $:/tags/PluginLibrary
|
||||
url: https://tiddlywiki.com/library/v5.3.2/index.html
|
||||
url: https://tiddlywiki.com/library/v5.3.1/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}}
|
||||
|
||||
{{$:/language/OfficialPluginLibrary/Hint}}
|
||||
|
||||
@@ -10,7 +10,7 @@ color:$(foregroundColor)$;
|
||||
<!-- This has no whitespace trim to avoid modifying $actions$. Closing tags omitted for brevity. -->
|
||||
\define tag-pill-inner(tag,icon,colour,fallbackTarget,colourA,colourB,element-tag,element-attributes,actions)
|
||||
\whitespace trim
|
||||
<$let
|
||||
<$vars
|
||||
foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">>
|
||||
backgroundColor=<<__colour__>>
|
||||
>
|
||||
@@ -23,7 +23,6 @@ color:$(foregroundColor)$;
|
||||
<$transclude tiddler=<<__icon__>>/>
|
||||
<$view tiddler=<<__tag__>> field="title" format="text" />
|
||||
</$element-tag$>
|
||||
</$let>
|
||||
\end
|
||||
|
||||
\define tag-pill-body(tag,icon,colour,palette,element-tag,element-attributes,actions)
|
||||
|
||||
@@ -12,9 +12,6 @@
|
||||
"empty": [
|
||||
"--render","$:/core/save/all","empty.html","text/plain",
|
||||
"--render","$:/core/save/all","empty.hta","text/plain"],
|
||||
"emptyexternalcore": [
|
||||
"--render","$:/core/save/offline-external-js","empty-external-core.html","text/plain",
|
||||
"--render","$:/core/templates/tiddlywiki5.js","[[tiddlywikicore-]addsuffix<version>addsuffix[.js]]","text/plain"],
|
||||
"externalimages": [
|
||||
"--savetiddlers","[is[image]]","images",
|
||||
"--setfield","[is[image]]","_canonical_uri","$:/core/templates/canonical-uri-external-image","text/plain",
|
||||
@@ -23,7 +20,7 @@
|
||||
"static": [
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,8 +17,8 @@
|
||||
],
|
||||
"library": [
|
||||
"--makelibrary","$:/UpgradeLibrary",
|
||||
"--savelibrarytiddlers","$:/UpgradeLibrary","[prefix[$:/]] -[[$:/plugins/tiddlywiki/upgrade]] -[[$:/plugins/tiddlywiki/translators]] -[[$:/plugins/tiddlywiki/pluginlibrary]] -[[$:/plugins/tiddlywiki/jasmine]]","recipes/library/tiddlers/","$:/UpgradeLibrary/List",
|
||||
"--savetiddler","$:/UpgradeLibrary/List","recipes/library/tiddlers.json",
|
||||
"--savelibrarytiddlers","$:/UpgradeLibrary","[prefix[$:/]] -[[$:/plugins/tiddlywiki/upgrade]] -[[$:/plugins/tiddlywiki/translators]] -[[$:/plugins/tiddlywiki/pluginlibrary]] -[[$:/plugins/tiddlywiki/jasmine]]","recipes/library/tiddlers/","$:/UpgradeLibrary/List",
|
||||
"--savetiddler","$:/UpgradeLibrary/List","recipes/library/tiddlers.json",
|
||||
"--rendertiddler","$:/plugins/tiddlywiki/pluginlibrary/library.template.html","index.html","text/plain"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,28 +1,21 @@
|
||||
caption: 5.3.1
|
||||
created: 20230820112855583
|
||||
modified: 20230820112855583
|
||||
released: 20230820112855583
|
||||
created: 20230720215100983
|
||||
modified: 20230720215100983
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.3.1
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.3.0...v5.3.1]]//
|
||||
|
||||
<<.banner-credits
|
||||
credit:"""Congratulations to [[vilc|https://talk.tiddlywiki.org/u/vilc]] for their winning design for the banner for this release (here is the [[competition thread|https://talk.tiddlywiki.org/t/banner-image-competition-for-v5-3-0/7406/10]]).
|
||||
"""
|
||||
url:"https://github.com/Jermolene/TiddlyWiki5/blob/4124bbdfb3e2445d45488006dfff1925d067ab0f/editions/tw5.com/tiddlers/images/New%20Release%20Banner.png?raw=true"
|
||||
>>
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.3.0...master]]//
|
||||
|
||||
! Overview of v5.3.1
|
||||
|
||||
This release comes only a few weeks after [[v5.3.0|Release 5.3.0]]. The motivation for the release is to swiftly fix some issues that have emerged with v5.3.0. There are also some other improvements included in this release, notably the ability to access binary resources over HTTP -- the [[demo|WidgetMessage: tm-http-request Example - Random Dog]] downloads a random image or video of a dog.
|
||||
|
||||
! Bug Fixes and Reversions of v5.3.0 Changes
|
||||
! Reversions of v5.3.0 Changes
|
||||
|
||||
* Reverted adding the `widget.destroy()` method because of performance concerns (see https://github.com/Jermolene/TiddlyWiki5/pull/7468)
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7647">> inefficiency when transcluding with the ''$output'' attribute set to `text/plain` that manifested itself as extremely slow export times
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7648">> unwanted error message "Global assignment is not allowed within modules on node"
|
||||
|
||||
! Plugin Improvements
|
||||
|
||||
*
|
||||
|
||||
! Translation improvement
|
||||
|
||||
@@ -31,14 +24,22 @@ Improvements to the following translations:
|
||||
* Chinese
|
||||
* Polish
|
||||
|
||||
! Usability Improvements
|
||||
|
||||
*
|
||||
|
||||
! Widget Improvements
|
||||
|
||||
* <<.link-badge-added "https://github.com/Jermolene/TiddlyWiki5/pull/7594">> ''tabindex'' attribute to SelectWidget
|
||||
|
||||
! Filter improvements
|
||||
|
||||
*
|
||||
|
||||
! Hackability Improvements
|
||||
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7611">> ImportVariablesWidget and [[Pragma: \import]] to trim whitespace when parsing tiddlers
|
||||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/commit/9b2af1359614f4ad5afd05be7cf9853909334592">> [[WidgetMessage: tm-http-request]] to handle binary responses ([[demo|WidgetMessage: tm-http-request Example - Random Dog]])
|
||||
* <<.link-badge-extended "https://github.com/Jermolene/TiddlyWiki5/commit/9b2af1359614f4ad5afd05be7cf9853909334592"> [[WidgetMessage: tm-http-request]] to handle binary responses ([[demo|WidgetMessage: tm-http-request Example - Random Dog]])
|
||||
|
||||
! Bug Fixes
|
||||
|
||||
@@ -48,17 +49,18 @@ Improvements to the following translations:
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7624">> the pragmas introduced in v5.3.0 so that they can be indented with whitespace
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7619">> size of tiddler icons
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7622">> drag and drop from Chrome-like browsers to Firefox
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/pull/7679">> listIndex mode of checkbox widgets
|
||||
|
||||
! Node.js Improvements
|
||||
|
||||
* <<.link-badge-improved "https://github.com/Jermolene/TiddlyWiki5/pull/7645">> console reporting of ~JavaScript errors
|
||||
*
|
||||
|
||||
! Developer Improvements
|
||||
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/6c7c21a87bdb0d8a00df1c14eea18912164e0b57">> overeager onload handler in Jasmine plugin
|
||||
* <<.link-badge-fixed "https://github.com/Jermolene/TiddlyWiki5/commit/08bad90e51c45233a196333e101bbbf6ecf702ce">> ordering of shadow tiddler listings to not reflect order of insertion
|
||||
|
||||
Currently shadow tiddler ordering depends upon the order in which the shadows appear in the plugin JSON
|
||||
|
||||
! Acknowledgements
|
||||
|
||||
[[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki:
|
||||
@@ -66,21 +68,11 @@ Improvements to the following translations:
|
||||
<<.contributors """
|
||||
AnthonyMuscio
|
||||
btheado
|
||||
catter-fly
|
||||
cmo-pomerium
|
||||
CrossEye
|
||||
flibbles
|
||||
hffqyd
|
||||
lilscribby
|
||||
linonetwo
|
||||
Marxsal
|
||||
mateuszwilczek
|
||||
pille1842
|
||||
pmario
|
||||
rmunn
|
||||
saqimtiaz
|
||||
stevesunypoly
|
||||
TiddlyTweeter
|
||||
twMat
|
||||
yaisog
|
||||
""">>
|
||||
@@ -1,60 +0,0 @@
|
||||
caption: 5.3.2
|
||||
created: 20230820114855583
|
||||
modified: 20230820114855583
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.3.2
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.3.1...master]]//
|
||||
|
||||
! Translation improvement
|
||||
|
||||
Improvements to the following translations:
|
||||
|
||||
*
|
||||
|
||||
! Widget Improvements
|
||||
|
||||
*
|
||||
|
||||
! Hackability Improvements
|
||||
|
||||
*
|
||||
|
||||
! Bug Fixes
|
||||
|
||||
*
|
||||
|
||||
! Node.js Improvements
|
||||
|
||||
*
|
||||
|
||||
! Developer Improvements
|
||||
|
||||
*
|
||||
|
||||
! Acknowledgements
|
||||
|
||||
[[@Jermolene|https://github.com/Jermolene]] would like to thank the contributors to this release who have generously given their time to help improve TiddlyWiki:
|
||||
|
||||
<<.contributors """
|
||||
AnthonyMuscio
|
||||
btheado
|
||||
catter-fly
|
||||
cmo-pomerium
|
||||
CrossEye
|
||||
flibbles
|
||||
hffqyd
|
||||
lilscribby
|
||||
linonetwo
|
||||
Marxsal
|
||||
mateuszwilczek
|
||||
pille1842
|
||||
pmario
|
||||
rmunn
|
||||
saqimtiaz
|
||||
stevesunypoly
|
||||
TiddlyTweeter
|
||||
twMat
|
||||
yaisog
|
||||
""">>
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/config/LocalPluginLibrary
|
||||
tags: $:/tags/PluginLibrary
|
||||
url: http://127.0.0.1:8080/prerelease/library/v5.3.2/index.html
|
||||
url: http://127.0.0.1:8080/prerelease/library/v5.3.1/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}} (Prerelease Local)
|
||||
|
||||
A locally installed version of the official ~TiddlyWiki plugin library at tiddlywiki.com for testing and debugging. //Requires a local web server to share the library//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/config/OfficialPluginLibrary
|
||||
tags: $:/tags/PluginLibrary
|
||||
url: https://tiddlywiki.com/prerelease/library/v5.3.2/index.html
|
||||
url: https://tiddlywiki.com/prerelease/library/v5.3.1/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}} (Prerelease)
|
||||
|
||||
The prerelease version of the official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
title: TiddlyWiki Pre-release
|
||||
modified: 20230731122156493
|
||||
modified: 20150428204930183
|
||||
|
||||
This is a pre-release build of TiddlyWiki provided for testing and review purposes. ''Please don't try to depend on the pre-release for anything important'' -- you should use the latest official release from https://tiddlywiki.com.
|
||||
|
||||
|
||||
@@ -20,4 +20,4 @@
|
||||
"favicon": [
|
||||
"--savetiddler","$:/favicon.ico","favicon.ico"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
"static": [
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"],
|
||||
"tiddlywikicore": [
|
||||
"--render","$:/core/templates/tiddlywiki5.js","[[tiddlywikicore-]addsuffix<version>addsuffix[.js]]","text/plain"]
|
||||
|
||||
@@ -33,4 +33,4 @@ $param$ with a ''buffalo''
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Going to lunch with a ''buffalo''</p><p>Going to breakfastwith a<strong>buffalo</strong></p><p>Going to dinner with a <strong>buffalo</strong></p>Going to lunch with a ''buffalo''Going to breakfastwith abuffaloGoing to dinner with a buffalo
|
||||
<p>Going to lunch with a ''buffalo''</p><p>Going to breakfastwith a<strong>buffalo</strong></p><p>Going to dinner with a <strong>buffalo</strong></p>Going to lunch with a buffalo with a buffaloGoing to dinner with a buffalo
|
||||
@@ -1,26 +0,0 @@
|
||||
title: Procedures/Double/Underscore
|
||||
description: Checking that procedures don't expose parameters as variables wrapped in double underscores
|
||||
type: text/vnd.tiddlywiki-multiple
|
||||
tags: [[$:/tags/wiki-test-spec]]
|
||||
|
||||
title: Output
|
||||
|
||||
\whitespace trim
|
||||
\procedure mamacro(one:"red",two:"green")
|
||||
It is $one$ and $two$<<__one__>><<__two__>>.
|
||||
\end
|
||||
|
||||
<$macrocall $name="mamacro"/>
|
||||
|
||||
<$transclude $variable="mamacro"/>
|
||||
|
||||
<$transclude $variable="mamacro" one="orange"/>
|
||||
|
||||
<$transclude $variable="mamacro" 0="pink"/>
|
||||
|
||||
<$transclude $variable="mamacro" one="purple" 1="pink"/>
|
||||
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>It is $one$ and $two$.</p><p>It is $one$ and $two$.</p><p>It is $one$ and $two$.</p><p>It is $one$ and $two$.</p><p>It is $one$ and $two$.</p>
|
||||
@@ -21,7 +21,7 @@
|
||||
"static": [
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
},
|
||||
"config": {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
created: 20140129085406905
|
||||
modified: 20230805140720289
|
||||
modified: 20210106151027268
|
||||
tags: [[Other Resources]] Articles
|
||||
title: "TiddlyWiki Posts" by Jeffrey Kishner
|
||||
type: text/vnd.tiddlywiki
|
||||
url: https://web.archive.org/web/20221015011644/http://blog.jeffreykishner.com/tiddlywiki/
|
||||
url: http://blog.jeffreykishner.com/tiddlywiki/
|
||||
|
||||
A collection of articles covering integration with Fargo, Font Awesome and Google Calendar, and tips for managing task lists. The original site is missing, but a link to an archive is provided.
|
||||
A collection of articles covering integration with Fargo, Font Awesome and Google Calendar, and tips for managing task lists.
|
||||
|
||||
{{!!url}}
|
||||
|
||||
|
||||
@@ -13,8 +13,6 @@ url: https://ibnishak.github.io/Timimi/
|
||||
|
||||
Timimi is a web-extension accompanied by a native host that allows you to save and backup your standalone HTML tiddlywiki files ''anywhere in your hard-drive''. Once installed, you can save the tiddlywiki files without any extra steps, like the original Tiddlyfox addon.
|
||||
|
||||
* The native host requires a component installed on the host computer, outside the browser.
|
||||
|
||||
{{!!url}}
|
||||
|
||||
As of version 2.1, Timimi supports the following browsers
|
||||
@@ -31,4 +29,4 @@ Timimi also provides users with 4 backup strategies, viz:
|
||||
* Create a backup Every n^^th^^ save
|
||||
* Create a backup every n^^th^^ minute
|
||||
* Customised Tower of Hanoi
|
||||
* First in First Out
|
||||
* First in First Out
|
||||
@@ -1,11 +1,11 @@
|
||||
created: 20201117163027900
|
||||
modified: 20230723074506632
|
||||
modified: 20210106151027459
|
||||
tags: Tutorials
|
||||
title: GitHub Saver Tutorial by Mohammad
|
||||
type: text/vnd.tiddlywiki
|
||||
url: https://kookma.github.io/TW5-GitHub-Saver/
|
||||
|
||||
GitHub Saver is a step by step tutorial that shows how to integrate Tiddlywiki 5 and ~GitHub Pages to create websites hosted on https://github.com/.
|
||||
GitHub Saver is a step by step tutorial shows how to integrate Tiddlywiki 5 and GitHub Pages to create websites hosted on https://github.com/.
|
||||
|
||||
{{!!url}}
|
||||
|
||||
@@ -13,11 +13,11 @@ This instruction is based on Tiddlywiki single html file model, while it can use
|
||||
|
||||
!! Other tutorials
|
||||
|
||||
;Tiddlywiki, Travis-CI and ~GitHub Pages
|
||||
;Tiddlywiki, Travis-CI and GitHub Pages
|
||||
:https://kookma.github.io/Tiddlywiki-Travis-CI/
|
||||
:This wiki shows how to set up websites hosted on [[GitHub Pages|https://pages.github.com/]] using [[Travis-CI|https://travis-ci.org]] and [[Tiddlywiki 5|https://tiddlywiki.com]] on Node.js.
|
||||
|
||||
|
||||
;Tiddlywiki and ~GitHub Pages
|
||||
;Tiddlywiki and GitHub Pages
|
||||
:https://kookma.github.io/Tiddlywiki-and-GitHub-Pages/
|
||||
:This instruction is based on local edit, save and push to ~GitHub. It does NOT use the new ~GitHub Saver mechanism (requires TW 5.1.20+) which lets edit and save directly from Tiddlywiki!
|
||||
:This instruction is based on local edit, save and push to GitHub. It does NOT use the new GitHub Saver mechanism (requires TW 5.1.20+) which lets edit and save directly from Tiddlywiki!
|
||||
@@ -0,0 +1,16 @@
|
||||
created: 20140312085406905
|
||||
modified: 20140312084543862
|
||||
tags: Tutorials
|
||||
title: "Install and run TiddlyWiki on a CentOS 6 VPS using Nginx" from RoseHosting
|
||||
type: text/vnd.tiddlywiki
|
||||
url: http://www.rosehosting.com/blog/install-and-run-tiddlywiki-on-a-centoos-6-vps-using-nginx/
|
||||
|
||||
A step by step guide to running TiddlyWiki on a ~CentOS Virtual Private Server.
|
||||
|
||||
{{!!url}}
|
||||
|
||||
<<<
|
||||
In this tutorial we will guide you through the steps of installing and running TiddlyWiki on a ~CentOS 6 VPS.
|
||||
|
||||
We will also install and configure Nginx as a reverse proxy, so you can run TiddlyWiki behind Nginx.
|
||||
<<<
|
||||
@@ -1,9 +0,0 @@
|
||||
created: 20230723073000469
|
||||
modified: 20230723073046462
|
||||
tags: Definitions
|
||||
title: Git
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
>Git (/ɡɪt/) is a distributed version control system that tracks changes in any set of computer files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data integrity, and support for distributed, non-linear workflows (thousands of parallel branches running on different computers).
|
||||
>
|
||||
>https://en.wikipedia.org/wiki/Git
|
||||
@@ -1,15 +1,13 @@
|
||||
created: 20140910212609354
|
||||
modified: 20230723074351846
|
||||
modified: 20190408173002622
|
||||
tags: Definitions
|
||||
title: GitHub
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
GitHub is a hosting service for distributed projects that use git as their version-control system. It allows free hosting and management of open-source projects and facilitates collaborative development on the source code. Using ~GitHub for non-open-source endeavours requires additional fees.
|
||||
GitHub is a hosting service for distributed projects that use git as their version-control system. It allows free hosting and management of open-source projects and facilitates collaborative development on the source code. Using GitHub for non-open-source endeavours requires additional fees.
|
||||
|
||||
The code and documentation of TiddlyWiki is hosted on ~GitHub at:
|
||||
The code and documentation of TiddlyWiki is hosted on GitHub at:
|
||||
|
||||
https://github.com/Jermolene/TiddlyWiki5
|
||||
|
||||
~GitHub also offer a free web hosting service called [[GitHub Pages|https://pages.github.com/]] that can be used directly from the single file configuration. See [[Saving to a Git service]].
|
||||
|
||||
An alternative to ~GitHub is GitLab
|
||||
GitHub also offer a free web hosting service called [[GitHub Pages|https://pages.github.com/]] that can be used directly from the single file configuration. See [[Saving to a Git service]].
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
created: 20230723072527781
|
||||
modified: 20230723073955715
|
||||
tags: Definitions
|
||||
title: GitLab
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
>GitLab Inc. is an open-core company that operates ~GitLab, a ~DevOps software package which can develop, secure, and operate software. The open source software project was created by Ukrainian developer Dmytro Zaporozhets and Dutch developer Sytse Sijbrandij
|
||||
>
|
||||
>https://en.wikipedia.org/wiki/GitLab
|
||||
|
||||
Both GitLab and GitHub use [[Git]] a distributed version control system, that can be used to store, view and edit TiddlyWiki wikis using [[GitLab Pages|https://docs.gitlab.com/ee/user/project/pages/]]
|
||||
|
||||
Learn more at: [[Saving to a Git service]]
|
||||
@@ -1,6 +1,6 @@
|
||||
created: 20130822170200000
|
||||
list: [[A Gentle Guide to TiddlyWiki]] [[Discover TiddlyWiki]] [[Some of the things you can do with TiddlyWiki]] [[Ten reasons to switch to TiddlyWiki]] Examples [[What happened to the original TiddlyWiki?]]
|
||||
modified: 20230820112855583
|
||||
modified: 20230701123439630
|
||||
tags: TableOfContents
|
||||
title: HelloThere
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 42 KiB |
@@ -1,14 +1,12 @@
|
||||
caption: tag
|
||||
created: 20141206130540337
|
||||
modified: 20230725201240201
|
||||
modified: 20150221224326000
|
||||
tags: Macros [[Core Macros]]
|
||||
title: tag Macro
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The <<.def tag>> [[macro|Macros]] generates a tag pill for a specified tag. Clicking the tag pill opens a dropdown. This can be compared to the [[tag-pill Macro]] which also features other parameters.
|
||||
|
||||
<<.tip """If a [[list widget|ListWidget]] generates multiple tag macros for the same tag, clicking on one of them will open dropdowns on all of them. The simplest way to prevent this is to add the `counter="transclusion"` attribute to the list widget. See the examples below for more details.""">>
|
||||
|
||||
!! Parameters
|
||||
|
||||
;tag
|
||||
|
||||
@@ -1,29 +1,8 @@
|
||||
created: 20150221211317000
|
||||
modified: 20230725203751870
|
||||
modified: 20150221224519000
|
||||
tags: [[tag Macro]] [[Macro Examples]]
|
||||
title: tag Macro (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<$macrocall $name=".example" n="1" eg="""<<tag>>"""/>
|
||||
<$macrocall $name=".example" n="2" eg="""<<tag Concepts>>"""/>
|
||||
|
||||
If a [[list widget|ListWidget]] generates multiple tag macros for the same tag, clicking any of them opens dropdowns on all of them, as in the example below. This is usually unwanted.
|
||||
<$macrocall $name=".example" n="3" eg="""<$list filter="[tag[HelloThere]]">
|
||||
|
||||
* <$link/> is tagged with: <$list filter="[<currentTiddler>tags[]]"> <<tag>> </$list>
|
||||
|
||||
</$list>"""/>
|
||||
|
||||
Adding the `counter="transclusion"` attribute to the list widget that generates multiple identical tag macros causes each of them to be identified as a unique one. Clicking on any of them opens only a single dropdown.
|
||||
<$macrocall $name=".example" n="4" eg="""<$list filter="[tag[HelloThere]]" counter="transclusion">
|
||||
|
||||
* <$link/> is tagged with: <$list filter="[<currentTiddler>tags[]]"> <<tag>> </$list>
|
||||
|
||||
</$list>"""/>
|
||||
|
||||
A slightly more performant option is to use the `variable="transclusion"` attribute in the list widget. In this case, the variable `<<transclusion>>` has to be used inside the list widget instead of the `<<currentTiddler>>` .
|
||||
<$macrocall $name=".example" n="5" eg="""<$list filter="[tag[HelloThere]]" variable="transclusion">
|
||||
|
||||
* <$link to=<<transclusion>>/> is tagged with: <$list filter="[<transclusion>tags[]]"> <<tag>> </$list>
|
||||
|
||||
</$list>"""/>
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: tm-open-window
|
||||
created: 20220228140417116
|
||||
modified: 20230723220539648
|
||||
modified: 20220409092811188
|
||||
tags: Messages
|
||||
title: WidgetMessage: tm-close-window
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -29,7 +29,7 @@ src="""
|
||||
width="400"
|
||||
height="500"
|
||||
windowID="window1"
|
||||
something="I just flew in on a variable, and boy is my Hashmap tired." />
|
||||
something="I just in over in a variable, and boy is my Hashmap tired." />
|
||||
</$button>
|
||||
<$button>Close Window
|
||||
<$action-sendmessage
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
caption: tm-download-file
|
||||
created: 20140811112201235
|
||||
modified: 20230723214745520
|
||||
modified: 20220123141646321
|
||||
tags: Messages
|
||||
title: WidgetMessage: tm-download-file
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: tm-download-file
|
||||
|
||||
The download file message causes the current saver module to prompt the user to download the result of parsing a specified template tiddler as a file. It requires the following properties on the `event` object:
|
||||
|
||||
|!Name |!Description |
|
||||
|param |Title of a tiddler to use as a template for the new tiddler |
|
||||
|//{any other params}// |Any other parameters are made available as variables within the context of the widget message. |
|
||||
|paramObject |Optional hashmap of variable values to use for the rendering |
|
||||
|
||||
The following variable names have special behaviour:
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: tm-edit-bitmap-operation
|
||||
created: 20160424204236050
|
||||
modified: 20230723214716576
|
||||
modified: 20160424215219517
|
||||
tags: Messages
|
||||
title: WidgetMessage: tm-edit-bitmap-operation
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -30,12 +30,12 @@ Clears the contents of the image and fills it with a solid colour. Parameters in
|
||||
\end
|
||||
|
||||
|
||||
|
||||
A `tm-edit-bitmap-operation` invokes one of the available operations on a __surrounding__ bitmap editor. Therefore the message has to be dispatched within the editor in order for it to catch it. The following properties on the `event` object are required:
|
||||
|
||||
|!Name |!Description |
|
||||
|param |Name of the operation to be executed, see ''below'' for a list of possible operations |
|
||||
|//{any other params}// |Any other parameters are made available as variables within the context of the widget message. |
|
||||
|
||||
|paramObject| Hashmap of additional parameters required by the operation top be executed |
|
||||
|
||||
The `tm-edit-bitmap-operation` message is usually generated by a ButtonWidget or an ActionWidget and is handled by the surrounding bitmap editor.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: tm-edit-text-operation
|
||||
created: 20160424211339792
|
||||
modified: 20230723214636245
|
||||
modified: 20210520053923011
|
||||
tags: Messages
|
||||
title: WidgetMessage: tm-edit-text-operation
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -121,7 +121,7 @@ A `tm-edit-text-operation` invokes one of the available operations on a __surrou
|
||||
|
||||
|!Name |!Description |
|
||||
|param |Name of the operation to be executed, see ''below'' for a list of possible operations |
|
||||
|//{any other params}// |Any other parameters are made available as variables within the context of the widget message. |
|
||||
|paramObject|Hashmap of additional parameters required by the operation top be executed |
|
||||
|
||||
The `tm-edit-text-operation` message is usually generated by a ButtonWidget or an ActionWidget and is handled by the surrounding text editor.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: tm-focus-selector
|
||||
created: 20190628162542132
|
||||
modified: 20230723215122038
|
||||
modified: 20190628162542132
|
||||
tags: Messages
|
||||
title: WidgetMessage: tm-focus-selector
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -9,6 +9,6 @@ The `tm-focus-selector` message sets the focus to the DOM element identified by
|
||||
|
||||
|!Name |!Description |
|
||||
|param |Selector identifying the DOM element to be focussed |
|
||||
|//{any other params}// |Any other parameters to be passed to the [[focus()|https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus]] method as variables.|
|
||||
|paramObject |Optional hashmap of additional parameters to be passed to the [[focus()|https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus]] method |
|
||||
|
||||
<<.tip """Use preventScroll="true" to prevent the browser from scrolling to the focused element""">>
|
||||
|
||||
@@ -57,8 +57,6 @@ tags: $:/tags/Global
|
||||
|
||||
This demo uses the API of the website https://random.dog/ to import a random dog image or video.
|
||||
|
||||
//Note that the images and videos can be quite large, so this demo is not recommended to be used over mobile data connections.//
|
||||
|
||||
<$button actions=<<get-random-dog>>>
|
||||
Import a random dog image or video
|
||||
</$button>
|
||||
@@ -82,7 +80,7 @@ Export all imported random dogs: <$macrocall $name="exportButton" exportFilter="
|
||||
<$link>
|
||||
<$text text=<<currentTiddler>>/>
|
||||
</$link>
|
||||
<div style="width:300px;">
|
||||
<div style="width:300px;height:300px;">
|
||||
<$transclude $tiddler=<<currentTiddler>>/>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: tm-http-request
|
||||
created: 20230429161453032
|
||||
modified: 20230723215344887
|
||||
modified: 20230717104212742
|
||||
tags: Messages
|
||||
title: WidgetMessage: tm-http-request
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -11,7 +11,7 @@ It uses the following properties on the `event` object:
|
||||
|
||||
|!Name |!Description |
|
||||
|param |Not used |
|
||||
|//{any other params}// |Any other parameters are made available as variables within the context of the widget message. See below. |
|
||||
|paramObject |Hashmap of parameters (see below) |
|
||||
|
||||
The following parameters are used:
|
||||
|
||||
@@ -50,4 +50,4 @@ Note that the state tiddler $:/state/http-requests contains a number representin
|
||||
!! Examples
|
||||
|
||||
* [[Zotero's|https://www.zotero.org/]] API for retrieving reference items: [[WidgetMessage: tm-http-request Example - Zotero]]
|
||||
* [[Random Dog's|https://random.dog/]] API for retrieving random pictures of dogs showing how to retrieve binary data: [[WidgetMessage: tm-http-request Example - Random Dog]]
|
||||
* [[Random Dog's|https://random.dog/]] API for retrieving random pictures of dogs showing how to retrieve binary data: [[WidgetMessage: tm-http-request Example - Random Dogs]]
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
caption: tm-modal
|
||||
created: 20140811112133701
|
||||
modified: 20230723215434712
|
||||
modified: 20201117081247738
|
||||
tags: Messages
|
||||
title: WidgetMessage: tm-modal
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|!Name |!Description |
|
||||
|param |Title of the tiddler to be displayed |
|
||||
|//{any other params}// |Any other parameters are made available as variables within the context of the widget message. |
|
||||
|paramObject |Hashmap of variables to be provided to the modal, contains all extra parameters passed to the widget sending the message. |
|
||||
|rootwindow |<<.from-version 5.1.18>> ''yes'' or ''true'' will always display a modal in the wiki-root-window |
|
||||
|
||||
The modal message is usually generated with the ButtonWidget. The modal message is handled by the TiddlyWiki core.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: tm-new-tiddler
|
||||
created: 20140226194405353
|
||||
modified: 20230723215831560
|
||||
modified: 20220521143507491
|
||||
tags: Messages navigator-message
|
||||
title: WidgetMessage: tm-new-tiddler
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -9,12 +9,12 @@ The new tiddler message creates a new draft tiddler and adds it to the current s
|
||||
|
||||
|!Name |!Description |
|
||||
|param |The optional title of a tiddler to use as a template for the new tiddler |
|
||||
|//{any other params}// |The names and values of additional tiddler fields. |
|
||||
|paramObject |Optional hashmap of additional tiddler fields |
|
||||
|navigateFromTitle |Title of the tiddler from which the navigation to the new tiddler was initiated |
|
||||
|
||||
The title for the draft tiddler is chosen according to these rules:
|
||||
|
||||
* If additional parameters were used and a title field was specified, use that title
|
||||
* If a hashmap was used and a title field was specified, use that title
|
||||
* If a template tiddler was used, use the title of the template tiddler, making it unique with a numeric suffix
|
||||
* Otherwise, generate a new title based on the default new tiddler title with a numeric suffix to make it unique
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
caption: tm-notify
|
||||
created: 20140811112304772
|
||||
modified: 20230723220728382
|
||||
modified: 20160701140248738
|
||||
tags: Messages
|
||||
title: WidgetMessage: tm-notify
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: tm-notify
|
||||
|
||||
The notify message briefly displays a specified tiddler as a small alert in the upper right corner of the page. It requires the following properties on the `event` object:
|
||||
|
||||
|!Name |!Description |
|
||||
|param |Title of the tiddler to be displayed |
|
||||
|//{any other params}// |Any other parameters are made available as variables to the notify message. |
|
||||
|paramObject |Hashmap of variables to be provided to the notification |
|
||||
|
||||
The notify message is handled by the TiddlyWiki core.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: tm-open-external-window
|
||||
created: 20170121182300000
|
||||
modified: 20230723220850135
|
||||
created: 201701211823
|
||||
modified: 201701211825
|
||||
tags: Messages
|
||||
title: WidgetMessage: tm-open-external-window
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -11,8 +11,7 @@ The `tm-open-external-window` message opens an external link eg: "https://tiddly
|
||||
|
||||
|!Name |!Description |
|
||||
|param |URL of the tiddler to be opened in a new browser window, defaults to the [[TiddlyWiki help|https://tiddlywiki.com/#WidgetMessage%3A%20tm-open-external-window if empty]] |
|
||||
|//{any other params}// |Any other parameters are made available as variables to the window. See below. |
|
||||
|
||||
|paramObject |Optional: Hashmap of variables that will be provided to the window. see below |
|
||||
|
||||
''parmObject''
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ title: WidgetMessage: tm-permalink
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: tm-permalink
|
||||
|
||||
The `tm-permalink` message changes the browser address bar to form a [[permalink|PermaLinks]] to a specified tiddler, defaulting to the current tiddler. The resulting link will be copied to the clipboard.
|
||||
The `tm-permalink` message changes the browser address bar to form a [[permalink|PermaLinks]] to a specified tiddler, defaulting to the current tiddler.
|
||||
|
||||
The permalink message supports the following properties on the `event` object:
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
caption: tm-save-wiki
|
||||
created: 20140811112325641
|
||||
modified: 20230723220944427
|
||||
modified: 20141110133723696
|
||||
tags: Messages
|
||||
title: WidgetMessage: tm-save-wiki
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: tm-save-wiki
|
||||
|
||||
The save wiki message causes the current saver module to perform a full save operation. The save operation can involve user interaction. It requires the following properties on the `event` object:
|
||||
|
||||
|!Name |!Description |
|
||||
|param |Title of a tiddler to use as a template for rendering the wiki (defaults to `$:/core/save/all`) |
|
||||
|//{any other params}// |Any other parameters are made available as variables to use for the rendering. |
|
||||
|paramObject |Optional hashmap of variable values to use for the rendering |
|
||||
|
||||
The save wiki message is usually generated by the ButtonWidget.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20221007132845007
|
||||
modified: 20230724184009153
|
||||
modified: 20230518152756112
|
||||
tags: Pragmas
|
||||
title: Pragma: \procedure
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -19,7 +19,7 @@ Note that the `\end` marker can optionally specify the name of the procedure to
|
||||
There is also a single line form for shorter procedures:
|
||||
|
||||
```
|
||||
\procedure <procedure-name>(<param-name>[:<param-default-value>],<param-name>[:<param-default-value>]...) <single-line-definition-text>
|
||||
\define <procedure-name>(<param-name>[:<param-default-value>],<param-name>[:<param-default-value>]...) <single-line-definition-text>
|
||||
```
|
||||
|
||||
The first line of the definition specifies the procedure name and any parameters. Each parameter has a name and, optionally, a default value that is used if no value is supplied on a particular call to the procedure. The lines that follow contain the text of the procedure text (i.e. the snippet represented by the procedure name), until `\end` appears on a line by itself:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20220917112931273
|
||||
modified: 20230724184044642
|
||||
modified: 20230419103154329
|
||||
tags: Pragmas
|
||||
title: Pragma: \rules
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -7,7 +7,7 @@ type: text/vnd.tiddlywiki
|
||||
The ''\rules'' [[pragma|Pragmas]] adjusts the set of parser rules used to parse the remaining text.
|
||||
|
||||
```
|
||||
\rules only|except <rule-list>
|
||||
\rules only|expect <rule-list>
|
||||
```
|
||||
|
||||
The list of available parser rules can be consulted in $:/ControlPanel -> Info -> Advanced -> Parsing.
|
||||
|
||||
@@ -13,7 +13,7 @@ This tiddler describes the different ways in which [[Procedures|Procedures]] can
|
||||
Procedures are created using the [[Pragma: \procedure]] at the start of a tiddler. The definitions are available in the rest of the tiddler that defines them, plus any tiddlers that it transcludes.
|
||||
|
||||
```
|
||||
\procedure my-procedure(param)
|
||||
\define my-procedure(param)
|
||||
This is the procedure text (param=<<param>>)
|
||||
\end
|
||||
```
|
||||
|
||||
@@ -4,7 +4,7 @@ created: 20190408173002622
|
||||
delivery: Service
|
||||
description: Save changes directly to a Git repository (on GitHub, GitLab)
|
||||
method: save
|
||||
modified: 20230723074211772
|
||||
modified: 20200507203007684
|
||||
tags: Android Chrome Firefox [[Internet Explorer]] Linux Mac Opera Safari Saving Windows iOS Edge
|
||||
title: Saving to a Git service
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -24,7 +24,3 @@ Saving to a Git service is configured in the [[$:/ControlPanel]] in the ''Git Se
|
||||
Notes
|
||||
|
||||
* The Git service token or password is stored persistently in browser local storage. Be sure to clear the password if using a shared machine. Using a personal access token for authentication offers an extra layer of security: if the access token is accidentally exposed it can be revoked without needing to reset the account password
|
||||
|
||||
---
|
||||
|
||||
For a more detailed info about the ~GitHub saver see: [[GitHub Saver Tutorial by Mohammad]]
|
||||
@@ -6,4 +6,4 @@ tags: SystemTags
|
||||
title: SystemTag: $:/tags/Macro
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The [[system tag|SystemTags]] `$:/tags/Macro` marks global macros. It is now deprecated in favour of [[SystemTag: $:/tags/Global]].
|
||||
The [[system tag|SystemTags]] `$:/tags/Macro` marks global macros. It is now deprecated in favour of [[SystemTag $:/tags/Global]].
|
||||
@@ -1,52 +0,0 @@
|
||||
created: 20230726145210484
|
||||
modified: 20230726145757234
|
||||
tags: [[Variable Usage]]
|
||||
title: Behaviour of invoked variables depends on how the variable was declared
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\define m1(a1) $a1$ - <<__a1__>> - <<a1>>
|
||||
\procedure p1(a1) $a1$ - <<__a1__>> - <<a1>>
|
||||
\function f1(a1) "$a1$" "-" [<__a1__>] ="-" [<a1>] :and[join[ ]]
|
||||
|
||||
Invoked in normal wikitext context: `<$transclude $variable=macro/>` or `<<macro>>`
|
||||
|
||||
{{Behaviour of variables invoked via normal wikitext}}
|
||||
|
||||
Invoked via widget attribute: `<div class=<<macro>>/>`
|
||||
|
||||
{{Behaviour of variables invoked via widget attributes}}
|
||||
|
||||
Invoked via filter operator parameter: `[<macro>]`
|
||||
|
||||
{{Behaviour of variables invoked via filter operator parameter}}
|
||||
|
||||
Invoked via function call in a filter expression: `[function[macro]]`
|
||||
|
||||
{{Behaviour of variables invoked via filter expression function call}}
|
||||
|
||||
!! Examples
|
||||
|
||||
Below is an example macro, procedure and function definition. All three forms of parameter substitution `$a1$`, `<<__a1__>>`, and `<<a1>>` are included in each definition. The output helps illustrate when each form of substitution will or will not have affect.
|
||||
|
||||
```
|
||||
\define m1(a1) $a1$ - <<__a1__>> - <<a1>>
|
||||
\procedure p1(a1) $a1$ - <<__a1__>> - <<a1>>
|
||||
\function f1(a1) $a1$ "-" [<__a1__>] ="-" [<a1>] :and[join[ ]]
|
||||
```
|
||||
|
||||
| !Variable transclusion|!output |
|
||||
| `<<m1 foo>>`|<<m1 foo>>|
|
||||
| `<<p1 foo>>`|<<p1 foo>>|
|
||||
| `<<f1 foo>>`|<<f1 foo>>|
|
||||
| !Widget attribute|!output |
|
||||
| `<$text text=<<m1 foo>>/>`|<$text text=<<m1 foo>>/>|
|
||||
| `<$text text=<<p1 foo>>/>`|<$text text=<<p1 foo>>/>|
|
||||
| `<$text text=<<f1 foo>>/>`|<$text text=<<f1 foo>>/>|
|
||||
| !Filter operator parameter|!output |
|
||||
| `[<m1 foo>]`|<$text text={{{[<m1 foo>]}}}/>|
|
||||
| `[<p1 foo>]`|<$text text={{{[<p1 foo>]}}}/>|
|
||||
| `[<f1 foo>]`|<$text text={{{[<f1 foo>]}}}/>|
|
||||
| !Function call in filter expression|!output |
|
||||
| `[function[m1],[foo]]`|<$text text={{{[function[m1],[foo]]}}}/>|
|
||||
| `[function[p1],[foo]]`|<$text text={{{[function[p1],[foo]]}}}/>|
|
||||
| `[function[f1],[foo]]`|<$text text={{{[function[f1],[foo]]}}}/>|
|
||||
@@ -1,10 +0,0 @@
|
||||
created: 20230726143929233
|
||||
modified: 20230726150604831
|
||||
tags: [[Variable Usage]]
|
||||
title: Behaviour of variables invoked via filter expression function call
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|tc-first-col-min-width|k
|
||||
|!how declared|!behaviour|
|
||||
|\define, <<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget|Every function is a variable, but only variables defined using \function are invokable using the <<.olink function>> filter operator. Attempts to use a non-function variable is the same as if the function doesn't exist. The behavior in this case is like the identity function. All filter input is passed unchanged to the output.|
|
||||
|\function|The body text of the function is treated as a filter expression and evaluated. This filter expression can itself contain a function call. Filter expressions can be factored out into functions arbitrarily deep.|
|
||||
@@ -1,11 +0,0 @@
|
||||
created: 20230726143617389
|
||||
modified: 20230726150625716
|
||||
tags: [[Variable Usage]]
|
||||
title: Behaviour of variables invoked via filter operator parameter
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|tc-first-col-min-width|k
|
||||
|!how declared|!behaviour|
|
||||
|\define|Textual substitution of parameters is performed on the body text. No further processing takes place. The result after textual substitution is used as the filter operator's parameter.|
|
||||
|<<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget|Body text is retrieved as-is and used as the filter operator's parameter.|
|
||||
|\function|The body text of the function is treated as a filter expression and evaluated. The first result is passed to the operator as a parameter. The remaining results are discarded.|
|
||||
@@ -1,11 +0,0 @@
|
||||
created: 20230726142925020
|
||||
modified: 20230726150648189
|
||||
tags: [[Variable Usage]]
|
||||
title: Behaviour of variables invoked via normal wikitext
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|tc-first-col-min-width|k
|
||||
|!how declared|!behaviour|
|
||||
|\define|All wikitext and variable substitution and textual substitution takes place|
|
||||
|<<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget|All wikitext and variable substitution takes place|
|
||||
|\function|Invoking a function in this way (`<<macro>>`) is a synonym for `<$text text={{{[function[macro]]}}}/>`. As with any filtered transclusion (i.e. triple curly braces), all results except the first are discarded|
|
||||
@@ -1,11 +0,0 @@
|
||||
created: 20230726143332803
|
||||
modified: 20230726150616232
|
||||
tags: [[Variable Usage]]
|
||||
title: Behaviour of variables invoked via widget attributes
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
|tc-first-col-min-width|k
|
||||
|!how declared|!behaviour|
|
||||
|\define|Textual substitution of parameters is performed on the body text. No further processing takes place. The result after textual substitution is used as the attribute's value|
|
||||
|<<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget|Body text is retrieved as-is and used as the attribute's value.|
|
||||
|\function|When a function is invoked as `<div class=<<macro>>/>`, it is a synonym for `<div class={{{[function[macro]]}}}/>`. As with any filtered transclusion (i.e. triple curly braces), all results except the first are discarded. That first result is used as the attribute's value. Note that functions are recursively processed even when invoked in this form. In other words a filter expression in a function can invoke another function and the processing will continue|
|
||||
@@ -1,9 +1,13 @@
|
||||
created: 20230421020225031
|
||||
modified: 20230726145912019
|
||||
modified: 20230422144812613
|
||||
tags:
|
||||
title: Variable Usage
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
\define m1(a1) $a1$ - <<__a1__>> - <<a1>>
|
||||
\procedure p1(a1) $a1$ - <<__a1__>> - <<a1>>
|
||||
\function f1(a1) "$a1$" "-" [<__a1__>] ="-" [<a1>] :and[join[ ]]
|
||||
|
||||
!Ways to define variables and parameters
|
||||
|! how declared|! how parameters are defined|! accessing parameter values in the body|
|
||||
|\define|`()`|`$param$, <<__param__>>`|
|
||||
@@ -96,10 +100,50 @@ These examples are meant to provide insight into the various ways of defining an
|
||||
</$let>
|
||||
|
||||
|
||||
!Behaviour of invoked variables depends on how the variable was declared
|
||||
!Behavior of invoked variables depends on how the variable was declared
|
||||
|
||||
{{Behaviour of invoked variables depends on how the variable was declared}}
|
||||
|!how invoked|!how declared|!behavior|
|
||||
|`<$transclude $variable=macro/>` or `<<macro>>` in normal wikitext context|\define|All wikitext and variable substitution and textual substitution takes place|
|
||||
|~|<<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget|All wikitext and variable substitution takes place|
|
||||
|~|\function|Invoking a function in this way (`<<macro>>`) is a synonym for `<$text text={{{[function[macro]]}}}/>`. As with any filtered transclusion (i.e. triple curly braces), all results except the first are discarded.|
|
||||
||||
|
||||
|widget attribute: `<div class=<<macro>>/>`|\define|Textual substitution of parameters is performed on the body text. No further processing takes place. The result after textual substitution is used as the attribute's value|
|
||||
|~|<<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget|Body text is retrieved as-is and used as the attribute's value.|
|
||||
|~|\function|When a function is invoked as `<div class=<<macro>>/>`, it is a synonym for `<div class={{{[function[macro]]}}}/>`. As with any filtered transclusion (i.e. triple curly braces), all results except the first are discarded. That first result is used as the attribute's value. Note that functions are recursively processed even when invoked in this form. In other words a filter expression in a function can invoke another function and the processing will continue|
|
||||
||||
|
||||
|filter operator parameter: `[<macro>]`|\define|Textual substitution of parameters is performed on the body text. No further processing takes place. The result after textual substitution is used as the filter operator's parameter.|
|
||||
|~|<<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget|Body text is retrieved as-is and used as the filter operator's parameter.|
|
||||
|~|\function|The body text of the function is treated as a filter expression and evaluated. The first result is passed to the operator as a parameter. The remaining results are discarded|
|
||||
||||
|
||||
|function call in a filter expression: `[function[macro]]`|\define, <<.wlink SetWidget>>, <<.wlink LetWidget>>, <<.wlink VarsWidget>>, \procedure, \widget|Every function is a variable, but only variables defined using \function are invokable using the <<.olink function>> filter operator. Attempts to use a non-function variable is the same as if the function doesn't exist. The behavior in this case is like the identity function. All filter input is passed unchanged to the output.|
|
||||
|~|\function|The body text of the function is treated as a filter expression and evaluated. This filter expression can itself contain a function call. Filter expressions can be factored out into functions arbitrarily deep.|
|
||||
|
||||
!! Examples
|
||||
|
||||
Below is an example macro, procedure and function definition. All three forms of parameter substitution `$a1$`, `<<__a1__>>`, and `<<a1>>` are included in each definition. The output helps illustrate when each form of substitution will or will not have affect.
|
||||
|
||||
```
|
||||
\define m1(a1) $a1$ - <<__a1__>> - <<a1>>
|
||||
\procedure p1(a1) $a1$ - <<__a1__>> - <<a1>>
|
||||
\function f1(a1) $a1$ "-" [<__a1__>] ="-" [<a1>] :and[join[ ]]
|
||||
```
|
||||
|
||||
| !Variable transclusion|!output |
|
||||
| `<<m1 foo>>`|<<m1 foo>>|
|
||||
| `<<p1 foo>>`|<<p1 foo>>|
|
||||
| `<<f1 foo>>`|<<f1 foo>>|
|
||||
| !Widget attribute|!output |
|
||||
| `<$text text=<<m1 foo>>/>`|<$text text=<<m1 foo>>/>|
|
||||
| `<$text text=<<p1 foo>>/>`|<$text text=<<p1 foo>>/>|
|
||||
| `<$text text=<<f1 foo>>/>`|<$text text=<<f1 foo>>/>|
|
||||
| !Filter operator parameter|!output |
|
||||
| `[<m1 foo>]`|<$text text={{{[<m1 foo>]}}}/>|
|
||||
| `[<p1 foo>]`|<$text text={{{[<p1 foo>]}}}/>|
|
||||
| `[<f1 foo>]`|<$text text={{{[<f1 foo>]}}}/>|
|
||||
| !Function call in filter expression|!output |
|
||||
| `[function[m1],[foo]]`|<$text text={{{[function[m1],[foo]]}}}/>|
|
||||
| `[function[p1],[foo]]`|<$text text={{{[function[p1],[foo]]}}}/>|
|
||||
| `[function[f1],[foo]]`|<$text text={{{[function[f1],[foo]]}}}/>|
|
||||
|
||||
!Namespaces
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: action-listops
|
||||
created: 20141025120850184
|
||||
modified: 20230805103548113
|
||||
modified: 20230301183438774
|
||||
myfield:
|
||||
tags: ActionWidgets Widgets
|
||||
title: ActionListopsWidget
|
||||
@@ -22,28 +22,6 @@ The ''action-listops'' widget is invisible. Any content within it is ignored.
|
||||
|$subfilter |An optional subfilter expression, which takes the list being manipulated as input, and saves the modified list back to the field/index being manipulated |
|
||||
|$tags |An optional subfilter expression, which takes the <<.field tags>> field of the target tiddler as input, and saves the modified list of tags back to the <<.field tags>> field |
|
||||
|
||||
!! Note on subfilter expressions
|
||||
|
||||
If the manipulation depends on the current contents of the list, e.g. when using the <<.olink toggle>> operator to toggle the presence of an element, the [[Filter Run]] would be prefixed with the `+` / `:and` [[filter run prefix|Filter Expression]] so that it properly receives the list as input.
|
||||
|
||||
```
|
||||
<$action-listops $subfilter="+[toggle[List Item]]"/>
|
||||
```
|
||||
|
||||
The above widget will toggle the presence of the element <<.value "List Item">> in the field <<.field list>> of the current tiddler, removing or adding the element as necessary.
|
||||
|
||||
Similarly, if an element is to always be removed when it is present, the `-` / `:except` [[filter run prefix|Filter Expression]] can be used. Both of the following yield the same result:
|
||||
|
||||
```
|
||||
<$action-listops $subfilter="-[[List Item]]"/>
|
||||
<$action-listops $subfilter="+[remove[List Item]]"/>
|
||||
```
|
||||
|
||||
Without any prefixes, the filter run output is simply [[dominantly appended|Dominant Append]] to the list.
|
||||
|
||||
See also the [[Examples|ActionListopsWidget (Examples)]].
|
||||
|
||||
|
||||
!! Using $filter or $subfilter
|
||||
|
||||
Standalone use of the `$subfilter` attribute can be replaced by using a (more complicated) `$filter` attribute value.
|
||||
@@ -125,4 +103,4 @@ Add 'abc' to 'myfield'
|
||||
The [[enlist Operator]] with `raw` suffix will enlist the list saved in <<.field myfield>> of the current tiddler without de-duplication, while e.g. the [[list Operator]] will always de-duplicate. The widget then adds the item <<.value abc>> -- whether or not it is already included in the list -- and replaces the original list in <<.field myfield>>.
|
||||
|
||||
|
||||
! [[Examples|ActionListopsWidget (Examples)]]
|
||||
! [[Examples|ActionListopsWidget (Examples)]]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: action-popup
|
||||
created: 20200303114556528
|
||||
modified: 20230731193016105
|
||||
modified: 20220815205132124
|
||||
tags: Widgets ActionWidgets
|
||||
title: ActionPopupWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -30,6 +30,6 @@ Here is an example of button that triggers the "more" button in the sidebar "Too
|
||||
<$macrocall $name='wikitext-example-without-html'
|
||||
src='<$button>
|
||||
<$action-setfield $tiddler="$:/state/tab/sidebar--595412856" $value="$:/core/ui/SideBar/Tools"/>
|
||||
<$action-popup $state="$:/state/popup/more--810643385" $coords="(0,20,0,0)"/>
|
||||
<$action-popup $state="$:/state/popup/more-2053862905" $coords="(0,20,0,0)"/>
|
||||
Click me!
|
||||
</$button>'/>
|
||||
|
||||
@@ -20,7 +20,7 @@ The content of the <<.wid genesis>> widget is used as the content of the dynamic
|
||||
|$mode |An optional override of the parsing mode. May be "inline" or "block" |
|
||||
|//{other attributes starting with $}// |Other attributes starting with a single dollar sign are reserved for future use |
|
||||
|//{attributes starting with $$}// |Attributes starting with two dollar signs are applied as attributes to the output widget, but with the attribute name changed to use a single dollar sign |
|
||||
|//{attributes not starting with $}// |Any other attributes that do not start with a dollar are applied as attributes to the output widget or HTML Element |
|
||||
|//{attributes not starting with $}// |Any other attributes that do not start with a dollar are applied as attributes to the output widget |
|
||||
|
||||
<<.from-version "5.2.6">> If the `$type` attribute is missing or blank, the <<.wlink GenesisWidget>> widget does not render an intrinsic element, instead just rendering its children.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
caption: list
|
||||
created: 20131024141900000
|
||||
modified: 20230725203601441
|
||||
modified: 20220718120325494
|
||||
tags: Widgets Lists
|
||||
title: ListWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -119,8 +119,6 @@ Displays as:
|
||||
|
||||
Note that using the `counter` attribute can reduce performance when working with list items that dynamically reorder or update themselves. The best advice is only to use it when it is really necessary: to obtain a numeric index, or to detect the first or last entries in the list.
|
||||
|
||||
Setting `counter="transclusion"` is a handy way to make child elements for each list element be identified as unique. A common use case are multiple [[tag macros|tag Macro]] for the same tag generated by a list widget. Refer to [[tag macro examples|tag Macro (Examples)]] for more details.
|
||||
|
||||
!! Edit mode
|
||||
|
||||
The `<$list>` widget can optionally render draft tiddlers through a different template to handle editing, see DraftMechanism.
|
||||
|
||||
@@ -18,11 +18,11 @@ Transclusion is the underlying mechanism for many higher level wikitext features
|
||||
Here is a complete example showing the important features of the <<.wlink TranscludeWidget>> widget:
|
||||
|
||||
```
|
||||
\procedure myproc(name,age)
|
||||
\procedure mymacro(name,age)
|
||||
My name is <<name>> and my age is <<age>>.
|
||||
\end
|
||||
|
||||
<$transclude $variable="myproc" name="James" age="19"/>
|
||||
<$transclude $variable="mymacro" name="James" age="19"/>
|
||||
```
|
||||
|
||||
* `\procedure` defines a variable as a procedure with two parameters, ''name'' and ''age''
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
created: 20230301174431218
|
||||
list: efg hlm pqr
|
||||
modified: 20230805103601224
|
||||
modified: 20230301174431218
|
||||
myfield:
|
||||
revision: 0
|
||||
tags: ActionListopsWidget
|
||||
title: ActionListopsWidget (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
@@ -48,16 +47,6 @@ Unmangle List
|
||||
|
||||
</$list>"""/>
|
||||
|
||||
---
|
||||
The following example toggles the tag <<.value Examples>> for the current tiddler.
|
||||
|
||||
<$macrocall $name='wikitext-example-without-html'
|
||||
src="""<$button>
|
||||
<$action-listops $tags="+[toggle[Examples]]"/>
|
||||
Toggle 'Examples' tag
|
||||
</$button>
|
||||
"""/>
|
||||
|
||||
---
|
||||
In this example we shall append a few tags to the 'tags' field of this tiddler (the default). We shall then remove some of the appended tags.
|
||||
|
||||
|
||||
@@ -1,23 +1,21 @@
|
||||
caption: Styles and Classes
|
||||
created: 20131205160532119
|
||||
modified: 20230726105744098
|
||||
modified: 20131205160549129
|
||||
tags: WikiText [[How to apply custom styles]]
|
||||
title: Styles and Classes in WikiText
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: Styles and Classes
|
||||
|
||||
CSS styles and classes can be applied to inline or block content wrapped in `@@double at signs@@`. Classes can be applied to certain block WikiText elements.
|
||||
Content can be wrapped in `@@`double at signs`@@` to apply specified CSS styles or classes to it. There are multiple ways to use this syntax, as presented below.
|
||||
|
||||
//Inline content// wrapped in `@@double at signs@@` without specifying style or class will be assigned the `tc-inline-style` class and displayed as highlighted text. The foreground and background colours of the highlighted text are defined as `highlight-background` and `highlight-foreground` in the current palette.
|
||||
Inline content wrapped in `@@`double at signs`@@` without specifying style or class will be assigned the `.tc-inline-style` and displayed as highlighted text. The foreground and background colours of the highlighted text are defined as `highlight-background` and `highlight-foreground` in the current palette.
|
||||
|
||||
<<wikitext-example src:"@@Highlighted text@@">>
|
||||
<<wikitext-example src:"@@some highlighted text@@">>
|
||||
|
||||
!! Styles
|
||||
Style attributes, e.g. `color`, each followed by `;` semicolon can be introduced immediately after the opening `@@`.
|
||||
|
||||
Multiple style attributes, e.g. `color`, each followed by `;` semicolon can be introduced immediately after the opening `@@`, without spaces in between.
|
||||
<<wikitext-example src:"@@color:steelblue;background-color:lightcyan;some styled text@@">>
|
||||
|
||||
<<wikitext-example src:"@@color:steelblue;background-color:lightcyan;Text with custom style@@">>
|
||||
|
||||
Similarly, styles can be applied to //block content//. Wrapping block content in `@@` without specifying style or class has no effect.
|
||||
Similarly a style can be applied to a multiline content:
|
||||
|
||||
<<wikitext-example src:"@@background-color:lightcyan;
|
||||
* Item one
|
||||
@@ -25,49 +23,18 @@ Similarly, styles can be applied to //block content//. Wrapping block content in
|
||||
@@
|
||||
">>
|
||||
|
||||
!! Classes
|
||||
A class may be applied to a multiline content only:
|
||||
|
||||
The following `coloured-text` and `coloured-bg` classes are defined in this tiddler for demonstration purposes:
|
||||
|
||||
|
||||
```
|
||||
.coloured-text {color: darkkhaki;}
|
||||
.coloured-bg {background-color: cornsilk;}
|
||||
```
|
||||
|
||||
<style>
|
||||
.coloured-text {color: darkkhaki;}
|
||||
.coloured-bg {background-color: cornsilk;}
|
||||
</style>
|
||||
|
||||
Multiple classes, each prefixed with `.`, can be introduced immediately after the opening `@@`, followed by a ` ` space. This works both for inline and block content:
|
||||
|
||||
<<wikitext-example src:"@@.coloured-text.coloured-bg Inline content with two assigned classes@@">>
|
||||
|
||||
<<wikitext-example src:"@@.coloured-bg
|
||||
* Block content
|
||||
* With one assigned class
|
||||
<<wikitext-example src:"@@.tc-double-spaced-list
|
||||
* Item one
|
||||
* Item two
|
||||
@@">>
|
||||
|
||||
Multiple classes and styles can be applied simultaneously. In case of inline content, the styles have to be defined first, followed by the classes.
|
||||
Multiple classes and styles can be used together:
|
||||
|
||||
<<wikitext-example src:"@@font-size:1.5em;.coloured-text.coloured-bg Text with custom style and classes@@">>
|
||||
|
||||
In case of block content, the styles and classes can be defined in a single line after the opening `@@` identically as for the inline content, or in separate lines, each beginning with `@@`:
|
||||
|
||||
<<wikitext-example src:"@@font-size:1.5em;
|
||||
@@.coloured-text
|
||||
@@.coloured-bg
|
||||
* Block content
|
||||
* With custom style and classes
|
||||
@@">>
|
||||
|
||||
In a similar way classes, but not styles, can be applied to those block WikiText elements that are introduced through characters on the beginning of the line. The classes prefixed with `.` are specified immediately after the special characters, followed by a ` ` space.
|
||||
|
||||
<<wikitext-example src:"!!!.coloured-bg Heading with a custom background class.
|
||||
|
||||
* Standard list element.
|
||||
*.coloured-bg List element with a custom background colour class.
|
||||
*.coloured-text List element with a custom text colour class.
|
||||
*.coloured-bg.coloured-text List element with both of the custom classes.
|
||||
">>
|
||||
<<wikitext-example src:"@@.tc-double-spaced-list
|
||||
@@width:400px;background-color:lightcyan;
|
||||
* Item one
|
||||
* Item two
|
||||
@@
|
||||
">>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20230615045239825
|
||||
modified: 20230726151053593
|
||||
modified: 20230615045312961
|
||||
tags: [[Widget Attributes]] WikiText
|
||||
title: Variable Attribute Values
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -11,7 +11,4 @@ Variable attribute values are indicated with double angle brackets around a [[ma
|
||||
...
|
||||
</div>
|
||||
```
|
||||
|
||||
The behaviour of variables invoked via widget attributes is not the same as when they are [[invoked via normal wikitext|Behaviour of variables invoked via normal wikitext]]. In addition, the behaviour depends on how the variable is declared:
|
||||
|
||||
{{Behaviour of variables invoked via widget attributes}}
|
||||
<<.warning "The text from the definition of the macro will be retrieved and text substitution will be performed (i.e. <<.param $param$>> and <<.param $(...)$>> syntax). The value of the attribute value will be the resulting text. Any wiki syntax in that text (including further macro calls and variable references) will be left as-is.">>
|
||||
@@ -1,10 +1,10 @@
|
||||
created: 20230615045526689
|
||||
modified: 20230731210638956
|
||||
modified: 20230615060059476
|
||||
tags: WikiText
|
||||
title: Widget Attributes
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
Attributes of [[HTML elements|HTML in WikiText]] and widgets can be specified in several different ways:
|
||||
Attributes of HTML elements and widgets can be specified in several different ways:
|
||||
|
||||
* [[a literal string|Literal Attribute Values]]
|
||||
* [[a transclusion of a textReference|Transcluded Attribute Values]]
|
||||
@@ -19,8 +19,3 @@ Attributes of [[HTML elements|HTML in WikiText]] and widgets can be specified in
|
||||
|filtered |triple curly braces around a filter expression|
|
||||
|substituted|single or triple backticks around the text to be processed for substitutions|
|
||||
|
||||
|
||||
<$list filter="[[Literal Attribute Values]] [[Transcluded Attribute Values]] [[Variable Attribute Values]] [[Filtered Attribute Values]] [[Substituted Attribute Values]]">
|
||||
<$link><h1><$text text=<<currentTiddler>>/></h1></$link>
|
||||
<$transclude mode="block"/>
|
||||
</$list>
|
||||
|
||||
@@ -20,7 +20,6 @@ Note that widgets inherit all the features of [[HTML in WikiText]]:
|
||||
** Macro invocations (eg `attr=<<myMacro>>`)
|
||||
** Transclusions (eg, `attr={{MyTiddler!!field}}`)
|
||||
** Filtered transclusions (eg, `attr={{{ [filter[op]] }}}`)
|
||||
** <<.from-version "5.3.0">> [[Substituted Attribute Values]]
|
||||
* The content of a widget is [[parsed|WikiText Parser Modes]] in [[inline mode|Inline Mode WikiText]] unless the opening tag is followed by two linebreaks, which forces [[block mode|Block Mode WikiText]]
|
||||
** [[inline mode|Inline Mode WikiText]] means that [[block mode|Block Mode WikiText]] parse rules like headings, tables and lists are not recognised
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
"tiddlywiki/railroad",
|
||||
"tiddlywiki/evernote",
|
||||
"tiddlywiki/internals",
|
||||
"tiddlywiki/menubar",
|
||||
"tiddlywiki/qrcode"
|
||||
"tiddlywiki/menubar"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
@@ -50,7 +49,7 @@
|
||||
"static": [
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"],
|
||||
"external-js": [
|
||||
"--render","$:/core/save/offline-external-js","[[external-]addsuffix<version>addsuffix[.html]]","text/plain",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
title: $:/language/Help/server
|
||||
description: (已弃用:请参阅 'listen' 命令)提供一个 HTTP 服务器界面到 TiddlyWiki
|
||||
description: 提供一个 HTTP 服务器界面到 TiddlyWiki (已弃用,支持新的 listen 命令)
|
||||
|
||||
在服务器中内置 TiddlyWiki5 是非常简单。虽与 TiddlyWeb 兼容,但不支持许多健全互联网面向的使用方式所需的功能。
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
title: $:/language/Help/server
|
||||
description: (已棄用:請參閱 'listen' 命令)提供一個 HTTP 伺服器介面到 TiddlyWiki
|
||||
description: 提供一個 HTTP 伺服器介面到 TiddlyWiki (已棄用,支持新的 listen 命令)
|
||||
|
||||
在伺服器中內建 TiddlyWiki5 是非常簡單。雖與 TiddlyWeb 相容,但不支援許多健全網際網路面向的使用方式所需的功能。
|
||||
|
||||
|
||||
@@ -538,14 +538,4 @@ WhiteFall, @Zacharia2, 2023/06/04
|
||||
|
||||
@oeyoews, 2023/06/30
|
||||
|
||||
Eric Haberstroh, @pille1842, 2023/07/23
|
||||
|
||||
@lilscribby, 2023-07-24
|
||||
|
||||
@TiddlyTweeter, 2023/07/25
|
||||
|
||||
@catter-fly, 2023/07/27
|
||||
|
||||
@cmo-pomerium, 2023/08/03
|
||||
|
||||
BuckarooBanzay, @BuckarooBanzay, 2023/09/01
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tiddlywiki",
|
||||
"preferGlobal": "true",
|
||||
"version": "5.3.2-prerelease",
|
||||
"version": "5.3.1-prerelease",
|
||||
"author": "Jeremy Ruston <jeremy@jermolene.com>",
|
||||
"description": "a non-linear personal web notebook",
|
||||
"contributors": [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
title: $:/plugins/tiddlywiki/qrcode/make/MakeContactQR
|
||||
title: $:/plugins/tiddlywiki/qrcode/MakeContactQR
|
||||
tags: $:/tags/MakeQR
|
||||
caption: Contact
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
title: $:/plugins/tiddlywiki/qrcode/make/MakeGenericQR
|
||||
title: $:/plugins/tiddlywiki/qrcode/MakeGenericQR
|
||||
tags: $:/tags/MakeQR
|
||||
caption: Generic
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
title: $:/plugins/tiddlywiki/qrcode/make/MakeWifiQR
|
||||
title: $:/plugins/tiddlywiki/qrcode/MakeWifiQR
|
||||
tags: $:/tags/MakeQR
|
||||
caption: Wifi
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
/*\
|
||||
title: $:/plugins/tiddlywiki/qrcode/barcodereader.js
|
||||
type: application/javascript
|
||||
module-type: widget
|
||||
|
||||
barcodereader widget for reading barcodes
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
var Widget = require("$:/core/modules/widgets/widget.js").widget;
|
||||
|
||||
var nextID = 0;
|
||||
|
||||
var BarCodeReaderWidget = function(parseTreeNode,options) {
|
||||
this.initialise(parseTreeNode,options);
|
||||
};
|
||||
|
||||
/*
|
||||
Inherit from the base widget class
|
||||
*/
|
||||
BarCodeReaderWidget.prototype = new Widget();
|
||||
|
||||
/*
|
||||
Render this widget into the DOM
|
||||
*/
|
||||
BarCodeReaderWidget.prototype.render = function(parent,nextSibling) {
|
||||
var self = this;
|
||||
this.parentDomNode = parent;
|
||||
this.computeAttributes();
|
||||
// Make the child widgets
|
||||
this.makeChildWidgets();
|
||||
// Generate an ID for this element
|
||||
var id = "capture-widget-internal-" + nextID;
|
||||
nextID += 1;
|
||||
// Create the DOM node and render children
|
||||
var domNode = this.document.createElement("div");
|
||||
domNode.className = "tc-readcode-widget";
|
||||
domNode.setAttribute("width","300px");
|
||||
domNode.setAttribute("height","300px");
|
||||
domNode.id = id;
|
||||
parent.insertBefore(domNode,nextSibling);
|
||||
this.renderChildren(domNode,null);
|
||||
this.domNodes.push(domNode);
|
||||
// Setup the qrcode library
|
||||
if($tw.browser) {
|
||||
var __Html5QrcodeLibrary__ = require("$:/plugins/tiddlywiki/qrcode/html5-qrcode/html5-qrcode.js").__Html5QrcodeLibrary__;
|
||||
function onScanSuccess(decodedText, decodedResult) {
|
||||
self.invokeActionString(self.getAttribute("actionsSuccess",""),self,{},{
|
||||
format: decodedResult.result.format.formatName,
|
||||
text: decodedText
|
||||
});
|
||||
console.log("Scan result",decodedResult,decodedText);
|
||||
}
|
||||
function onScanFailure(errorMessage) {
|
||||
self.invokeActionString(self.getAttribute("actionsFailure",""),self,{},{
|
||||
error: errorMessage
|
||||
});
|
||||
console.log("Scan error",errorMessage);
|
||||
}
|
||||
var html5QrcodeScanner = new __Html5QrcodeLibrary__.Html5QrcodeScanner(
|
||||
id,
|
||||
{
|
||||
fps: 10,
|
||||
qrbox: 250
|
||||
}
|
||||
);
|
||||
html5QrcodeScanner.render(onScanSuccess,onScanFailure);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
|
||||
*/
|
||||
BarCodeReaderWidget.prototype.refresh = function(changedTiddlers) {
|
||||
var changedAttributes = this.computeAttributes(),
|
||||
hasChangedAttributes = $tw.utils.count(changedAttributes) > 0;
|
||||
if(hasChangedAttributes) {
|
||||
return this.refreshSelf();
|
||||
}
|
||||
return this.refreshChildren(changedTiddlers) || hasChangedAttributes;
|
||||
};
|
||||
|
||||
exports.barcodereader = BarCodeReaderWidget;
|
||||
|
||||
})();
|
||||
3
plugins/tiddlywiki/qrcode/doc/examples.tid
Normal file
3
plugins/tiddlywiki/qrcode/doc/examples.tid
Normal file
@@ -0,0 +1,3 @@
|
||||
title: $:/plugins/tiddlywiki/qrcode/examples
|
||||
|
||||
<<tabs "[all[shadows+tiddlers]tag[$:/tags/MakeQR]!has[draft.of]]" "$:/plugins/tiddlywiki/qrcode/MakeGenericQR">>
|
||||
13
plugins/tiddlywiki/qrcode/doc/readme.tid
Normal file
13
plugins/tiddlywiki/qrcode/doc/readme.tid
Normal file
@@ -0,0 +1,13 @@
|
||||
title: $:/plugins/tiddlywiki/qrcode/readme
|
||||
|
||||
The QR code plugin provides a macro that enables any text to be rendered as a [[QR code|https://en.wikipedia.org/wiki/QR_code]]. QR codes are a type of 2-dimensional bar code that encodes arbitrary data: text, numbers, links. QR code readers are available or built-in for smartphones, making them a convenient means to transfer information between devices
|
||||
|
||||
The QR code plugin adds the following features to TiddlyWiki:
|
||||
|
||||
* A new [[makeqr Macro]] that renders specified text as a QR code image that can be displayed or printed
|
||||
* A new toolbar button that can display several QR code renderings of the content of a tiddler:
|
||||
** Raw content
|
||||
** Rendered, formatted content
|
||||
** URL of tiddler
|
||||
|
||||
The QR code plugin is based on the library [[qrcode.js by Zeno Zeng|https://github.com/zenozeng/node-yaqrcode]].
|
||||
@@ -1,8 +1,8 @@
|
||||
title: $:/plugins/tiddlywiki/qrcode/docs/qrcode
|
||||
tags: $:/tags/QRCodeDocs
|
||||
caption: makeqr Macro
|
||||
title: $:/plugins/tiddlywiki/qrcode/usage
|
||||
|
||||
The ''makeqr'' [[macro|Macros]] converts text data into an image of the corresponding QR code. The image is returned as [[base64-encoded data URI|https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs]].
|
||||
! `makeqr` Macro
|
||||
|
||||
The <<.def makeqr>> [[macro|Macros]] converts text data into an image of the corresponding QR code. The image is returned as [[base64-encoded data URI|https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs]].
|
||||
|
||||
!! Parameters
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/qrcode/docs
|
||||
|
||||
<<tabs "[all[shadows+tiddlers]tag[$:/tags/QRCodeDocs]!has[draft.of]]" "$:/plugins/tiddlywiki/qrcode/docs/barcodereader">>
|
||||
@@ -1,44 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/qrcode/docs/barcodereader
|
||||
tags: $:/tags/QRCodeDocs
|
||||
caption: barcodereader Widget
|
||||
|
||||
The `<$barcodereader>` widget allows barcodes to be read from the device camera or from an image file. In the case of the camera, a live preview feed is shown to allow the barcode to be framed.
|
||||
|
||||
Note that for security reasons browsers restrict the operation of the camera to only work with web pages that have been loaded via HTTPS, or via localhost. Safari and Firefox allow usage from a file URI, but Chrome crashes when attempting to use the barcode reader from a file URI.
|
||||
|
||||
The `<$barcodereader>` widget has the following attributes:
|
||||
|
||||
|!Name |!Description |
|
||||
|actionsSuccess |Action string to be executed when a code is successfully decoded |
|
||||
|actionsFailure |Action string to be executed in the event of an error |
|
||||
|
||||
The following variables are passed to the ''actionsSuccess'' handler:
|
||||
|
||||
|!Name |!Description |
|
||||
|format |Barcode format (see below) |
|
||||
|text |Decoded text |
|
||||
|
||||
The following barcode formats are supported:
|
||||
|
||||
* 0: "QR_CODE"
|
||||
* 1: "AZTEC"
|
||||
* 2: "CODABAR"
|
||||
* 3: "CODE_39"
|
||||
* 4: "CODE_93"
|
||||
* 5: "CODE_128"
|
||||
* 6: "DATA_MATRIX"
|
||||
* 7: "MAXICODE"
|
||||
* 8: "ITF"
|
||||
* 9: "EAN_13"
|
||||
* 10: "EAN_8"
|
||||
* 11: "PDF_417"
|
||||
* 12: "RSS_14"
|
||||
* 13: "RSS_EXPANDED"
|
||||
* 14: "UPC_A"
|
||||
* 15: "UPC_E"
|
||||
* 16: "UPC_EAN_EXTENSION"
|
||||
|
||||
The following variables are passed to the ''actionsFailure'' handler:
|
||||
|
||||
|!Name |!Description |
|
||||
|error |Error message |
|
||||
@@ -1,3 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/qrcode/examples
|
||||
|
||||
<<tabs "[all[shadows+tiddlers]tag[$:/tags/QRCodeExample]!has[draft.of]]" "$:/plugins/tiddlywiki/qrcode/examples/read">>
|
||||
@@ -1,5 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/qrcode/examples/make
|
||||
tags: $:/tags/QRCodeExample
|
||||
caption: Making Barcodes
|
||||
|
||||
<<tabs "[all[shadows+tiddlers]tag[$:/tags/MakeQR]!has[draft.of]]" "$:/plugins/tiddlywiki/qrcode/make/MakeGenericQR">>
|
||||
@@ -1,17 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/qrcode/examples/read/BarCodeReader
|
||||
tags: $:/tags/ReadQR
|
||||
caption: Barcode Reader
|
||||
|
||||
\procedure success()
|
||||
<$action-setfield $tiddler="$:/state/BarCodeReaderDemoStatus" text=<<text>> result=<<format>> success="yes"/>
|
||||
\end
|
||||
|
||||
\procedure failure()
|
||||
<$action-setfield $tiddler="$:/state/BarCodeReaderDemoStatus" text=<<error>> success="no"/>
|
||||
\end
|
||||
|
||||
Scanning status: {{$:/state/BarCodeReaderDemoStatus}}
|
||||
|
||||
{{$:/state/BarCodeReaderDemoStatus||$:/core/ui/TiddlerFields}}
|
||||
|
||||
<$barcodereader actionsSuccess=<<success>> actionsFail=<<failure>>/>
|
||||
@@ -1,5 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/qrcode/examples/read
|
||||
tags: $:/tags/QRCodeExample
|
||||
caption: Reading Barcodes
|
||||
|
||||
<<tabs "[all[shadows+tiddlers]tag[$:/tags/ReadQR]!has[draft.of]]" "$:/plugins/tiddlywiki/qrcode/examples/read/BarCodeReader">>
|
||||
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [2020] [MINHAZ <minhazav@gmail.com>]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,398 +0,0 @@
|
||||
# Html5-QRCode
|
||||
|
||||
## Lightweight & cross platform QR Code and Bar code scanning library for the web
|
||||
|
||||
Use this lightweight library to easily / quickly integrate QR code, bar code, and other common code scanning capabilities to your web application.
|
||||
|
||||
## Key highlights
|
||||
- 🔲 Support scanning [different types of bar codes and QR codes](#supported-code-formats).
|
||||
|
||||
- 🖥 Supports [different platforms](#supported-platforms) be it Android, IOS, MacOs, Windows or Linux
|
||||
|
||||
- 🌐 Supports [different browsers](#supported-platforms) like Chrome, Firefox, Safari, Edge, Opera ...
|
||||
|
||||
- 📷 Supports scanning with camera as well as local files
|
||||
|
||||
- ➡️ Comes with an [end to end library with UI](#easy-mode---with-end-to-end-scanner-user-interface) as well as a [low level library to build your own UI with](#pro-mode---if-you-want-to-implement-your-own-user-interface).
|
||||
|
||||
- 🔦 Supports customisations like [flash/torch support](#showtorchbuttonifsupported---boolean--undefined), zooming etc.
|
||||
|
||||
|
||||
Supports two kinds of APIs
|
||||
|
||||
- `Html5QrcodeScanner` — End-to-end scanner with UI, integrate with less than ten lines of code.
|
||||
|
||||
- `Html5Qrcode` — Powerful set of APIs you can use to build your UI without worrying about camera setup, handling permissions, reading codes, etc.
|
||||
|
||||
> Support for scanning local files on the device is a new addition and helpful for the web browser which does not support inline web-camera access in smartphones. **Note:** This doesn't upload files to any server — everything is done locally.
|
||||
|
||||
[](https://dl.circleci.com/status-badge/redirect/gh/mebjas/html5-qrcode/tree/master) [](https://github.com/mebjas/html5-qrcode/issues) [](https://github.com/mebjas/html5-qrcode/releases)  [](https://www.codacy.com/gh/mebjas/html5-qrcode/dashboard?utm_source=github.com&utm_medium=referral&utm_content=mebjas/html5-qrcode&utm_campaign=Badge_Grade) [](https://gitter.im/html5-qrcode/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
|
||||
 [](https://www.npmjs.com/package/html5-qrcode) [](https://bit.ly/3CZiASv)
|
||||
|
||||
| <img src="https://scanapp.org/assets/github_assets/pixel6pro-optimised.gif" width="180px" /> | <img src="https://scanapp.org/assets/github_assets/pixel4_barcode_480.gif" width="180px" />|
|
||||
| -- | -- |
|
||||
| _Demo at [scanapp.org](https://scanapp.org)_ | _Demo at [qrcode.minhazav.dev](https://qrcode.minhazav.dev) - **Scanning different types of codes**_ |
|
||||
|
||||
## We need your help!
|
||||
|
||||

|
||||
Help incentivise feature development, bug fixing by supporting the sponsorhip goals of this project. See [list of sponsered feature requests here](https://github.com/mebjas/html5-qrcode/wiki/Feature-request-sponsorship-goals#feature-requests).
|
||||
|
||||
[](https://ko-fi.com/L3L84G0C8)
|
||||
|
||||
## Documentation
|
||||
|
||||
The documentation for this project has been moved to [scanapp.org/html5-qrcode-docs](https://scanapp.org/html5-qrcode-docs/).
|
||||
|
||||
- [Getting started](https://scanapp.org/html5-qrcode-docs/docs/intro)
|
||||
- [Supported frameworks](https://scanapp.org/html5-qrcode-docs/docs/supported_frameworks)
|
||||
- [Supported 1D and 2D Code formats](https://scanapp.org/html5-qrcode-docs/docs/supported_code_formats)
|
||||
- [Detailed API documentation](https://scanapp.org/html5-qrcode-docs/docs/apis)
|
||||
|
||||
## Supported platforms
|
||||
|
||||
We are working continuously on adding support for more and more platforms. If you find a platform or a browser where the library is not working, please feel free to file an issue. Check the [demo link](https://blog.minhazav.dev/research/html5-qrcode.html) to test it out.
|
||||
|
||||
**Legends**
|
||||
-  Means full support — inline webcam and file based
|
||||
-  Means partial support — only file based, webcam in progress
|
||||
|
||||
### PC / Mac
|
||||
|
||||
| <img src="https://scanapp.org/assets/github_assets/browsers/firefox_48x48.png" alt="Firefox" width="24px" height="24px" /><br/>Firefox | <img src="https://scanapp.org/assets/github_assets/browsers/chrome_48x48.png" alt="Chrome" width="24px" height="24px" /><br/>Chrome | <img src="https://scanapp.org/assets/github_assets/browsers/safari_48x48.png" alt="Safari" width="24px" height="24px" /><br/>Safari | <img src="https://scanapp.org/assets/github_assets/browsers/opera_48x48.png" alt="Opera" width="24px" height="24px" /><br/>Opera | <img src="https://scanapp.org/assets/github_assets/browsers/edge_48x48.png" alt="Edge" width="24px" height="24px" /><br/> Edge
|
||||
| --------- | --------- | --------- | --------- | ------- |
|
||||
|| | |  | 
|
||||
|
||||
### Android
|
||||
|
||||
| <img src="https://scanapp.org/assets/github_assets/browsers/chrome_48x48.png" alt="Chrome" width="24px" height="24px" /><br/>Chrome | <img src="https://scanapp.org/assets/github_assets/browsers/firefox_48x48.png" alt="Firefox" width="24px" height="24px" /><br/>Firefox | <img src="https://scanapp.org/assets/github_assets/browsers/edge_48x48.png" alt="Edge" width="24px" height="24px" /><br/> Edge | <img src="https://scanapp.org/assets/github_assets/browsers/opera_48x48.png" alt="Opera" width="24px" height="24px" /><br/>Opera | <img src="https://scanapp.org/assets/github_assets/browsers/opera-mini_48x48.png" alt="Opera-Mini" width="24px" height="24px" /><br/> Opera Mini | <img src="https://scanapp.org/assets/github_assets/browsers/uc_48x48.png" alt="UC" width="24px" height="24px" /> <br/> UC
|
||||
| --------- | --------- | --------- | --------- | --------- | --------- |
|
||||
|| | | |  | 
|
||||
|
||||
### IOS
|
||||
|
||||
| <img src="https://scanapp.org/assets/github_assets/browsers/safari_48x48.png" alt="Safari" width="24px" height="24px" /><br/>Safari | <img src="https://scanapp.org/assets/github_assets/browsers/chrome_48x48.png" alt="Chrome" width="24px" height="24px" /><br/>Chrome | <img src="https://scanapp.org/assets/github_assets/browsers/firefox_48x48.png" alt="Firefox" width="24px" height="24px" /><br/>Firefox | <img src="https://scanapp.org/assets/github_assets/browsers/edge_48x48.png" alt="Edge" width="24px" height="24px" /><br/> Edge
|
||||
| --------- | --------- | --------- | --------- |
|
||||
|| * | * | 
|
||||
|
||||
|
||||
> \* Supported for IOS versions >= 15.1
|
||||
>
|
||||
> Before version 15.1, Webkit for IOS is used by Chrome, Firefox, and other browsers in IOS and they do not have webcam permissions yet. There is an ongoing issue on fixing the support for iOS - [issue/14](https://github.com/mebjas/html5-qrcode/issues/14)
|
||||
|
||||
### Framework support
|
||||
The library can be easily used with several other frameworks, I have been adding examples for a few of them and would continue to add more.
|
||||
|
||||
|<img src="https://scanapp.org/assets/github_assets/html5.png" width="30px" />| <img src="https://scanapp.org/assets/github_assets/vuejs.png" width="30px" />|<img src="https://scanapp.org/assets/github_assets/electron.png" width="30px" /> | <img src="https://scanapp.org/assets/github_assets/react.svg" width="30px" /> | <img src="https://seeklogo.com/images/L/lit-logo-6B43868CDC-seeklogo.com.png" width="30px" />
|
||||
| -------- | -------- | -------- | -------- | -------- |
|
||||
| [Html5](./examples/html5) | [VueJs](./examples/vuejs) | [ElectronJs](./examples/electron) | [React](https://github.com/scanapp-org/html5-qrcode-react) | [Lit](./examples/lit)
|
||||
|
||||
### Supported Code formats
|
||||
Code scanning is dependent on [Zxing-js](https://github.com/zxing-js/library) library. We will be working on top of it to add support for more types of code scanning. If you feel a certain type of code would be helpful to have, please file a feature request.
|
||||
|
||||
| Code | Example |
|
||||
| ---- | ----- |
|
||||
| QR Code | <img src="https://scanapp.org/assets/github_assets/qr-code.png" width="200px" /> |
|
||||
| AZTEC | <img src="https://scanapp.org/assets/github_assets/aztec.png" /> |
|
||||
| CODE_39| <img src="https://scanapp.org/assets/github_assets/code_39.gif" /> |
|
||||
| CODE_93| <img src="https://scanapp.org/assets/github_assets/code_93.gif" />|
|
||||
| CODE_128| <img src="https://scanapp.org/assets/github_assets/code_128.gif" />|
|
||||
| ITF| <img src="https://scanapp.org/assets/github_assets/itf.png" />|
|
||||
| EAN_13|<img src="https://scanapp.org/assets/github_assets/ean13.jpeg" /> |
|
||||
| EAN_8| <img src="https://scanapp.org/assets/github_assets/ean8.jpeg" />|
|
||||
| PDF_417| <img src="https://scanapp.org/assets/github_assets/pdf417.png" />|
|
||||
| UPC_A| <img src="https://scanapp.org/assets/github_assets/upca.jpeg" />|
|
||||
| UPC_E| <img src="https://scanapp.org/assets/github_assets/upce.jpeg" />|
|
||||
| DATA_MATRIX|<img src="https://scanapp.org/assets/github_assets/datamatrix.png" /> |
|
||||
| MAXICODE*| <img src="https://scanapp.org/assets/github_assets/maxicode.gif" /> |
|
||||
| RSS_14*| <img src="https://scanapp.org/assets/github_assets/rss14.gif" />|
|
||||
| RSS_EXPANDED*|<img src="https://scanapp.org/assets/github_assets/rssexpanded.gif" /> |
|
||||
|
||||
> *Formats are not supported by our experimental integration with native
|
||||
> BarcodeDetector API integration ([Read more](/experimental.md)).
|
||||
|
||||
## Description - [View Demo](https://blog.minhazav.dev/research/html5-qrcode.html)
|
||||
|
||||
> See an end to end scanner experience at [scanapp.org](https://scanapp.org).
|
||||
|
||||
This is a cross-platform JavaScript library to integrate QR code, bar codes & a few other types of code scanning capabilities to your applications running on HTML5 compatible browser.
|
||||
|
||||
Supports:
|
||||
- Querying camera on the device (with user permissions)
|
||||
- Rendering live camera feed, with easy to use user interface for scanning
|
||||
- Supports scanning a different kind of QR codes, bar codes and other formats
|
||||
- Supports selecting image files from the device for scanning codes
|
||||
|
||||
## How to use
|
||||
|
||||
Find detailed guidelines on how to use this library on [scanapp.org/html5-qrcode-docs](https://scanapp.org/html5-qrcode-docs/docs/intro).
|
||||
|
||||
## Demo
|
||||
<img src="https://scanapp.org/assets/github_assets/qr-code.png" width="200px"><br />
|
||||
_Scan this image or visit [blog.minhazav.dev/research/html5-qrcode.html](https://blog.minhazav.dev/research/html5-qrcode.html)_
|
||||
|
||||
### For more information
|
||||
Check these articles on how to use this library:
|
||||
<!-- TODO(mebjas) Mirgate this link to blog.minhazav.dev -->
|
||||
- [QR and barcode scanner using HTML and JavaScript](https://minhazav.medium.com/qr-and-barcode-scanner-using-html-and-javascript-2cdc937f793d)
|
||||
- [HTML5 QR Code scanning — launched v1.0.1 without jQuery dependency and refactored Promise based APIs](https://blog.minhazav.dev/HTML5-QR-Code-scanning-launched-v1.0.1/).
|
||||
- [HTML5 QR Code scanning with JavaScript — Support for scanning the local file and using default camera added (v1.0.5)](https://blog.minhazav.dev/HTML5-QR-Code-scanning-support-for-local-file-and-default-camera/)
|
||||
|
||||
## Screenshots
|
||||
<br />
|
||||
_Figure: Screenshot from Google Chrome running on MacBook Pro_
|
||||
|
||||
## Documentation
|
||||
Find the full API documentation at [scanapp.org/html5-qrcode-docs/docs/apis](https://scanapp.org/html5-qrcode-docs/docs/apis).
|
||||
|
||||
### Extra optional `configuration` in `start()` method
|
||||
Configuration object that can be used to configure both the scanning behavior and the user interface (UI). Most of the fields have default properties that will be used unless a different value is provided. If you do not want to override anything, you can just pass in an empty object `{}`.
|
||||
|
||||
#### `fps` — Integer, Example = 10
|
||||
A.K.A frame per second, the default value for this is 2, but it can be increased to get faster scanning. Increasing too high value could affect performance. Value `>1000` will simply fail.
|
||||
|
||||
#### `qrbox` — `QrDimensions` or `QrDimensionFunction` (Optional), Example = `{ width: 250, height: 250 }`
|
||||
Use this property to limit the region of the viewfinder you want to use for scanning. The rest of the viewfinder would be shaded. For example, by passing config `{ qrbox : { width: 250, height: 250 } }`, the screen will look like:
|
||||
|
||||
<img src="https://scanapp.org/assets/github_assets/screen.gif" />
|
||||
|
||||
This can be used to set a rectangular scanning area with config like:
|
||||
|
||||
```js
|
||||
let config = { qrbox : { width: 400, height: 150 } }
|
||||
```
|
||||
|
||||
This config also accepts a function of type
|
||||
```ts
|
||||
/**
|
||||
* A function that takes in the width and height of the video stream
|
||||
* and returns QrDimensions.
|
||||
*
|
||||
* Viewfinder refers to the video showing camera stream.
|
||||
*/
|
||||
type QrDimensionFunction =
|
||||
(viewfinderWidth: number, viewfinderHeight: number) => QrDimensions;
|
||||
```
|
||||
|
||||
This allows you to set dynamic QR box dimensions based on the video dimensions. See this blog article for example: [Setting dynamic QR box size in Html5-qrcode - ScanApp blog](https://scanapp.org/blog/2022/01/09/setting-dynamic-qr-box-size-in-html5-qrcode.html)
|
||||
|
||||
> This might be desirable for bar code scanning.
|
||||
|
||||
If this value is not set, no shaded QR box will be rendered and the scanner will scan the entire area of video stream.
|
||||
|
||||
#### `aspectRatio` — Float, Example 1.777778 for 16:9 aspect ratio
|
||||
Use this property to render the video feed in a certain aspect ratio. Passing a nonstandard aspect ratio like `100000:1` could lead to the video feed not even showing up. Ideal values can be:
|
||||
| Value | Aspect Ratio | Use Case |
|
||||
| ----- | ------------ | -------- |
|
||||
|1.333334 | 4:3 | Standard camera aspect ratio |
|
||||
|1.777778 | 16:9 | Full screen, cinematic |
|
||||
|1.0 | 1:1 | Square view |
|
||||
|
||||
If you do not pass any value, the whole viewfinder would be used for scanning.
|
||||
**Note**: this value has to be smaller than the width and height of the `QR code HTML element`.
|
||||
|
||||
#### `disableFlip` — Boolean (Optional), default = false
|
||||
By default, the scanner can scan for horizontally flipped QR Codes. This also enables scanning QR code using the front camera on mobile devices which are sometimes mirrored. This is `false` by default and I recommend changing this only if:
|
||||
- You are sure that the camera feed cannot be mirrored (Horizontally flipped)
|
||||
- You are facing performance issues with this enabled.
|
||||
|
||||
Here's an example of a normal and mirrored QR Code
|
||||
| Normal QR Code | Mirrored QR Code |
|
||||
| ----- | ---- |
|
||||
| <img src="https://scanapp.org/assets/github_assets/qr-code.png" width="200px" /> | <img src="https://scanapp.org/assets/github_assets/qr-code-flipped.png" width="200px" /><br /> |
|
||||
|
||||
#### `rememberLastUsedCamera` — Boolean (Optional), default = true
|
||||
If `true` the last camera used by the user and weather or not permission was granted would be remembered in the local storage. If the user has previously granted permissions — the request permission option in the UI will be skipped and the last selected camera would be launched automatically for scanning.
|
||||
|
||||
If `true` the library shall remember if the camera permissions were previously
|
||||
granted and what camera was last used. If the permissions is already granted for
|
||||
"camera", QR code scanning will automatically * start for previously used camera.
|
||||
|
||||
#### `supportedScanTypes` - `Array<Html5QrcodeScanType> | []`
|
||||
> This is only supported for `Html5QrcodeScanner`.
|
||||
|
||||
Default = `[Html5QrcodeScanType.SCAN_TYPE_CAMERA, Html5QrcodeScanType.SCAN_TYPE_FILE]`
|
||||
|
||||
This field can be used to:
|
||||
- Limit support to either of `Camera` or `File` based scan.
|
||||
- Change default scan type.
|
||||
|
||||
How to use:
|
||||
|
||||
```js
|
||||
function onScanSuccess(decodedText, decodedResult) {
|
||||
// handle the scanned code as you like, for example:
|
||||
console.log(`Code matched = ${decodedText}`, decodedResult);
|
||||
}
|
||||
|
||||
let config = {
|
||||
fps: 10,
|
||||
qrbox: {width: 100, height: 100},
|
||||
rememberLastUsedCamera: true,
|
||||
// Only support camera scan type.
|
||||
supportedScanTypes: [Html5QrcodeScanType.SCAN_TYPE_CAMERA]
|
||||
};
|
||||
|
||||
let html5QrcodeScanner = new Html5QrcodeScanner(
|
||||
"reader", config, /* verbose= */ false);
|
||||
html5QrcodeScanner.render(onScanSuccess);
|
||||
```
|
||||
|
||||
For file based scan only choose:
|
||||
```js
|
||||
supportedScanTypes: [Html5QrcodeScanType.SCAN_TYPE_FILE]
|
||||
```
|
||||
|
||||
For supporting both as it is today, you can ignore this field or set as:
|
||||
```js
|
||||
supportedScanTypes: [
|
||||
Html5QrcodeScanType.SCAN_TYPE_CAMERA,
|
||||
Html5QrcodeScanType.SCAN_TYPE_FILE]
|
||||
```
|
||||
|
||||
To set the file based scan as defult change the order:
|
||||
```js
|
||||
supportedScanTypes: [
|
||||
Html5QrcodeScanType.SCAN_TYPE_FILE,
|
||||
Html5QrcodeScanType.SCAN_TYPE_CAMERA]
|
||||
```
|
||||
|
||||
#### `showTorchButtonIfSupported` - `boolean | undefined`
|
||||
> This is only supported for `Html5QrcodeScanner`.
|
||||
|
||||
If `true` the rendered UI will have button to turn flash on or off based on device + browser support. The value is `false` by default.
|
||||
|
||||
### Scanning only specific formats
|
||||
By default, both camera stream and image files are scanned against all the
|
||||
supported code formats. Both `Html5QrcodeScanner` and `Html5Qrcode` classes can
|
||||
be configured to only support a subset of supported formats. Supported formats
|
||||
are defined in
|
||||
[enum Html5QrcodeSupportedFormats](https://github.com/mebjas/html5-qrcode/blob/master/src/core.ts#L14).
|
||||
|
||||
```ts
|
||||
enum Html5QrcodeSupportedFormats {
|
||||
QR_CODE = 0,
|
||||
AZTEC,
|
||||
CODABAR,
|
||||
CODE_39,
|
||||
CODE_93,
|
||||
CODE_128,
|
||||
DATA_MATRIX,
|
||||
MAXICODE,
|
||||
ITF,
|
||||
EAN_13,
|
||||
EAN_8,
|
||||
PDF_417,
|
||||
RSS_14,
|
||||
RSS_EXPANDED,
|
||||
UPC_A,
|
||||
UPC_E,
|
||||
UPC_EAN_EXTENSION,
|
||||
}
|
||||
```
|
||||
|
||||
I recommend using this only if you need to explicitly omit support for certain
|
||||
formats or want to reduce the number of scans done per second for performance
|
||||
reasons.
|
||||
|
||||
#### Scanning only QR code with `Html5Qrcode`
|
||||
```js
|
||||
const html5QrCode = new Html5Qrcode(
|
||||
"reader", { formatsToSupport: [ Html5QrcodeSupportedFormats.QR_CODE ] });
|
||||
const qrCodeSuccessCallback = (decodedText, decodedResult) => {
|
||||
/* handle success */
|
||||
};
|
||||
const config = { fps: 10, qrbox: { width: 250, height: 250 } };
|
||||
|
||||
// If you want to prefer front camera
|
||||
html5QrCode.start({ facingMode: "user" }, config, qrCodeSuccessCallback);
|
||||
```
|
||||
|
||||
#### Scanning only QR code and UPC codes with `Html5QrcodeScanner`
|
||||
```js
|
||||
function onScanSuccess(decodedText, decodedResult) {
|
||||
// Handle the scanned code as you like, for example:
|
||||
console.log(`Code matched = ${decodedText}`, decodedResult);
|
||||
}
|
||||
|
||||
const formatsToSupport = [
|
||||
Html5QrcodeSupportedFormats.QR_CODE,
|
||||
Html5QrcodeSupportedFormats.UPC_A,
|
||||
Html5QrcodeSupportedFormats.UPC_E,
|
||||
Html5QrcodeSupportedFormats.UPC_EAN_EXTENSION,
|
||||
];
|
||||
const html5QrcodeScanner = new Html5QrcodeScanner(
|
||||
"reader",
|
||||
{
|
||||
fps: 10,
|
||||
qrbox: { width: 250, height: 250 },
|
||||
formatsToSupport: formatsToSupport
|
||||
},
|
||||
/* verbose= */ false);
|
||||
html5QrcodeScanner.render(onScanSuccess);
|
||||
```
|
||||
|
||||
## Experimental features
|
||||
The library now supports some experimental features which are supported in the
|
||||
library but not recommended for production usage either due to limited testing
|
||||
done or limited compatibility for underlying APIs used. Read more about it [here](/experimental.md).
|
||||
Some experimental features include:
|
||||
- [Support for BarcodeDetector JavaScript API](/experimental.md)
|
||||
|
||||
## How to modify and build
|
||||
1. Code changes should only be made to [/src](./src) only.
|
||||
|
||||
2. Run `npm install` to install all dependencies.
|
||||
|
||||
3. Run `npm run-script build` to build JavaScript output. The output JavaScript distribution is built to [/dist/html5-qrcode.min.js](./dist/html5-qrcode.min.js). If you are developing on Windows OS, run `npm run-script build-windows`.
|
||||
|
||||
4. Testing
|
||||
- Run `npm test`
|
||||
- Run the tests before sending a pull request, all tests should run.
|
||||
- Please add tests for new behaviors sent in PR.
|
||||
|
||||
5. Send a pull request
|
||||
- Include code changes only to `./src`. **Do not change `./dist` manually.**
|
||||
- In the pull request add a comment like
|
||||
```text
|
||||
@all-contributors please add @mebjas for this new feature or tests
|
||||
```
|
||||
- For calling out your contributions, the bot will update the contributions file.
|
||||
- Code will be built & published by the author in batches.
|
||||
|
||||
## How to contribute
|
||||
You can contribute to the project in several ways:
|
||||
|
||||
- File issue ticket for any observed bug or compatibility issue with the project.
|
||||
- File feature request for missing features.
|
||||
- Take open bugs or feature request and work on it and send a Pull Request.
|
||||
- Write unit tests for existing codebase (which is not covered by tests today). **Help wanted on this** - [read more](./tests).
|
||||
|
||||
## Support 💖
|
||||
|
||||
This project would not be possible without all of our fantastic contributors and [sponsors](https://github.com/sponsors/mebjas). If you'd like to support the maintenance and upkeep of this project you can [donate via GitHub Sponsors](https://github.com/sponsors/mebjas).
|
||||
|
||||
**Sponsor the project for priortising feature requests / bugs relevant to you**. (Depends on scope of ask and bandwidth of the contributors).
|
||||
|
||||
<!-- sponsors -->
|
||||
<a href="https://github.com/webauthor"><img src="https://github.com/webauthor.png" width="40px" alt="webauthor@" /></a>
|
||||
<a href="https://github.com/ben-gy"><img src="https://github.com/ben-gy.png" width="40px" alt="ben-gy" /></a>
|
||||
<a href="https://github.com/bujjivadu"><img src="https://github.com/bujjivadu.png" width="40px" alt="bujjivadu" /></a>
|
||||
<!-- sponsors -->
|
||||
|
||||
Help incentivise feature development, bug fixing by supporting the sponsorhip goals of this project. See [list of sponsered feature requests here](https://github.com/mebjas/html5-qrcode/wiki/Feature-request-sponsorship-goals#feature-requests).
|
||||
|
||||
Also, huge thanks to following organizations for non monitery sponsorships
|
||||
|
||||
<!-- sponsors -->
|
||||
<div>
|
||||
<a href="https://scanapp.org"><img src="https://scanapp.org/assets/svg/scanapp.svg" height="60px" alt="" /></a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="https://www.browserstack.com"><img src="https://www.browserstack.com/images/layout/browserstack-logo-600x315.png" height="100px" alt="" /></a>
|
||||
</div>
|
||||
<!-- sponsors -->
|
||||
|
||||
## Credits
|
||||
The decoder used for the QR code reading is from `Zxing-js` https://github.com/zxing-js/library<br />
|
||||
File diff suppressed because one or more lines are too long
@@ -1,34 +1,18 @@
|
||||
{
|
||||
"tiddlers": [
|
||||
{
|
||||
"file": "qrcode/qrcode.js",
|
||||
"file": "qrcode.js",
|
||||
"fields": {
|
||||
"type": "application/javascript",
|
||||
"title": "$:/plugins/tiddlywiki/qrcode/qrcode/qrcode.js",
|
||||
"title": "$:/plugins/tiddlywiki/qrcode/qrcode.js",
|
||||
"module-type": "library"
|
||||
}
|
||||
},{
|
||||
"file": "qrcode/LICENSE",
|
||||
"file": "LICENSE",
|
||||
"fields": {
|
||||
"type": "text/plain",
|
||||
"title": "$:/plugins/tiddlywiki/qrcode/qrcode/license"
|
||||
}
|
||||
},{
|
||||
"file": "html5-qrcode/html5-qrcode.min.js",
|
||||
"fields": {
|
||||
"type": "application/javascript",
|
||||
"title": "$:/plugins/tiddlywiki/qrcode/html5-qrcode/html5-qrcode.js",
|
||||
"module-type": "library"
|
||||
},
|
||||
"prefix": "window.__Html5QrcodeLibrary__ = {};",
|
||||
"suffix": "\n;exports.__Html5QrcodeLibrary__ = __Html5QrcodeLibrary__;window.__Html5QrcodeLibrary__ = __Html5QrcodeLibrary__;"
|
||||
},{
|
||||
"file": "html5-qrcode/LICENSE",
|
||||
"fields": {
|
||||
"type": "text/plain",
|
||||
"title": "$:/plugins/tiddlywiki/qrcode/html5-qrcode/license"
|
||||
"title": "$:/plugins/tiddlywiki/qrcode/license"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ Macro to convert a string into a QR Code
|
||||
Information about this macro
|
||||
*/
|
||||
|
||||
var qrcode = require("$:/plugins/tiddlywiki/qrcode/qrcode/qrcode.js");
|
||||
var qrcode = require("$:/plugins/tiddlywiki/qrcode/qrcode.js");
|
||||
|
||||
var QRCODE_GENERATION_ERROR_PREFIX = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"><text x="0" y="30" fill="red" font-family="Helvetica, sans-serif" font-size="18">',
|
||||
QRCODE_GENERATION_ERROR_SUFFIX = '</text></svg>';
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
"name": "QR Code",
|
||||
"description": "QR Code generator",
|
||||
"author": "Zeno Zeng",
|
||||
"list": "readme docs examples license"
|
||||
"list": "readme usage examples license"
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
title: $:/plugins/tiddlywiki/qrcode/readme
|
||||
|
||||
The QR Code Plugin contains several features for working with QR codes and other types of barcode.
|
||||
|
||||
* The ''makeqr'' macro enables any text to be rendered as a [[QR code|https://en.wikipedia.org/wiki/QR_code]]. QR codes are a type of 2-dimensional bar code that encodes arbitrary data: text, numbers, links. QR code readers are available or built-in for smartphones, making them a convenient means to transfer information between devices
|
||||
* The `<$barcodereader>` widget that enables barcodes to be decoded from the device camera or direct from an image file
|
||||
* A new toolbar button that can display several QR code renderings of the content of a tiddler:
|
||||
** Raw content
|
||||
** Rendered, formatted content
|
||||
** URL of tiddler
|
||||
|
||||
This plugin uses the following open source libraries:
|
||||
|
||||
* [[qrcode.js by Zeno Zeng|https://github.com/zenozeng/node-yaqrcode]]
|
||||
* [[Html5-QRCode by Minhaz|https://github.com/mebjas/html5-qrcode]]
|
||||
@@ -1,7 +1,7 @@
|
||||
<p>Welcome to <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a>, a non-linear personal web notebook that anyone can use and keep forever, independently of any corporation.</p><p><a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> is a complete interactive wiki in <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/JavaScript.html">JavaScript</a>. It can be used as a single HTML file in the browser or as a powerful Node.js application. It is highly customisable: the entire user interface is itself implemented in hackable <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/WikiText.html">WikiText</a>.</p><p>Learn more and see it in action at <a class="tc-tiddlylink-external" href="https://tiddlywiki.com/" rel="noopener noreferrer" target="_blank">https://tiddlywiki.com/</a></p><p>Developer documentation is in progress at <a class="tc-tiddlylink-external" href="https://tiddlywiki.com/dev/" rel="noopener noreferrer" target="_blank">https://tiddlywiki.com/dev/</a></p><h1 class="">Join the Community</h1><p>
|
||||
<h2 class="">Official Forums</h2><p>The new official forum for talking about TiddlyWiki: requests for help, announcements of new releases and plugins, debating new features, or just sharing experiences. You can participate via the associated website, or subscribe via email.</p><p><a class="tc-tiddlylink-external" href="https://talk.tiddlywiki.org/" rel="noopener noreferrer" target="_blank">https://talk.tiddlywiki.org/</a></p><p>Note that talk.tiddlywiki.org is a community run service that we host and maintain ourselves. The modest running costs are covered by community contributions.</p><p>For the convenience of existing users, we also continue to operate the original TiddlyWiki group (hosted on Google Groups since 2005):</p><p><a class="tc-tiddlylink-external" href="https://groups.google.com/group/TiddlyWiki" rel="noopener noreferrer" target="_blank">https://groups.google.com/group/TiddlyWiki</a></p><h2 class="">Developer Forums</h2><p>There are several resources for developers to learn more about <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> and to discuss and contribute to its development.</p><ul><li><a class="tc-tiddlylink-external" href="https://tiddlywiki.com/dev" rel="noopener noreferrer" target="_blank">tiddlywiki.com/dev</a> is the official developer documentation</li><li>Get involved in the <a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5" rel="noopener noreferrer" target="_blank">development on GitHub</a><ul><li><a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/discussions" rel="noopener noreferrer" target="_blank">Discussions</a> are for Q&A and open-ended discussion</li><li><a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/issues" rel="noopener noreferrer" target="_blank">Issues</a> are for raising bug reports and proposing specific, actionable new ideas</li></ul></li><li>The older TiddlyWikiDev Google Group is now closed in favour of <a class="tc-tiddlylink-external" href="https://github.com/Jermolene/TiddlyWiki5/discussions" rel="noopener noreferrer" target="_blank">GitHub Discussions</a> but remains a useful archive: <a class="tc-tiddlylink-external" href="https://groups.google.com/group/TiddlyWikiDev" rel="noopener noreferrer" target="_blank">https://groups.google.com/group/TiddlyWikiDev</a><ul><li>An enhanced group search facility is available on <a class="tc-tiddlylink-external" href="https://www.mail-archive.com/tiddlywikidev@googlegroups.com/" rel="noopener noreferrer" target="_blank">mail-archive.com</a></li></ul></li><li>Follow <a class="tc-tiddlylink-external" href="http://twitter.com/#!/TiddlyWiki" rel="noopener noreferrer" target="_blank">@TiddlyWiki on Twitter</a> for the latest news</li><li>Chat at <a class="tc-tiddlylink-external" href="https://gitter.im/TiddlyWiki/public" rel="noopener noreferrer" target="_blank">https://gitter.im/TiddlyWiki/public</a> (development room coming soon)</li></ul><h2 class="">Other Forums</h2><ul><li><a class="tc-tiddlylink-external" href="https://www.reddit.com/r/TiddlyWiki5/" rel="noopener noreferrer" target="_blank">TiddlyWiki Subreddit</a></li><li>Chat with Gitter at <a class="tc-tiddlylink-external" href="https://gitter.im/TiddlyWiki/public" rel="noopener noreferrer" target="_blank">https://gitter.im/TiddlyWiki/public</a> !</li><li>Chat on Discord at <a class="tc-tiddlylink-external" href="https://discord.gg/HFFZVQ8" rel="noopener noreferrer" target="_blank">https://discord.gg/HFFZVQ8</a></li></ul><h3 class="">Documentation</h3><p>There is also a discussion group specifically for discussing <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> documentation improvement initiatives: <a class="tc-tiddlylink-external" href="https://groups.google.com/group/tiddlywikidocs" rel="noopener noreferrer" target="_blank">https://groups.google.com/group/tiddlywikidocs</a>
|
||||
</p>
|
||||
</p><h1 class="">Installing <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> on Node.js</h1><ol><li>Install <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Node.js.html">Node.js</a><ul><li>Linux: <blockquote><div><em>Debian/Ubuntu</em>:<br><code>apt install nodejs</code><br>May need to be followed up by:<br><code>apt install npm</code></div><div><em>Arch Linux</em><br><code>yay -S tiddlywiki</code> <br>(installs node and tiddlywiki)</div></blockquote></li><li>Mac<blockquote><div><code>brew install node</code></div></blockquote></li><li>Android<blockquote><div><a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Serving%2520TW5%2520from%2520Android.html">Termux for Android</a></div></blockquote></li><li>Other <blockquote><div>See <a class="tc-tiddlylink-external" href="http://nodejs.org" rel="noopener noreferrer" target="_blank">http://nodejs.org</a></div></blockquote></li></ul></li><li>Open a command line terminal and type:<blockquote><div><code>npm install -g tiddlywiki</code></div><div>If it fails with an error you may need to re-run the command as an administrator:</div><div><code>sudo npm install -g tiddlywiki</code> (Mac/Linux)</div></blockquote></li><li>Ensure TiddlyWiki is installed by typing:<blockquote><div><code>tiddlywiki --version</code></div></blockquote><ul><li>In response, you should see <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> report its current version (eg "5.3.1". You may also see other debugging information reported.)</li></ul></li><li>Try it out:<ol><li><code>tiddlywiki mynewwiki --init server</code> to create a folder for a new wiki that includes server-related components</li><li><code>tiddlywiki mynewwiki --listen</code> to start <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a></li><li>Visit <a class="tc-tiddlylink-external" href="http://127.0.0.1:8080/" rel="noopener noreferrer" target="_blank">http://127.0.0.1:8080/</a> in your browser</li><li>Try editing and creating tiddlers</li></ol></li><li>Optionally, make an offline copy:<ul><li>click the <span class="doc-icon"><svg class="tc-image-save-button-dynamic tc-image-button" height="22pt" viewBox="0 0 128 128" width="22pt">
|
||||
</p><h1 class="">Installing <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> on Node.js</h1><ol><li>Install <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Node.js.html">Node.js</a><ul><li>Linux: <blockquote><div><em>Debian/Ubuntu</em>:<br><code>apt install nodejs</code><br>May need to be followed up by:<br><code>apt install npm</code></div><div><em>Arch Linux</em><br><code>yay -S tiddlywiki</code> <br>(installs node and tiddlywiki)</div></blockquote></li><li>Mac<blockquote><div><code>brew install node</code></div></blockquote></li><li>Android<blockquote><div><a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/Serving%2520TW5%2520from%2520Android.html">Termux for Android</a></div></blockquote></li><li>Other <blockquote><div>See <a class="tc-tiddlylink-external" href="http://nodejs.org" rel="noopener noreferrer" target="_blank">http://nodejs.org</a></div></blockquote></li></ul></li><li>Open a command line terminal and type:<blockquote><div><code>npm install -g tiddlywiki</code></div><div>If it fails with an error you may need to re-run the command as an administrator:</div><div><code>sudo npm install -g tiddlywiki</code> (Mac/Linux)</div></blockquote></li><li>Ensure TiddlyWiki is installed by typing:<blockquote><div><code>tiddlywiki --version</code></div></blockquote><ul><li>In response, you should see <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a> report its current version (eg "5.3.0". You may also see other debugging information reported.)</li></ul></li><li>Try it out:<ol><li><code>tiddlywiki mynewwiki --init server</code> to create a folder for a new wiki that includes server-related components</li><li><code>tiddlywiki mynewwiki --listen</code> to start <a class="tc-tiddlylink tc-tiddlylink-resolves" href="https://tiddlywiki.com/static/TiddlyWiki.html">TiddlyWiki</a></li><li>Visit <a class="tc-tiddlylink-external" href="http://127.0.0.1:8080/" rel="noopener noreferrer" target="_blank">http://127.0.0.1:8080/</a> in your browser</li><li>Try editing and creating tiddlers</li></ol></li><li>Optionally, make an offline copy:<ul><li>click the <span class="doc-icon"><svg class="tc-image-save-button-dynamic tc-image-button" height="22pt" viewBox="0 0 128 128" width="22pt">
|
||||
<g class="tc-image-save-button-dynamic-clean">
|
||||
<path d="M120.783 34.33c4.641 8.862 7.266 18.948 7.266 29.646 0 35.347-28.653 64-64 64-35.346 0-64-28.653-64-64 0-35.346 28.654-64 64-64 18.808 0 35.72 8.113 47.43 21.03l2.68-2.68c3.13-3.13 8.197-3.132 11.321-.008 3.118 3.118 3.121 8.193-.007 11.32l-4.69 4.691zm-12.058 12.058a47.876 47.876 0 013.324 17.588c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48c14.39 0 27.3 6.332 36.098 16.362L58.941 73.544 41.976 56.578c-3.127-3.127-8.201-3.123-11.32-.005-3.123 3.124-3.119 8.194.006 11.319l22.617 22.617a7.992 7.992 0 005.659 2.347c2.05 0 4.101-.783 5.667-2.349l44.12-44.12z" fill-rule="evenodd"></path>
|
||||
</g>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/themes/tiddlywiki/vanilla/settings/
|
||||
|
||||
fontfamily: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji
|
||||
fontfamily: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
|
||||
codefontfamily: "SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace
|
||||
backgroundimageattachment: fixed
|
||||
backgroundimagesize: auto
|
||||
|
||||
Reference in New Issue
Block a user