I have several tiddlers include a table, and then want to merge them into a big table.
This code below will tranclude all texts.
<$list filter="[tag[TAG]]">
<h3><$link to=<<currentTiddler>> /> </h3>
<$transclude tiddler=<<currentTiddler>> mode="block"/>
</$list>
So I only want to transclude a part of tiddler which lines start with a vertical pipe, e.g.
| Growth stage | Description |
|00 |dry seed (seed dressing takes place at this stage) |
How could I achieve this?
Here is a partial solution I will return with more later;
\define pipe() |
<$list filter="[tag[TAG]get[text]splitregexp[\n]prefix<pipe>]" variable=segment>
</$list>
- Create a variable to store the pipe symbol
- Split the target tiddlers into lines
splitregexp[\n]
- Retain only lines with the pipe prefix
Still work to be done but there are a few importent tips contained in the above.
- Perhaps store all in a variable then transclude that variable.
Thanks @TW_Tones. I just found a solution from here: http://tw-regexp.tiddlyspot.com/
<$list filter="[tag[TAG]]">
<h3><$link to=<<currentTiddler>>> <$text text={{!!caption}} /> </$link></h3>
<$list filter="[<currentTiddler>get[text]splitregexp[\n]prefix[|]join[
]]" variable=item>
<$wikify name="formattable" text=<<item>> mode="block" output="html">
<<formattable>>
</$wikify>
</$list>
</$list>