Re: [tw] Re: Widgets for HTML generation

2014-12-13 Thread Jeremy Ruston
Hi Andreas

> I have published a small article about this on twguides

Excellent stuff, thank you for sharing.

Best wishes

Jeremy


On Fri, Dec 12, 2014 at 8:05 PM, Andreas Hahn 
wrote:
>
>  Am 12.12.2014 15:02, schrieb Tobias Beer:
>
>  Hi Andreas,
>
>  I didn't know that it would work like that, thanks. I think that gets
>> rid of all the problems I had when experimenting with this.
>
>
>  Once you successfully managed that workflow, please share... so that the
> rest of us can understand how you got rid of your problems.
>
>
> I have published a small article about this on twguides:
> http://twguides.org/introduction-to-static-site-generation-the-basics.html
> It is pretty basic, but I hope some people will find it useful, since I
> tried to document every step involved.
>
> /Andreas
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to tiddlywiki@googlegroups.com.
> Visit this group at http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Jeremy Ruston
mailto:jeremy.rus...@gmail.com

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: Widgets for HTML generation

2014-12-12 Thread Andreas Hahn

Am 12.12.2014 15:02, schrieb Tobias Beer:

Hi Andreas,

I didn't know that it would work like that, thanks. I think that
gets rid of all the problems I had when experimenting with this. 



Once you successfully managed that workflow, please share... so that 
the rest of us can understand how you got rid of your problems.


I have published a small article about this on twguides: 
http://twguides.org/introduction-to-static-site-generation-the-basics.html
It is pretty basic, but I hope some people will find it useful, since I 
tried to document every step involved.


/Andreas

--
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: Widgets for HTML generation

2014-12-12 Thread Andreas Hahn

Am 12.12.2014 15:02, schrieb Tobias Beer:

Hi Andreas,

I didn't know that it would work like that, thanks. I think that
gets rid of all the problems I had when experimenting with this. 



Once you successfully managed that workflow, please share... so that 
the rest of us can understand how you got rid of your problems.


Best wishes, Tobias.
--
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+unsubscr...@googlegroups.com 
.
To post to this group, send email to tiddlywiki@googlegroups.com 
.

Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
Sure, I am working on it, I am just writing up an example. Hopefully I 
will be finished in a few hours.


/Andreas

--
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: Widgets for HTML generation

2014-12-12 Thread Tobias Beer
Hi Andreas, 

I didn't know that it would work like that, thanks. I think that gets rid 
> of all the problems I had when experimenting with this. 


Once you successfully managed that workflow, please share... so that the 
rest of us can understand how you got rid of your problems.

Best wishes, Tobias. 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: Widgets for HTML generation

2014-12-12 Thread Andreas Hahn

Am 12.12.2014 12:37, schrieb Jeremy Ruston:
The approach that the core uses in the templates that general HTML 
output is to have the HTML tags that you want in the output to be 
plain text, leaving the "invisible" widgets for list widgets etc.


So, you're first example could be done like this:

<$list filter="1 2 3">
``<$text 
text=<>/>``




I didn't know that it would work like that, thanks. I think that gets 
rid of all the problems I had when experimenting with this.


/Andreas

--
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: Widgets for HTML generation

2014-12-12 Thread Tobias Beer
I think I am not knowledgeable at all about the static rendering process.
Is there an introduction / walk-through through the paradigms / process 
somewhere?

Best wishes, Tobias. 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: Widgets for HTML generation

2014-12-12 Thread Tobias Beer
Hi Andreas,
 

> When using TW as a template engine, you might want to do something like 
> this:
>
> <$list filter="1 2 3">
> <$text 
> text=<>/>
> 
>
> Thus the output here is:
>
> 1
>
> Not sure I follow. How can this be the output for a static file? That 
doesn't seem right. A static file would only contain valid html tags, no 
tw-markup, unless wrapped in ** or *,* etc..., otherwise the 
static rendering process needs ammending. Not?

Best wishes, Tobias.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: Widgets for HTML generation

2014-12-12 Thread Jeremy Ruston
Hi Andreas

> I ran into the problem, that widgets and HTML fall into the same wiki
parsing rule (as far as I know). So there is no good way to generate HTML
USING widgets. So my question is: Is there another option (when you can't
do 1. for some reason)

The approach that the core uses in the templates that general HTML output
is to have the HTML tags that you want in the output to be plain text,
leaving the "invisible" widgets for list widgets etc.

So, you're first example could be done like this:

<$list filter="1 2 3">
``<$text
text=<>/>``


It would get quite hairy to do too much of that, so the core makes
extensive use of the template "$:/core/templates/html-tiddler" which uses
the view widget to render a tiddler as wikified HTML.

For example:

https://github.com/Jermolene/TiddlyWiki5/blob/master/core%2Ftemplates%2Fstatic.tiddler.html.tid

This example takes a different approach; it disables widget/html rule
parsing, causing html tags to be passed through wikification untouched, and
relies on the wikitext transclusion syntax to bring in constituent content:

https://github.com/Jermolene/TiddlyWiki5/blob/master/core%2Ftemplates%2Ftiddlywiki5.html.tid

Best wishes

Jeremy





On Fri, Dec 12, 2014 at 10:51 AM, Andreas Hahn 
wrote:
>
>  Am 12.12.2014 07:04, schrieb Stephan Hradek:
>
> Maybe this helps, putting it at the top of each tiddler:
>
>  \rules only html
>
>
> Thanks Stephan, I tried that, but I failed. Here is an example of what I
> mean: When using TW as a template engine, you might want to do something
> like this:
>
> \rules only html
>
> <$list filter="1 2 3">
> <$text 
> text=<>/>
> 
>
> Notice that "\rule only html" also parses the widgets. (Which is because
> internally HTML tags are treated as widgets). Thus the output here is:
>
> 1
> 2
> 3
>
> = with this underlying html code in the DOM =
>
> 1
> 2
> 3
>
> But ideally it would be like this:
>
> \rules only widgets
>
> <$list filter="1 2 3">
> <$text 
> text=<>/>
> 
>
> = Output =
>
> 1
> 2
> 3
>
> But from what I have gathered thats not possible.
>
> /Andreas
>
> P.S: You might say: Hey wait a moment Andreas, you can do this:
>
> \rules only html macrocallblock macrocallinline
>
> <$list filter="1 2 3">
> >> <> 
> 
>
> And then get to your target HTML by using
>
> <$view tiddler="targetTiddler" format="htmlwikified"/>
>
> which will actually work for this instance, but will fail when HTML tags
> like 

Re: [tw] Re: Widgets for HTML generation

2014-12-12 Thread Andreas Hahn

Am 12.12.2014 07:04, schrieb Stephan Hradek:

Maybe this helps, putting it at the top of each tiddler:

|
\rules only html
|



Thanks Stephan, I tried that, but I failed. Here is an example of what I 
mean: When using TW as a template engine, you might want to do something 
like this:


|\rules only html

<$list filter="1 2 3">
<$text 
text=<>/>
|

Notice that "\rule only html" also parses the widgets. (Which is because 
internally HTML tags are treated as widgets). Thus the output here is:


|1
2
3

= with this underlying html code in the DOM =

1
2
3|

But ideally it would be like this:

|\rules only widgets

<$list filter="1 2 3">
<$text 
text=<>/>


= Output =

1
2
3|

But from what I have gathered thats not possible.

/Andreas

P.S: You might say: Hey wait a moment Andreas, you can do this:

|\rules only html macrocallblock macrocallinline

<$list filter="1 2 3">
>> <> 
|

And then get to your target HTML by using

|<$view tiddler="targetTiddler" format="htmlwikified"/>|

which will actually work for this instance, but will fail when HTML tags 
like|

[tw] Re: Widgets for HTML generation

2014-12-12 Thread Tobias Beer
Hi Andreas,
 

> So there is no good way to generate HTML USING widgets.


I didn't quite follow that conclusion. Can you provide an example?
 

> Is it possible to seperate widget parsing from HTML parsing?


I guess it's the same question as above.
Haven't generated static pages yet, so that's probably why,
 

> I think that would advance TW to make it more useful as a templating 
> engine.
>

Please expand a little on what you have in mind.
Do you mean, defining templates via tiddlers and have static files rendered 
based on that?

Best wishes, Tobias. 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Widgets for HTML generation

2014-12-11 Thread Stephan Hradek
You can define which rules should be used or ignored.

Maybe this helps, putting it at the top of each tiddler:

\rules only html


-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.