mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-02-19 16:39:50 +00:00
Compare commits
9 Commits
barcode-re
...
internatio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56e254d8a3 | ||
|
|
3855a9f013 | ||
|
|
a7bd134c35 | ||
|
|
12f42ad62f | ||
|
|
23b75bbc5d | ||
|
|
3fb71e2553 | ||
|
|
9ee1ef7e23 | ||
|
|
bd99cf3385 | ||
|
|
697dc8db4c |
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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,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.
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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": {
|
||||
|
||||
82
editions/tw5.com/tiddlers/about/Archive.tid
Normal file
82
editions/tw5.com/tiddlers/about/Archive.tid
Normal file
@@ -0,0 +1,82 @@
|
||||
title: TiddlyWiki Archive
|
||||
created: 20231005205623086
|
||||
modified: 20231005210538879
|
||||
tags: About
|
||||
|
||||
\procedure versions()
|
||||
5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9
|
||||
5.1.10 5.1.11 5.1.12 5.1.13 5.1.14 5.1.15 5.1.16 5.1.17 5.1.18 5.1.19
|
||||
5.1.20 5.1.21 5.1.22 5.1.23
|
||||
5.2.0 5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7
|
||||
5.3.0 5.3.1
|
||||
\end
|
||||
|
||||
Older versions of TiddlyWiki are available in the [[archive|https://github.com/Jermolene/jermolene.github.io/tree/master/archive]]:
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
Version
|
||||
</th>
|
||||
<th>
|
||||
Released
|
||||
</th>
|
||||
<th>
|
||||
Lifetime
|
||||
</th>
|
||||
<th>
|
||||
Summary
|
||||
</th>
|
||||
<th>
|
||||
Download
|
||||
</th>
|
||||
</tr>
|
||||
<$list filter="[enlist<versions>reverse[]]" variable="version">
|
||||
<$let
|
||||
filename=`TiddlyWiki-$(version)$`
|
||||
emptyFilename=`Empty-$(filename)$`
|
||||
releaseTiddler={{{ [<version>addprefix[Release ]] }}}
|
||||
releaseDate={{{ [<releaseTiddler>get[released]format:date[TIMESTAMP]] }}}
|
||||
nextVersion={{{ [enlist<versions>after<version>] }}}
|
||||
nextReleaseTiddler={{{ [<nextVersion>addprefix[Release ]] }}}
|
||||
nextReleaseDate={{{ [<nextReleaseTiddler>get[released]format:date[TIMESTAMP]] }}}
|
||||
lifetime={{{ [<nextReleaseDate>subtract<releaseDate>divide[86400000]add[0.5]fixed[0]] }}}
|
||||
>
|
||||
<tr>
|
||||
<td>
|
||||
<$link to=<<releaseTiddler>>>
|
||||
<$text text=`v$(version)$`/>
|
||||
</$link>
|
||||
</td>
|
||||
<td>
|
||||
<$view tiddler=<<releaseTiddler>> field="released" format="date" template="DDth mmm YYYY"/>
|
||||
</td>
|
||||
<td>
|
||||
<$list filter="[<lifetime>compare:number:lt[0]]" variable="ignore">
|
||||
Current
|
||||
</$list>
|
||||
<$list filter="[<lifetime>compare:number:gteq[0]]" variable="ignore">
|
||||
<$text text=<<lifetime>>/>
|
||||
day<$list filter="[<lifetime>!compare:number:eq[1]]" variable="ignore">s</$list>
|
||||
</$list>
|
||||
</td>
|
||||
<td>
|
||||
<$transclude $tiddler=<<releaseTiddler>> $field="description" $format="inline">
|
||||
(none)
|
||||
</$transclude>
|
||||
</td>
|
||||
<td>
|
||||
<a href={{{ [<filename>addprefix[https://tiddlywiki.com/archive/full/]]}}} rel="noopener noreferrer" target="_blank">
|
||||
Complete
|
||||
</a>
|
||||
|
|
||||
<a href={{{ [<emptyFilename>addprefix[https://tiddlywiki.com/archive/empty/]]}}} rel="noopener noreferrer" target="_blank">
|
||||
Empty
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</$let>
|
||||
</$list>
|
||||
</tbody>
|
||||
</table>
|
||||
20
editions/tw5.com/tiddlers/community/Chinese Community.tid
Normal file
20
editions/tw5.com/tiddlers/community/Chinese Community.tid
Normal file
@@ -0,0 +1,20 @@
|
||||
title: 中文社区 - Chinese Community
|
||||
tags: Community
|
||||
|
||||
# A Chinese community tutorial program that people can edit together:
|
||||
#* Main site: [ext[https://tw-cn.netlify.app/]]
|
||||
#* Accelerated access: [ext[https://tw-cn.cpolar.top/]]
|
||||
#* Alternate: [ext[https://tiddly-wiki-chinese-tutorial.vercel.app]]
|
||||
# Tiddlywiki Chinese Chat Forum: [ext[https://talk.tidgi.fun/topic/6]]
|
||||
# Chinese translation of Tiddlywiki official website [ext[https://bramchen.github.io/tw5-docs/zh-Hans/]]
|
||||
# The best Chinese introductory tutorial for newbies [ext[https://keatonlao.github.io/tiddlywiki-xp/]]
|
||||
|
||||
---
|
||||
|
||||
# 大家可以一起编辑的中文社区教程项目:
|
||||
#* 主站:[ext[https://tw-cn.netlify.app/]]
|
||||
#* 加速访问:[ext[https://tw-cn.cpolar.top/]]
|
||||
#* 备用:[ext[https://tiddly-wiki-chinese-tutorial.vercel.app]]
|
||||
# 太微中文交流论坛:[ext[https://talk.tidgi.fun/topic/6]]
|
||||
# 太微官网汉化版:[ext[https://bramchen.github.io/tw5-docs/zh-Hans/]]
|
||||
# 最适合新手的中文入门教程:[ext[https://keatonlao.github.io/tiddlywiki-xp/]]
|
||||
@@ -1,16 +0,0 @@
|
||||
created: 20220417010615742
|
||||
modified: 20220417011547812
|
||||
tags: [[Community Plugins]] [[Community Editions]] Resources
|
||||
title: TiddlyMemo by oflg
|
||||
type: text/vnd.tiddlywiki
|
||||
url: https://tiddlymemo.org/
|
||||
|
||||
Lifelong knowledge, deep in the Sea of Mind.
|
||||
|
||||
{{!!url}}
|
||||
|
||||
~TiddlyMemo uses advanced [[Incremental Learning|https://help.supermemo.org/wiki/Incremental_learning]] concepts to make it your powerful second brain for acquiring lifelong knowledge.
|
||||
|
||||
* [[Read Articles|https://tiddlymemo.org/#Read%20Articles]] like ~SuperMemo
|
||||
* [[Learn languages|https://tiddlymemo.org/#Learn%20languages]] like ~LingQ
|
||||
* [[Memory Notes|https://tiddlymemo.org/#Memory%20Notes]] like Anki
|
||||
@@ -0,0 +1,16 @@
|
||||
created: 20220417010615742
|
||||
modified: 20231005060241771
|
||||
tags: [[Community Editions]]
|
||||
title: Tidme by oflg
|
||||
type: text/vnd.tiddlywiki
|
||||
url: https://github.com/oflg/Tidme
|
||||
|
||||
Lifelong knowledge, deep in Mind.
|
||||
|
||||
{{!!url}}
|
||||
|
||||
Tidme uses advanced [[Incremental Learning|https://help.supermemo.org/wiki/Incremental_learning]] concepts to make it your powerful second brain for acquiring lifelong knowledge.
|
||||
|
||||
* Read Articles like SuperMemo
|
||||
* Learn languages like LingQ
|
||||
* Memory Notes like Anki
|
||||
@@ -0,0 +1,10 @@
|
||||
created: 20220417010615742
|
||||
modified: 20231005060241771
|
||||
tags: [[Community Plugins]]
|
||||
title: Free Spaced Repetition Scheduler for TiddlyWiki by oflg
|
||||
type: text/vnd.tiddlywiki
|
||||
url: https://github.com/open-spaced-repetition/fsrs4tw
|
||||
|
||||
TiddlyWiki-based memory programme using advanced FSRS algorithm
|
||||
|
||||
{{!!url}}
|
||||
@@ -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: 20171029155046637
|
||||
modified: 20171029155227382
|
||||
tags: [[Operator Examples]] [[stringify Operator]]
|
||||
title: jsonstringify Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.operator-example 1 """[[Title with "double quotes" and single ' and \backslash]] +[jsonstringify[]]""">>
|
||||
<<.operator-example 2 """[[Accents and emojis -> äñøßπ ⌛🎄🍪🍓 without suffix]] +[jsonstringify[]]""">>
|
||||
<<.operator-example 3 """[[Accents and emojis -> äñøßπ ⌛🎄🍪🍓 with rawunicode suffix]] +[jsonstringify:rawunicode[]]""">>
|
||||
@@ -1,9 +1,9 @@
|
||||
created: 20161017154944352
|
||||
modified: 20171029155233487
|
||||
modified: 20230919124059118
|
||||
tags: [[Operator Examples]] [[stringify Operator]]
|
||||
title: stringify Operator (Examples)
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.operator-example 1 """[[Title with "double quotes" and single ' and \backslash]] +[stringify[]]""">>
|
||||
<<.operator-example 2 """[[Accents and emojis -> äñøßπ ⌛🎄🍪🍓 without suffix]] +[stringify[]]""">>
|
||||
<<.operator-example 3 """[[Accents and emojis -> äñøßπ ⌛🎄🍪🍓 with rawunicode suffix]] +[stringify:rawunicode[]]""">>
|
||||
<<.operator-example 3 """[[Accents and emojis -> äñøßπ ⌛🎄🍪🍓 with rawunicode suffix]] +[stringify:rawunicode[]]""">>
|
||||
@@ -1,36 +1,12 @@
|
||||
caption: jsonstringify
|
||||
created: 20171029155051467
|
||||
from-version: 5.1.14
|
||||
modified: 20171029155143797
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: the input with JSON string encodings applied
|
||||
modified: 20230919124826880
|
||||
op-parameter:
|
||||
op-parameter-name:
|
||||
op-purpose: apply JSON string encoding to a string
|
||||
op-suffix: <<.from-version "5.1.23">> optionally, the keyword `rawunicode`
|
||||
op-purpose: deprecated, use <<.olink stringify>> instead
|
||||
op-suffix-name: R
|
||||
tags: [[Filter Operators]] [[String Operators]]
|
||||
title: jsonstringify Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The following substitutions are made:
|
||||
|
||||
|!Character |!Replacement |!Condition |
|
||||
|`\` |`\\` |Always |
|
||||
|`"` |`\"` |Always |
|
||||
|Carriage return (0x0d) |`\\r` |Always |
|
||||
|Line feed (0x0a) |`\\n` |Always |
|
||||
|Backspace (0x08) |`\\b` |Always |
|
||||
|Form field (0x0c) |`\\f` |Always |
|
||||
|Tab (0x09) |`\\t` |Always |
|
||||
|Characters from 0x00 to 0x1f |`\\u####` where #### is four hex digits |Always |
|
||||
|Characters from 0x80 to 0xffff|`\\u####` where #### is four hex digits |If `rawunicode` suffix is not present (default) |
|
||||
|Characters from 0x80 to 0xffff|Unchanged |If `rawunicode` suffix is present <<.from-version "5.1.23">> |
|
||||
|
||||
<<.from-version "5.1.23">> If the suffix `rawunicode` is present, Unicode characters above 0x80 (such as ß, ä, ñ or 🎄) will be passed through unchanged. Without the suffix, they will be substituted with `\\u` codes, which was the default behavior before 5.1.23.
|
||||
|
||||
<<.note """Technical note: Characters outside the Basic Multilingual Plane, such as 🎄 and other emojis, will be encoded as a UTF-16 surrogate pair, i.e. with two `\u` sequences.""">>
|
||||
|
||||
Also see the [[stringify Operator]].
|
||||
|
||||
<<.operator-examples "jsonstringify">>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
caption: stringify
|
||||
created: 20161017153038029
|
||||
modified: 20171029155143797
|
||||
from-version: 5.1.14
|
||||
modified: 20230919130847809
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: the input with ~JavaScript string encodings applied
|
||||
op-parameter:
|
||||
@@ -11,26 +12,25 @@ op-suffix-name: R
|
||||
tags: [[Filter Operators]] [[String Operators]]
|
||||
title: stringify Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
from-version: 5.1.14
|
||||
|
||||
The following substitutions are made:
|
||||
|
||||
|!Character |!Replacement |!Condition |
|
||||
|`\` |`\\` |Always |
|
||||
|`"` |`\"` |Always |
|
||||
|Carriage return (0x0d) |`\\r` |Always |
|
||||
|Line feed (0x0a) |`\\n` |Always |
|
||||
|Backspace (0x08) |`\\b` |Always |
|
||||
|Form field (0x0c) |`\\f` |Always |
|
||||
|Tab (0x09) |`\\t` |Always |
|
||||
|Characters from 0x00 to 0x1f |`\\x##` where ## is two hex digits |Always |
|
||||
|Characters from 0x80 to 0xffff|`\\u####` where #### is four hex digits |If `rawunicode` suffix is not present (default) |
|
||||
|Carriage return (0x0d) |`\r` |Always |
|
||||
|Line feed (0x0a) |`\n` |Always |
|
||||
|Backspace (0x08) |`\b` |Always |
|
||||
|Form field (0x0c) |`\f` |Always |
|
||||
|Tab (0x09) |`\t` |Always |
|
||||
|Characters from 0x00 to 0x1f |`\x##` where ## is two hex digits |Always |
|
||||
|Characters from 0x80 to 0xffff|`\u####` where #### is four hex digits |If `rawunicode` suffix is not present (default) |
|
||||
|Characters from 0x80 to 0xffff|<<.from-version "5.1.23">> Unchanged |If `rawunicode` suffix is present |
|
||||
|
||||
<<.from-version "5.1.23">> If the suffix `rawunicode` is present, Unicode characters above 0x80 (such as ß, ä, ñ or 🎄) will be passed through unchanged. Without the suffix, they will be substituted with `\\u` codes, which was the default behavior before 5.1.23.
|
||||
<<.from-version "5.1.23">> If the suffix `rawunicode` is present, Unicode characters above 0x80 (such as ß, ä, ñ or 🎄) will be passed through unchanged. Without the suffix, they will be substituted with `\u` codes, which was the default behavior before 5.1.23.
|
||||
|
||||
<<.note """Technical note: Characters outside the Basic Multilingual Plane, such as 🎄 and other emojis, will be encoded as a UTF-16 surrogate pair, i.e. with two `\u` sequences.""">>
|
||||
<<.note """Characters outside the Basic Multilingual Plane, such as 🎄 and other emojis, will be encoded as a UTF-16 surrogate pair, i.e. with two `\u` sequences.""">>
|
||||
|
||||
Also see the [[jsonstringify Operator]].
|
||||
<<.olink jsonstringify>> is considered deprecated, as it duplicates the functionality of <<.op stringify>>.
|
||||
|
||||
<<.operator-examples "stringify">>
|
||||
<<.operator-examples "stringify">>
|
||||
@@ -50,7 +50,7 @@ In technical / logical terms:
|
||||
|`~run` |`:else[run]` |else |... ELSE run |
|
||||
||`:intersection`|intersection of sets||
|
||||
|
||||
For the difference between `+` and `:intersection`, see [[Filter Run Prefix (Examples)]].
|
||||
For the difference between `+` and `:intersection`, see [[Intersection Filter Run Prefix (Examples)]].
|
||||
|
||||
The input of a run is normally a list of all the non-[[shadow|ShadowTiddlers]] tiddler titles in the wiki (in no particular order). But the `+` prefix can change this:
|
||||
|
||||
|
||||
@@ -18,6 +18,11 @@ TiddlyWiki lets you choose where to keep your data, guaranteeing that in the dec
|
||||
<$macrocall $name="flex-card" bordercolor={{!!color}} textcolor={{!!text-color}} backgroundcolor={{!!background-color}} captionField="caption" descriptionField="text"/>
|
||||
</$list>
|
||||
</div>
|
||||
<div class="tc-cards tc-small">
|
||||
<$link to="中文社区 - Chinese Community" class="tc-btn-big-green tc-card">
|
||||
中文社区 - Chinese Community
|
||||
</$link>
|
||||
</div>
|
||||
|
||||
!! ''Find Out More''
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
title: Constructing JSON tiddlers
|
||||
tags: [[JSON in TiddlyWiki]] [[Learning]]
|
||||
created: 20220427174702859
|
||||
modified: 20220427174702859
|
||||
modified: 20230809113620964
|
||||
tags: [[JSON in TiddlyWiki]] Learning
|
||||
title: Constructing JSON tiddlers
|
||||
|
||||
See [[JSON in TiddlyWiki]] for an overview of using JSON in TiddlyWiki.
|
||||
|
||||
@@ -13,4 +13,4 @@ At a high level, we have several ways to generate JSON data in TiddlyWiki's own
|
||||
* [[jsontiddler Macro]]
|
||||
* [[jsontiddlers Macro]]
|
||||
|
||||
When constructing JSON data manually, the [[jsonstringify Operator]] is needed to ensure that any special characters are properly escaped.
|
||||
When constructing JSON data manually, the [[stringify Operator]] is needed to ensure that any special characters are properly escaped.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 42 KiB |
@@ -1,13 +1,17 @@
|
||||
created: 20220917113002350
|
||||
modified: 20230419103154329
|
||||
modified: 20230921180332436
|
||||
tags: Pragmas
|
||||
title: Pragma: \whitespace
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
<<.from-version "5.1.15">> The ''\whitespace'' [[pragma|Pragmas]] determines how spaces and newlines are treated within wikitext. Note that this only applies to the printable text, and not to other text, such as the values of attributes.
|
||||
<<.from-version "5.1.15">> The ''\whitespace'' [[pragma|Pragmas]] determines how spaces and newlines are treated within wikitext.
|
||||
|
||||
* ''notrim'' -- whitespace text is not subject to special processing (the default)
|
||||
* ''trim'' -- whitespace text is removed
|
||||
* ''trim'' -- whitespace text is ignored
|
||||
|
||||
Note that the processing only applies to the printable text, and not to other text, such as the values of attributes.
|
||||
|
||||
The whitespace setting only applies to the parsed content in which it appears. The setting is inherited by embedded [[Procedure Definitions]] and [[Custom Widgets]] definitions, but is not inherited by [[Macro definitions]].
|
||||
|
||||
```
|
||||
\whitespace trim|notrim
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20221007125701001
|
||||
modified: 20230419103154329
|
||||
modified: 20230921180332436
|
||||
tags: WikiText Procedures
|
||||
title: Procedure Definitions
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -18,6 +18,8 @@ This is the procedure text (param=<<param>>)
|
||||
\end
|
||||
```
|
||||
|
||||
Note that the [[Pragma: \whitespace]] setting is inherited from the parsing context in which the procedure definition occurs. That means that a tiddler containing multiple procedure definitions only needs a single whitespace pragma at the top of the tiddler, and the setting will be automatically inherited by the procedure definitions without needing the pragma to be repeated.
|
||||
|
||||
!! Procedure Definition with Set Widget
|
||||
|
||||
Procedures are implemented as a special kind of [[variable|Variables]] and so internally are actually defined with a <<.wlink SetWidget>> widget.
|
||||
|
||||
@@ -5,6 +5,7 @@ tags: ReleaseNotes
|
||||
title: Release 5.1.0
|
||||
type: text/vnd.tiddlywiki
|
||||
released: 201409201500
|
||||
description: First non-beta release
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.0.18-beta...v5.1.0]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ tags: ReleaseNotes
|
||||
title: Release 5.1.1
|
||||
type: text/vnd.tiddlywiki
|
||||
released: 201409221100
|
||||
description: [[KaTeX Plugin]]
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.0...v5.1.1]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ tags: ReleaseNotes
|
||||
title: Release 5.1.10
|
||||
type: text/vnd.tiddlywiki
|
||||
released: 20160107231609312
|
||||
description: Text slicer, fold/unfold, performance optimisations, translations, external text tiddlers
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.9...v5.1.10]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ tags: ReleaseNotes
|
||||
title: Release 5.1.11
|
||||
type: text/vnd.tiddlywiki
|
||||
released: 20160130124109312
|
||||
description: Bug fix release for v5.1.10
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.10...v5.1.11]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ tags: ReleaseNotes
|
||||
title: Release 5.1.12
|
||||
type: text/vnd.tiddlywiki
|
||||
released: 20160713104714652
|
||||
description: Editor toolbars, improved bitmap editor, Internals plugin, WikifyWidget
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.11...v5.1.12]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20160725084810809
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.1.13
|
||||
type: text/vnd.tiddlywiki
|
||||
description: Bug fix release for v5.1.12
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.12...v5.1.13]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20170426160031661
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.1.14
|
||||
type: text/vnd.tiddlywiki
|
||||
description: Drag and drop improvements, initial RTL support, plugins for XLSX import, QR Codes, ~BibTeX, Google Analytics, Twitter
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.13...v5.1.14]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20171113161124237
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.1.15
|
||||
type: text/vnd.tiddlywiki
|
||||
description: Explorer tab, whitespace pragma, save and render commands
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.14...v5.1.15]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20180425155658451
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.1.16
|
||||
type: text/vnd.tiddlywiki
|
||||
description: [[Dynaview Plugin]], import previews, DiffTextWidget, rotate left in bitmap editor, StartupActions
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.15...v5.1.16]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20180512104329616
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.1.17
|
||||
type: text/vnd.tiddlywiki
|
||||
description: Minor bug fix release
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.16...v5.1.17]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20181206090053690
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.1.18
|
||||
type: text/vnd.tiddlywiki
|
||||
description: Global keyboard shortcuts, HTTP server improvements, support for splash screens, `~` filter run prefix, external JS support
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.17...v5.1.18]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20181220163418974
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.1.19
|
||||
type: text/vnd.tiddlywiki
|
||||
description: Bug fix release for v5.1.18
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.18...v5.1.19]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ tags: ReleaseNotes
|
||||
title: Release 5.1.2
|
||||
type: text/vnd.tiddlywiki
|
||||
released: 20140927162659979
|
||||
description: Minor fixes
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.1...v5.1.2]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20190809141328809
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.1.20
|
||||
type: text/vnd.tiddlywiki
|
||||
description: New conditional, mathematics and string operators, GitHub Saver, save wiki folder command, [[Innerwiki Plugin]]
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.19...v5.1.20]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20190910152313608
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.1.21
|
||||
type: text/vnd.tiddlywiki
|
||||
description: Bug fix release for v5.1.20
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.20...v5.1.21]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20200415160825341
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.1.22
|
||||
type: text/vnd.tiddlywiki
|
||||
description: Dynamic plugin loading, compare operator, new plugins: Menubar, Freelinks, Dynannotate, Share
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.21...v5.1.22]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20201224132933812
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.1.23
|
||||
type: text/vnd.tiddlywiki
|
||||
description: Switchable page templates, EventCatcherWidget, Rename during import, many plugin and filter improvements
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.22...v5.1.23]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ tags: ReleaseNotes
|
||||
title: Release 5.1.3
|
||||
type: text/vnd.tiddlywiki
|
||||
released: 20141020171015200
|
||||
description: Journals, ActionWidgets, <<.olink addprefix>> and <<.olink addsuffix>> operators, "includeWikis"
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.2...v5.1.3]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ tags: ReleaseNotes
|
||||
title: Release 5.1.4
|
||||
type: text/vnd.tiddlywiki
|
||||
released: 20141022155524581
|
||||
description: Dragging links into text boxes, coloured errors and warnings under Node.js
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.3...v5.1.4]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ tags: ReleaseNotes
|
||||
title: Release 5.1.5
|
||||
type: text/vnd.tiddlywiki
|
||||
released: 20141126153016142
|
||||
description: Export button, more ActionWidgets, Danish and Greek translations
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.4...v5.1.5]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ tags: ReleaseNotes
|
||||
title: Release 5.1.6
|
||||
type: text/vnd.tiddlywiki
|
||||
released: 20141219155007260
|
||||
description: Minor bug fix release for v5.1.5
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.5...v5.1.6]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ tags: ReleaseNotes
|
||||
title: Release 5.1.7
|
||||
type: text/vnd.tiddlywiki
|
||||
released: 20141219215007260
|
||||
description: Hot fix release for v5.1.7
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.6...v5.1.7]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ tags: ReleaseNotes
|
||||
title: Release 5.1.8
|
||||
type: text/vnd.tiddlywiki
|
||||
released: 2015041716307227
|
||||
description: Plugin library, Railroad Plugin, sticky titles, 7 new translations
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.7...v5.1.8]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ tags: ReleaseNotes
|
||||
title: Release 5.1.9
|
||||
type: text/vnd.tiddlywiki
|
||||
released: 20150703153725652
|
||||
description: Fluid-fixed layout, vars widget, open in new window
|
||||
|
||||
\define custom-colour-picker(tiddler,colour)
|
||||
<$edit-text tiddler="""$tiddler$""" index="""$colour$""" type="color" tag="input"/>
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20211003151502543
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.2.0
|
||||
type: text/vnd.tiddlywiki
|
||||
description: JSON store area, nestable macros, counter attribute for ListWidget, MessageCatcherWidget
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.1.23...v5.2.0]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20211208115833846
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.2.1
|
||||
type: text/vnd.tiddlywiki
|
||||
description: Filter cascades, LetWidget, trigonometric operators
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.0...v5.2.1]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20220325130817150
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.2.2
|
||||
type: text/vnd.tiddlywiki
|
||||
description: Minor bug fix release
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.1...v5.2.2]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20220802122551819
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.2.3
|
||||
type: text/vnd.tiddlywiki
|
||||
description: Minor fixes and improvements
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.2...v5.2.3]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20221213163110439
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.2.4
|
||||
type: text/vnd.tiddlywiki
|
||||
description: Hot fixes for v5.2.3, Twitter archivist plugin, GenesisWidget, JSON read operators, nested macro definitions
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.3...v5.2.4]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20221219184500440
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.2.5
|
||||
type: text/vnd.tiddlywiki
|
||||
description: Hot fix release for v5.2.4
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.4...v5.2.5]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20230320184352916
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.2.6
|
||||
type: text/vnd.tiddlywiki
|
||||
description: Markdown improvements, indentable pragmas, accessible save wiki button
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.5...v5.2.6]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20230326083239710
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.2.7
|
||||
type: text/vnd.tiddlywiki
|
||||
description: Bug fix release for v5.2.6
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.6...v5.2.7]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20230701123439630
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.3.0
|
||||
type: text/vnd.tiddlywiki
|
||||
description: Parameterised transclusions, procedures, functions, custom widgets
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.7...v5.3.0]]//
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ released: 20230820112855583
|
||||
tags: ReleaseNotes
|
||||
title: Release 5.3.1
|
||||
type: text/vnd.tiddlywiki
|
||||
description: Bug fix release for v5.3.0
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.3.0...v5.3.1]]//
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
created: 20150419144523070
|
||||
modified: 20220802100223019
|
||||
modified: 20231005205612322
|
||||
tags: About
|
||||
title: Releases
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
New releases of TiddlyWiki and TiddlyDesktop are announced via the [[official discussion groups|Forums]] and [[Twitter|https://twitter.com/TiddlyWiki]]
|
||||
|
||||
See the [[TiddlyWiki Archive]] to download older versions.
|
||||
|
||||
<<tabs "[[TiddlyWiki Releases]] [[TiddlyDesktop Releases]]" "TiddlyWiki Releases" "$:/state/tab">>
|
||||
|
||||
@@ -147,6 +147,10 @@ type: text/vnd.tiddlywiki
|
||||
gap: 1em;
|
||||
}
|
||||
|
||||
.tc-cards.tc-small {
|
||||
font-size: 0.7em;
|
||||
}
|
||||
|
||||
.tc-cards.tc-action-card {
|
||||
text-align: center;
|
||||
background: none;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
created: 20221007144237585
|
||||
modified: 20230419103154328
|
||||
modified: 20230921180332436
|
||||
tags: Concepts Reference
|
||||
title: Custom Widgets
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -22,6 +22,8 @@ This is the widget, and the attribute is <<attribute>>.
|
||||
|
||||
The name of the widget must start with a dollar sign. If it is a user defined widget that does not override an existing widget then it must include at least one period (dot) within the name (for example `$my.widget` or `$acme.logger`).
|
||||
|
||||
Note that the [[Pragma: \whitespace]] setting is inherited from the parsing context in which the procedure definition occurs. That means that a tiddler containing multiple procedure definitions only needs a single whitespace pragma at the top of the tiddler, and the setting will be automatically inherited by the procedure definitions without needing the pragma to be repeated.
|
||||
|
||||
!! Using Custom Widgets
|
||||
|
||||
Custom widgets are called in the same way as ordinary built-in widgets:
|
||||
|
||||
@@ -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 相容,但不支援許多健全網際網路面向的使用方式所需的功能。
|
||||
|
||||
|
||||
@@ -549,3 +549,7 @@ Eric Haberstroh, @pille1842, 2023/07/23
|
||||
@cmo-pomerium, 2023/08/03
|
||||
|
||||
BuckarooBanzay, @BuckarooBanzay, 2023/09/01
|
||||
|
||||
Timur, @T1mL3arn, 2023/10/04
|
||||
|
||||
Wang Ke, @Gk0Wk, 2023/10/17
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tiddlywiki",
|
||||
"preferGlobal": "true",
|
||||
"version": "5.3.2-prerelease",
|
||||
"version": "5.3.1",
|
||||
"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,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