What does "wikify" mean?

135 views
Skip to first unread message

Mat

unread,
Feb 1, 2020, 8:57:50 AM2/1/20
to TiddlyWiki
IMO "wikify a text" (in TW) sounds like it should mean to make the format of a text into something that embraces the functionality of TW. For example a word with double brackets would turn into a link. BUT the WikifyWidget doesn't really seem to do this. The widgets default is actually to do the exact opposite, i.e to flatten and make the text pure text without both html and tiddlybells.
So what does "wikify" actually mean? And is there a term for "make into format that embraces TW functionality"?

<:-)

TonyM

unread,
Feb 1, 2020, 9:53:53 AM2/1/20
to TiddlyWiki
Mat

This has always confused people. I take wikify to translate the text it is given according to the rules of wiki text and store the result in the named variable.

To be truthful this does not always seem to be true.

Anything in wiki text and looks like wiki text is always converted at the last moment then to html to be displayed. Wikify says do that now in the wikify widget don't wait until render time.

So if you wikify a reference to say a field {{!!fieldname}} then the wikify variable should contain the value in field name not the curly braces reference.

However it does not always seem to work how I would like it to. Without retesting if for example I vwikified [[name|tiddlername]] I would hope the named variable would contain "name" but it will from memory still contain [[name|tiddlername]] which is again wikified into a link. So if you try to use it in a filter etc it will not work.

I have asked for a textify that would wikify and return the text. But I always get advice I can't wrap my head around. It makes sense at the time but I can't grasp a way to conceptualize it or use it correctly.

What do you expect it to do given everything is ultimately wikified at render, including 'unwikified' blocks that respond to the special quotes that Mark it to be code not wiki text.

Note. My spell checker wants to nullify wikify

Yours
Equaly perplexed for a total different and possibly opposite reason.

Tony

PMario

unread,
Feb 1, 2020, 11:59:19 AM2/1/20
to TiddlyWiki
Hi Mat,

The way how wikify is used most of the time is with output=text, which is default, because it is mainly used to concatenate 2 elements in 1 text output.


The best way to see, what wikify can do, is open TW prerelease. Edit a tiddler, open "preview" and select the different output types like:

 - parsetree, widgettree, raw html or output

These settings are part of the prerelease, because they are mainly meant to be used by developers, except output=text.

-m

PMario

unread,
Feb 1, 2020, 12:15:55 PM2/1/20
to TiddlyWiki

On Saturday, February 1, 2020 at 3:53:53 PM UTC+1, TonyM wrote:
...
 However it does not always seem to work how I would like it to. Without retesting if for example I vwikified [[name|tiddlername]] I would hope the named variable would contain "name" but it will from memory still contain [[name|tiddlername]] which is again wikified into a link. So if you try to use it in a filter etc it will not work.

If you select: raw html for [[name|tiddlername]] you will get

<p><a class="tc-tiddlylink tc-tiddlylink-missing" href="#tiddlername">name</a>
</p>

Which is exactly, what wikify should do. It should convert wikitext:
[[name|tiddlername]], into HTML, which the browser
will show as a tiddler link.

-m

Mat

unread,
Feb 1, 2020, 1:57:17 PM2/1/20
to TiddlyWiki
Thanks for input guys. My question was solely about a word definition for what "to wikify" means. Only now did I realize I can google it (ingenious!) and I find:

To adapt to the standards and facilities of an existing wiki, such as by marking up with wikitext

Now, this makes me think even more that when we use wikify, we have our own local definition of the term because while I instinctively agree with the proposed definition above, this does not seem to be how we use it in tiddlyverse. So again, exactly what do we mean when we say "wikify"? Maybe it only means "to apply the WikifyWidget"?

And, further: What term should I use when I mean the above definition? Perhaps "convert to wikitext"?

<:-)

TonyM

unread,
Feb 2, 2020, 5:13:14 AM2/2/20
to TiddlyWiki
Mario

How do I get some wiki text evaluated and stored as plain text result I can use in subsequent steps?

I don't want it to evaluate differently later, I want to store it as text in a variable.

now I can use match !match, split join and more how can I wikify and use a text result in the structure?

So I may have the terminology incorrect but how do I do it.

Please
Tony

Xavier Cazin

unread,
Feb 2, 2020, 7:51:43 AM2/2/20
to tiddl...@googlegroups.com
Hi Matt, Tony,

Here is my take: wikifying means reusing the result of the wikification in your code instead of displaying it.

Indeed, wikification typically produces a complex HTML string, so if you rather need a flat text string, the safest route is to ask <$wikify> to render a sequence of <$text> widgets as in:

\define foo()
\whitespace trim
<$text text={{{ [[$:/temp/selected class]get[text]else[tc-view-field-name]addsuffix[ ]addprefix[@@.]] }}} />
<$text text=<<currentTiddler>> />
<$text text="@@ "/>
\end

Here is the string computed in `<<foo>>`: //<<foo>>//

<$edit-text tag=input tiddler tiddler="$:/temp/selected class" placeholder="give a CSS class" default='blue' />

<$wikify name=class-caption text=<<foo>>>
<$button>
<!-- let's use foo to instead set a field, thanks to <$wikify> -->
<$action-setfield caption=<<class-caption>> />
set class ''<$text text={{{ [[$:/temp/selected class]get[text]else[tc-view-field-name]] }}}/>'' to the current caption
</$button>
</$wikify>

Admittedly, this is a rather dumb example: it merely shows that you can compute new wikitext (for later reuse) by retrieving the string that is build in the <<foo>> macro, instead of displaying it.

Cheers,
-- Xavier Cazin


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/7449439c-7492-4ae3-98a9-dddb434e5b05%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages