Re: [Pharo-users] mustache questions

2017-05-25 Thread Stephane Ducasse
The formats are not the problems.
This is just that some smart students were not really carefully supervised.

So I will work on it slowly because I want to be able to use pillar for
real in the future.

On Thu, May 25, 2017 at 6:50 PM, p...@highoctane.be 
wrote:

> Ah, yes, that change really smells bad compared to previous Pillar where
> it was all in one step.
>
> Let's do opinionated books/booklets/presentations/articles. At least
> we'll have something working.
>
> Let's pick one or two output formats and then let's use Pandoc
> http://pandoc.org/ for the rest.
>
> Phil
>
> On Thu, May 25, 2017 at 5:00 PM, Stephane Ducasse  > wrote:
>
>> Hi Norbert
>>
>> Pillar uses Mustache: it generate a json file and take the template and
>> ask mustache to do the inlining.
>> Now I just hate the idea that we have objects that we should save in file
>> to produce other files...
>>
>> Do you know if we could use mustache directly: i.e., get the text from
>> object, get the template and inject it directly without saving to json
>> files, loading from json files
>>
>> Stef
>>
>>
>


Re: [Pharo-users] mustache questions

2017-05-25 Thread p...@highoctane.be
Ah, yes, that change really smells bad compared to previous Pillar where it
was all in one step.

Let's do opinionated books/booklets/presentations/articles. At least we'll
have something working.

Let's pick one or two output formats and then let's use Pandoc
http://pandoc.org/ for the rest.

Phil

On Thu, May 25, 2017 at 5:00 PM, Stephane Ducasse 
wrote:

> Hi Norbert
>
> Pillar uses Mustache: it generate a json file and take the template and
> ask mustache to do the inlining.
> Now I just hate the idea that we have objects that we should save in file
> to produce other files...
>
> Do you know if we could use mustache directly: i.e., get the text from
> object, get the template and inject it directly without saving to json
> files, loading from json files
>
> Stef
>
>


Re: [Pharo-users] mustache questions

2017-05-25 Thread Norbert Hartl

> Am 25.05.2017 um 17:00 schrieb Stephane Ducasse :
> 
> Hi Norbert
> 
> Pillar uses Mustache: it generate a json file and take the template and ask 
> mustache to do the inlining. 
> Now I just hate the idea that we have objects that we should save in file to 
> produce other files...
> 
> Do you know if we could use mustache directly: i.e., get the text from 
> object, get the template and inject it directly without saving to json files, 
> loading from json files
> 
Sure, that is the normal behavior.

'Hello {{ name }} !' asMustacheTemplate value: { 'name' -> 'Stef' } 
asDictionary 

if the template is in a file

'hello.templ' asFileReference asMustacheTemplate value: { 'name' -> 'Stef' } 
asDictionary .

I talked to Damien back then but I never understood why that configuration file 
was so important. For that they needed to add a CLI option for mustache. But I 
cannot recall exactly what were the reasons.

Does that answer your question?

Norbert