1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 10:29:54 +00:00

Merge branch 'tiddlywiki-com'

This commit is contained in:
jeremy@jermolene.com 2021-10-21 09:21:29 +01:00
commit 6b17e688da
6 changed files with 77 additions and 36 deletions

View File

@ -1,11 +1,14 @@
created: 20161226165024380
creator: Matt Lauber
modified: 20210106151027226
modified: 20211008161027226
tags: [[Other resources]]
title: "TiddlyServer" by Matt Lauber
type: text/vnd.tiddlywiki
url: https://github.com/mklauber/TiddlyServer/releases/
''Note:'' This is an older version of ~TiddlyServer. A modern version can be referenced [[here.|TiddlyServer by Arlen Beiler]]
----
TiddlyServer is a special purpose Desktop app, designed to facilitate managing multiple instances of TiddlyWiki running as a server. It does not require internet acess to access the wikis.
{{!!url}}
@ -14,4 +17,3 @@ TiddlyServer is a special purpose Desktop app, designed to facilitate managing m
TiddlyServer can import both TiddlyWiki files and TiddlyFolder wikis. For each wiki, you specify a prefix to serve it with and the source to import from. It will copy the wikis to its own internal store and begin serving them up at http://localhost:8080/{prefix}/. The export button for each wiki will convert it to a single file wiki.
<<<

View File

@ -4,14 +4,21 @@ created: 20131219100608529
delivery: DIY
description: Flexible hosting on your own machine or in the cloud
method: sync
modified: 20200507110222866
modified: 20211003230831173
tags: Saving [[TiddlyWiki on Node.js]] Windows Mac Linux
title: Installing TiddlyWiki on Node.js
type: text/vnd.tiddlywiki
# Install [[Node.js]]
#* either from your favourite package manager: typically `apt-get install nodejs` on Debian/Ubuntu Linux or [[Termux for Android|Serving TW5 from Android]], or `brew install node` on a Mac
#* or directly from http://nodejs.org
#* Linux:
#*> //Debian/Ubuntu//:<br/>`apt install nodejs`<br/>May need to be followed up by:<br/>`apt install npm`
#*> //Arch Linux//<br/>`pacman -S tiddlywiki` <br/>(installs node and tiddlywiki)
#* Mac
#*> `brew install node`
#* Android
#*> [[Termux for Android|Serving TW5 from Android]]
#* Other
#*> See http://nodejs.org
# Open a command line terminal and type:
#> `npm install -g tiddlywiki`
#> If it fails with an error you may need to re-run the command as an administrator:

View File

@ -23,25 +23,25 @@ list-before: $:/core/ui/ViewTemplate/body
<$set name="op-name" value="">
<$list filter="[all[current]tag[Filter Operators]]">
<table class="doc-table before-tiddler-body">
<!-->
<!-- -->
<$set name="op-head" value="purpose">
<$set name="op-body" value={{!!op-purpose}}>
<<.op-row>>
</$set>
</$set>
<!-->
<!-- -->
<$set name="op-head" value="[[input|Filter Syntax]]">
<$set name="op-body" value={{!!op-input}}>
<<.op-row>>
</$set>
</$set>
<!-->
<!-- -->
<$set name="op-head" value="`!` input">
<$set name="op-body" value={{!!op-neg-input}}>
<<.op-row>>
</$set>
</$set>
<!-->
<!-- -->
<$set name="op-head" value="[[suffix|Filter Step]]">
<$set name="op-body" value={{!!op-suffix}}>
<$set name="op-name" value={{!!op-suffix-name}}>
@ -49,7 +49,7 @@ list-before: $:/core/ui/ViewTemplate/body
</$set>
</$set>
</$set>
<!-->
<!-- -->
<$set name="op-head" value="[[parameter|Filter Parameter]]">
<$set name="op-body" value={{!!op-parameter}}>
<$set name="op-name" value={{!!op-parameter-name}}>
@ -57,19 +57,19 @@ list-before: $:/core/ui/ViewTemplate/body
</$set>
</$set>
</$set>
<!-->
<!-- -->
<$set name="op-head" value="output">
<$set name="op-body" value={{!!op-output}}>
<<.op-row>>
</$set>
</$set>
<!-->
<!-- -->
<$set name="op-head" value="`!` output">
<$set name="op-body" value={{!!op-neg-output}}>
<<.op-row>>
</$set>
</$set>
<!-->
<!-- -->
</table>
<$list filter="[all[current]has[from-version]]" variable="listItem">
<$macrocall $name=".from-version" version={{!!from-version}}/>

View File

@ -36,6 +36,56 @@ 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 'tags' field of the target tiddler as input, and saves the modified list of tags back to the 'tags' field |
! $filter vs. $subfilter
Standalone use of the `$subfilter` attribute can be replaced by using a (more complicated) `$filter` attribute value.
For example, the items "abc" and "123" can be appended to the field `myfield` using the `$subfilter` attribute:
```
<$action-listops $field="myfield" $subfilter="abc 123"/>
```
The same can be achieved using the `$filter` attribute and prepending the [[Filter Run]] `[all[current]get[myfield]enlist-input[]]` to the [[Filter Expression]]:
```
<$action-listops $field="myfield" $filter="[all[current]get[myfield]enlist-input[]] abc 123"/>
```
The short form is more convenient, but the long form is useful for live-debugging complicated `$subfilter` values using the filter tab of [[$:/AdvancedSearch]]. By using [[$:/AdvancedSearch]], the [[Filter Expression]] can be tested before using ''action-listops'' to modify actual tiddler fields. For this use case, the `all[current]` portion of the expression needs to be changed to select the proper test tiddler.
! $tags vs. $field + $subfilter
[[Tagging]] is implemented using a tiddler's 'tags' field, so appending the tags "abc" and "123" using the `$tags` attribute like this:
```
<$action-listops $tags="abc 123"/>
```
is mostly equivalent to using `$subfilter` along with "tags" for the value of `$field`:
```
<$action-listops $field="tags" $subfilter="abc 123"/>
```
! $action-listops widget vs. $action-setfield widget
The ActionSetFieldWidget replaces a field's value using `$field`/`$value` attributes. A single ActionSetFieldWidget can be used to set any number of fields by using attributes not starting with $.
The ActionListopsWidget replaces or modifies a single field's value. The new value is generated using filters.
The following two examples are functionally equivalent:
```
<$action-setfield $field="myfield" $value="abc 123"/>
```
```
<$action-listops $field="myfield" $filter="abc 123"/>
```
In general, ActionSetFieldWidget is better for setting multiple fields at once and for replacing a field's value. The ActionListopsWidget is better for modifying a field based on the field's existing value and for using a [[Filter Expression]] to derive the value.
! Extended Filter Operators
A number of [[extended filter operators|The Extended Listops Filters]] are necessary for the manipulation of lists. These operators have been designed primarily for use in subfilter expressions whereby the modified current list is returned in place of the current list.

View File

@ -1,6 +1,6 @@
caption: edit-text
created: 20131024141900000
modified: 20210519154352055
modified: 20211021091910134
tags: Widgets
title: EditTextWidget
type: text/vnd.tiddlywiki
@ -37,25 +37,3 @@ The content of the `<$edit-text>` widget is ignored.
|refreshTitle |<<.from-version 5.1.23>> An optional tiddler title that makes the input field update whenever the specified tiddler changes |
|disabled|<<.from-version "5.1.23">> Optional, disables the text input if set to "yes". Defaults to "no"|
|fileDrop|<<.from-version "5.2.0">> Optional. When set to "yes" allows dropping or pasting images into the editor to import them. Defaults to "no"|
! Notes
One trap to be aware of is that the edit text widget //cannot be used// to edit a field of the tiddler that contains it. Each keypress results in the tiddler being re-rendered, which loses the cursor position within the text field.
Instead, place the edit text widget in a [[template|TemplateTiddlers]] that references the tiddler you want to modify.
For example, if you wanted the tiddler GettingStarted to edit the value of the "myconfig" field of the tiddler "AppSettings", you might do so by creating a separate tiddler "ChangeAppSettings" that contains the following:
```
<$edit-text tiddler="AppSettings" field="myconfig"/>
```
And reference the template in any other tiddler (e.g. GettingStarted) with `{{ChangeAppSettings}}`.
This works when your use of the tiddler //is not// the AppSettings itself which would cause a recursion problem. In this latter case you have to save the fields to a temporary (or alternative) tiddler (sort of the reverse of above) like so:
```
<$edit-text tiddler="StoreAppSettings" field="myconfig"/>
```
In short the EditTextWidget //can not// change properties of the tiddler it is embedded in or part of. It can only change fields of //other// tiddlers. One could use ShadowTiddlers to accomplish the field storage if needed.

View File

@ -465,3 +465,7 @@ J. Song, @8d1h, 2021/08/05
Soren Bjornstad, @sobjornstad, 2021/08/18
Maurycy Zarzycki, @evidentlycube, 2021-10-01
Brian Theado, @btheado, 2021-10-10
@Telumire, 2021-10-18