Ecstatic ETSite>>generateHtml file copy philosphy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Ecstatic ETSite>>generateHtml file copy philosphy

Ben Coman
I am having a look into Ecstatic..

What is the philosophy behind the comment in ETSite>>generateHtml ...

    "We copy all input files into the output directory to not make the
input dirty.
     We copy all because the site will need not only pillar files but
also other
     resources such as images or css files."

That is, what is it that makes the input dirty?

Also, ETSite>>configuration has the lines...

    cocoon inputFiles: (self outputDirectory
        allChildren select: [ :each | each extension = 'pillar' ]).

which seems strange to be taking input files from the output directory.

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: Ecstatic ETSite>>generateHtml file copy philosphy

Peter Uhnak


On Mon, Sep 14, 2015 at 6:31 PM, Ben Coman <[hidden email]> wrote:
I am having a look into Ecstatic..

What is the philosophy behind the comment in ETSite>>generateHtml ...

    "We copy all input files into the output directory to not make the
input dirty.
     We copy all because the site will need not only pillar files but
also other
     resources such as images or css files."

That is, what is it that makes the input dirty?

Pillar generates output files in the same folder as the input file, so it mixes input and output.
I don't know if it is possible to configure build folder.

which seems strange to be taking input files from the output directory.

The answer is in your first question. 
""We copy all input files into the output directory to not make the input dirty."

So naturally it then needs to take the input files from the output directory.

Peter
Reply | Threaded
Open this post in threaded view
|

Re: Ecstatic ETSite>>generateHtml file copy philosphy

Ben Coman
On Tue, Sep 15, 2015 at 12:49 AM, Peter Uhnák <[hidden email]> wrote:

>
>
> On Mon, Sep 14, 2015 at 6:31 PM, Ben Coman <[hidden email]> wrote:
>>
>> I am having a look into Ecstatic..
>>
>> What is the philosophy behind the comment in ETSite>>generateHtml ...
>>
>>     "We copy all input files into the output directory to not make the
>> input dirty.
>>      We copy all because the site will need not only pillar files but
>> also other
>>      resources such as images or css files."
>>
>> That is, what is it that makes the input dirty?
>
>
> Pillar generates output files in the same folder as the input file, so it
> mixes input and output.
> I don't know if it is possible to configure build folder.

Thanks Peter.

It would be nice if Pillar was more flexible in this regard. For
background, I am looking into Ecstatic to generate a static web site
from Pillar files hosted on GitHub Pages.  This is constrained to
serve html files out of the base directory of the branch tagged
"gh-pages".  So I want to generate html files into the root folder,
from pillar files in a subdirectory "_sitesrc".

I have got as far as getting interested in this line...
    PrExportPhase>>writeAll:using:
        ... outputFile := (file relativeTo: self configuration
baseDirectory) withExtension: aWriter fileExtension.

[1] https://help.github.com/articles/user-organization-and-project-pages/

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: Ecstatic ETSite>>generateHtml file copy philosphy

CyrilFerlicot
Le 14/09/2015 19:24, Ben Coman a écrit :
>
> Thanks Peter.
>
> It would be nice if Pillar was more flexible in this regard. For
Hi :)

With the version 1.0.0 of Pillar you have the possibility to use
"outputDirectory" and the "support" parameters.
The first will will generate the files into a new folder and the second
will copy a list of files if the outputDirectory ~= baseDirectory.

You can take a look at the documentation of EnterprisePharo (don't
forget to take the last version for Pillar 1.0.0 or later:
https://ci.inria.fr/pharo-contribution/view/Books/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/PillarChap/Pillar.html).

You can also check the configuration of Enterprise Pharo or PharoMooc to
get a concrete example.
(https://github.com/SquareBracketAssociates/EnterprisePharo/blob/master/pillar.conf
--
https://github.com/SquareBracketAssociates/PharoMooc/blob/master/pillar.conf)


Ecstatic doesn't use that for now because we don't have the time to
update it but Pillar can do it.

> background, I am looking into Ecstatic to generate a static web site
> from Pillar files hosted on GitHub Pages.  This is constrained to
> serve html files out of the base directory of the branch tagged
> "gh-pages".  So I want to generate html files into the root folder,
> from pillar files in a subdirectory "_sitesrc".
>
> I have got as far as getting interested in this line...
>     PrExportPhase>>writeAll:using:
>         ... outputFile := (file relativeTo: self configuration
> baseDirectory) withExtension: aWriter fileExtension.
>
> [1] https://help.github.com/articles/user-organization-and-project-pages/
>
> cheers -ben
>

--
Cheers
Cyril


signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Ecstatic ETSite>>generateHtml file copy philosphy

Peter Uhnak
I am looking into Ecstatic to generate a static web site from Pillar files hosted on GitHub Pages.

This is rather easy as Ecstatic was built just for that, so there is no need to change Pillar for it.


should be all you need to get it up & running on GH pages.

Peter


 
Reply | Threaded
Open this post in threaded view
|

Re: Ecstatic ETSite>>generateHtml file copy philosphy

Ben Coman
On Tue, Sep 15, 2015 at 2:28 AM, Peter Uhnák <[hidden email]> wrote:

>> I am looking into Ecstatic to generate a static web site from Pillar files
>> hosted on GitHub Pages.
>
>
> This is rather easy as Ecstatic was built just for that, so there is no need
> to change Pillar for it.
>
> this https://guillep.github.io/ecstatic/install.html
> and this https://gist.github.com/cobyism/4730490
>
> should be all you need to get it up & running on GH pages.

I've successfully used "git subtree push", but I find it messes with
the history graph.  The architecture I'm trying is git top-level
folder containing:
  * generated html files;
  * _srcsite folder containing pillar files
  * _ecstatic folder containing all scripts and executables

that requires only...
$ git checkout gh-pages
# Modify pillar files in folder _srcsite
$ _ecstatic/generate
$ git add -A
$ git commit
$ git push

I temporarily broke the side menu, but I updated Guille's
documentation so you can see where I'm headed...
http://bencoman.github.io/ecstatic/install.html

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: Ecstatic ETSite>>generateHtml file copy philosphy

Ben Coman
In reply to this post by CyrilFerlicot
On Tue, Sep 15, 2015 at 2:18 AM, Ferlicot D. Cyril
<[hidden email]> wrote:

> Le 14/09/2015 19:24, Ben Coman a écrit :
>>
>> Thanks Peter.
>>
>> It would be nice if Pillar was more flexible in this regard. For
> Hi :)
>
> With the version 1.0.0 of Pillar you have the possibility to use
> "outputDirectory" and the "support" parameters.
> The first will will generate the files into a new folder and the second
> will copy a list of files if the outputDirectory ~= baseDirectory.
>
> You can take a look at the documentation of EnterprisePharo (don't
> forget to take the last version for Pillar 1.0.0 or later:
> https://ci.inria.fr/pharo-contribution/view/Books/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/PillarChap/Pillar.html).

Thanks. Thats a good read. Its been a while since I was using Pillar.
I can't remember exact features then but there seems to have been
massive progress with lots of new nice features...

* Sub/super-scripts

* Unique text alignment per table cell - markdown seems only to align
whole columns

* Link syntax for internal, neighbouring-file, external-url seems
balanced and logical

* Script line numbers, MmmMmmm

* Templating

* Generating part of the document with a Smalltalk script. Wow! Bingo!
Just what I've been dreaming of.   Now do you think maybe this might
be used to open a UI Tool (e.g. SystemBrowser) and generate a screen
snapshot to png file on disk, that can be included as a Figure ???
Perhaps even able to process tapes from EventRecorder?
http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2015-January/104701.html


One query...

* In "5.2. Configuration parameters" I see
    support - I am a collection of support files [...] will get
                   copied inside the outputDirectory folder.
Does this support copying a whole folder to be a folder in
outputDirectory.  For example the "theme" folder in Ecstatic ?


Some minor feedback on PillarChap doc...

* In part "3.8 Pictures", consider leaving the colon off the end of this line...
     To include a picture, use the syntax +caption>file://filename|parameters+:
   since it confused me for a moment whether it was part of the syntax.

* Minor grammatical correction...
     A slide end at the beginning of an other slide or at the end of
the document.
     A slide ends at the beginning of another slide or at the end of
the document.


Now I'm a bit late to the party following 1.0.0 release, but I have
one criticism and one enhancement suggestion...

* The syntax @@subscript@@ is very close to @@annotation.  I wonder if
something like ,,subscript,, might have been a better choice. I don't
see many double commas anywhere (except data), and if some text needs
to display such data, requiring a space between commas is probably not
too onerous.

* In "3.9.1. Script with a label or caption", since the link syntax is
used, possibly using the anchor syntax would feel more consistent.
That is...
        [[[@script1|caption=...
rather than...
        [[[label=script1|caption=...


Great work with Pillar guys.


>
> You can also check the configuration of Enterprise Pharo or PharoMooc to
> get a concrete example.
> (https://github.com/SquareBracketAssociates/EnterprisePharo/blob/master/pillar.conf
> --
> https://github.com/SquareBracketAssociates/PharoMooc/blob/master/pillar.conf)
>
>
> Ecstatic doesn't use that for now because we don't have the time to
> update it but Pillar can do it.

So if I want to add the following to Ecstatic's pillar.conf
{...
       "baseDirectory" : "_srcsite",
        "outputDirectory" : ".",
...} it won't get automatically passed through to Pillar?  I'll need
to work out how to get them to Pillar myself?

Am I correct to assume Ecstatic is using Pillar 1.0.0? since
Monticello shows the latest Configuration is loaded in the image.

cheers -ben

>
>> background, I am looking into Ecstatic to generate a static web site
>> from Pillar files hosted on GitHub Pages.  This is constrained to
>> serve html files out of the base directory of the branch tagged
>> "gh-pages".  So I want to generate html files into the root folder,
>> from pillar files in a subdirectory "_sitesrc".
>>
>> I have got as far as getting interested in this line...
>>     PrExportPhase>>writeAll:using:
>>         ... outputFile := (file relativeTo: self configuration
>> baseDirectory) withExtension: aWriter fileExtension.
>>
>> [1] https://help.github.com/articles/user-organization-and-project-pages/
>>
>> cheers -ben
>>
>
>
> --
> Cheers
> Cyril
>

Reply | Threaded
Open this post in threaded view
|

Re: Ecstatic ETSite>>generateHtml file copy philosphy

CyrilFerlicot
Le 15/09/2015 16:22, Ben Coman a écrit :

>
> Thanks. Thats a good read. Its been a while since I was using Pillar.
> I can't remember exact features then but there seems to have been
> massive progress with lots of new nice features...
>
> * Sub/super-scripts
>
> * Unique text alignment per table cell - markdown seems only to align
> whole columns
>
> * Link syntax for internal, neighbouring-file, external-url seems
> balanced and logical
>
> * Script line numbers, MmmMmmm
>
> * Templating
>
> * Generating part of the document with a Smalltalk script. Wow! Bingo!
> Just what I've been dreaming of.   Now do you think maybe this might
> be used to open a UI Tool (e.g. SystemBrowser) and generate a screen
> snapshot to png file on disk, that can be included as a Figure ???
This is on the todo list of Pillar :)

https://github.com/pillar-markup/pillar/issues/17

But as you can see on the list of issues… There is still a lot of works
to do!

> Perhaps even able to process tapes from EventRecorder?
> http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2015-January/104701.html
>
>
> One query...
>
> * In "5.2. Configuration parameters" I see
>     support - I am a collection of support files [...] will get
>                    copied inside the outputDirectory folder.
> Does this support copying a whole folder to be a folder in
> outputDirectory.  For example the "theme" folder in Ecstatic ?
>
Yes!
For example a common use for a book can be:

    "support" : [ "support", "**/Figures" ]

This will include the folder `support` with the templates, css etc.
For the LaTeX export we create some symlinks to the outputDirectory
named `root`, this allow to use "\include{root/support}{myTeXFile.tex}".

This will also include all the folders named `Figures`.
For example if you have `baseDirectory/chap1/Figures` and
`baseDirectory/Annexes/A/c/Figures` you will get
`outputDirectory/chap1/Figures` and `outputDirectory/Annexes/A/c/Figures`.

You can also use "Chap#/Figures" to take only the Figures folder inside
`Chap1`, `Chap2`, `Chap3`…

>
> Some minor feedback on PillarChap doc...
>
> * In part "3.8 Pictures", consider leaving the colon off the end of this line...
>      To include a picture, use the syntax +caption>file://filename|parameters+:
>    since it confused me for a moment whether it was part of the syntax.
>
> * Minor grammatical correction...
>      A slide end at the beginning of an other slide or at the end of
> the document.
>      A slide ends at the beginning of another slide or at the end of
> the document.
>
>
> Now I'm a bit late to the party following 1.0.0 release, but I have
> one criticism and one enhancement suggestion...
>
> * The syntax @@subscript@@ is very close to @@annotation.  I wonder if
> something like ,,subscript,, might have been a better choice. I don't
> see many double commas anywhere (except data), and if some text needs
> to display such data, requiring a space between commas is probably not
> too onerous.
>
> * In "3.9.1. Script with a label or caption", since the link syntax is
> used, possibly using the anchor syntax would feel more consistent.
> That is...
>         [[[@script1|caption=...
> rather than...
>         [[[label=script1|caption=...
>
I will keep that feedback and see what I can do latter :)
Thank you very much! Feedback is awesome!

>
> Great work with Pillar guys.
>
> So if I want to add the following to Ecstatic's pillar.conf
> {...
>        "baseDirectory" : "_srcsite",
>         "outputDirectory" : ".",
> ...} it won't get automatically passed through to Pillar?  I'll need
> to work out how to get them to Pillar myself?
>
I didn't had the time to take a look at ecstatic but I know a lot of
features as the outputDirectory are hardcoded inside Ecstatic because
it's new in Pillar and we don't have the time to update ecstatic.

> Am I correct to assume Ecstatic is using Pillar 1.0.0? since
> Monticello shows the latest Configuration is loaded in the image.
>

I don't know if it is exactly the 1.0.0 but if it's not it's a pretty
close version because we fixed the version with Guillermo at the end of
my internship and the 1.0.0 went out in my last day of internship.

> cheers -ben
>
>

--
Cheers
Cyril


signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Ecstatic ETSite>>generateHtml file copy philosphy

Damien Cassou-2
In reply to this post by Ben Coman

Ben Coman <[hidden email]> writes:

> * Generating part of the document with a Smalltalk script. Wow! Bingo!
> Just what I've been dreaming of.   Now do you think maybe this might
> be used to open a UI Tool (e.g. SystemBrowser) and generate a screen
> snapshot to png file on disk, that can be included as a Figure ???
> Perhaps even able to process tapes from EventRecorder?
> http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2015-January/104701.html


open a new thread about that. I heard some users might have done
something similar already.


> * In "5.2. Configuration parameters" I see
>     support - I am a collection of support files [...] will get
>                    copied inside the outputDirectory folder.
> Does this support copying a whole folder to be a folder in
> outputDirectory.  For example the "theme" folder in Ecstatic ?


should work straightforwardly if the "support" variable includes "theme/*"

> Some minor feedback on PillarChap doc...


please submit pull requests on
https://github.com/SquareBracketAssociates/EnterprisePharo/


> Now I'm a bit late to the party following 1.0.0 release,


ok, so I won't tell you about Pillar 2 :-)
(https://www.mail-archive.com/pharo-users@.../msg14415.html)



> but I have one criticism and one enhancement suggestion...
>
> * The syntax @@subscript@@ is very close to @@annotation.  I wonder if
> something like ,,subscript,, might have been a better choice. I don't
> see many double commas anywhere (except data), and if some text needs
> to display such data, requiring a space between commas is probably not
> too onerous.


agree. Please open an issue on https://github.com/pillar-markup/pillar



> * In "3.9.1. Script with a label or caption", since the link syntax is
> used, possibly using the anchor syntax would feel more consistent.
> That is...
>         [[[@script1|caption=...
> rather than...
>         [[[label=script1|caption=...
>

not sure about that. We need to make the syntax a bit uniform but I
don't see that much improvement here.


> Great work with Pillar guys.


you can thank Cyril who did 99% of it.

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill

Reply | Threaded
Open this post in threaded view
|

Re: Ecstatic ETSite>>generateHtml file copy philosphy

Damien Cassou-2
In reply to this post by Ben Coman

Ben Coman <[hidden email]> writes:

> It would be nice if Pillar was more flexible in this regard. For
> background, I am looking into Ecstatic to generate a static web site
> from Pillar files hosted on GitHub Pages.  This is constrained to
> serve html files out of the base directory of the branch tagged
> "gh-pages".  So I want to generate html files into the root folder,
> from pillar files in a subdirectory "_sitesrc".
>
> I have got as far as getting interested in this line...
>     PrExportPhase>>writeAll:using:
>         ... outputFile := (file relativeTo: self configuration
> baseDirectory) withExtension: aWriter fileExtension.
>
> [1] https://help.github.com/articles/user-organization-and-project-pages/

you might want to look at this:

    https://github.com/cdlm/pharo-katas/

and

    http://people.untyped.org/pharo-katas/

which is generated from Pillar. This is the work of Damien Pollet, in
CC.


--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill