Hi Arturo,


On 08/03/18 21:15, Arturo Zambrano wrote:
Thanks Offray, I followed previous holly wars :P .
I understand the pros and cons.

:-) is inevitable to fight some of them from time to time, in a community with strong passions/opinions�� about technology and tools, like this one. In my experience, good interaction with external tools for documentation, like Markdown and Pandoc has open a bridge with other people who is using them already or can make quicker use in the near future.

Is there any preview option in grafoscopio?
Or an external viewer is a must?


There are no previewers integrated in Grafoscopio, so you need to rely on external software. That being said, using the %metadata node you can define the Pandoc exportation command with all details and metadata: templates, font size, language, author, etc. So, any preview is on click away from Grafoscopio of being updated on the external viewer. In that we I did the Manual, and we did the Data Journalism Handbook and other booklets.

You could download Grafoscopio, see the Manual in the Help Menu and install Pandoc, to see by yourself how this interaction between Grafoscopio and the external viewer works once you have the %metadata node defines (see screenshot below). Notice that, if you want to recreate the Manual, you will need also to download the templates for it located at [1], and put in the same folder where the manual.ston file is located (maybe I should make this download automatic).

[1] http://mutabit.com/repos.fossil/grafoscopio/dir?ci=tip&name=Docs/En/Books/Manual

Let me know if this works for your use case.


Thanks!


Cheers,

Offray




On Wed, Feb 28, 2018 at 2:27 PM, Offray Vladimir Luna C��rdenas <offray.luna@mutabit.com> wrote:

Hi Arturo,

It seems that you have a project with documentation is pretty important. I don't want to start a holly war pointing that there is alternatives to Pillar in Pharo, but maybe you should check Grafoscopio + Pandoc. We can write pretty complex documents using it, like the Grafoscopio User Manual [1], the Data Journalism Handbook[2] and Pasos para una Biblioteca Digital de Bogot��[3] (both in Spanish).

[1] http://mutabit.com/repos.fossil/grafoscopio/doc/tip/Docs/En/Books/Manual/manual.pdf
[2] http://mutabit.com/repos.fossil/mapeda/
[3] http://mutabit.com/repos.fossil/dataweek/doc/tip/Artefactos/BibliotecaDigitalBogota/intro.md

Cheers,

Offray


On 27/02/18 08:42, Arturo Zambrano wrote:
Thanks for your help.

I will use markdown as a preview, so th PR*Writer write:document is OK.
For the last phase I plan to use latex to generate a pdf following certain presentation rules.

I wonder if it is possible to use pillar 7 templates programmatically.
Is there some example I can follow?

Thanks again!



On Mon, Feb 19, 2018 at 6:42 AM, Guillermo Polito <guillermopolito@gmail.com> wrote:


On Sun, Feb 18, 2018 at 9:01 PM, Stephane Ducasse <stepharo.self@gmail.com> wrote:
Hi arturo

What you saw is the pipeline to produce book and others. Now I do not
think that you need it.
To export markdown you do not need the pillar configuration and the rest.
Check the chapter 6 in the publishing a booklet with pillar document.

You can just get your document using the Pillar parser.

| wiki doc |
wiki := '!My Document'.
doc := PRPillarParser parse: wiki

Or from a file:

�� �� �� PRPillarParser parse: (FileSystem workingDirectory / 'foo.pillar')

�� �� �� �� �� readStream

You can also instantiate the document model, one node after the other,
start- ing with PRDocument and adding sub-instances of PRDocumentItem:

�� �� �� | document title figure|

�� �� �� document := PRDocument new.

�� �� �� title := PRHeader new

�� �� �� �� ��level: 1;

�� �� �� �� ��add: (PRText content: 'foo');

�� �� �� �� ��yourself.

�� �� �� figure := PRFigure new

�� �� �� �� ��add: (PRText content: 'Alias');

then to export in HTML you just ask the htmlWriter. So I think that
this is the same for markdown.

PRHTMLWriter write: document


Now pay attention because we are currently rewriting the pipeline of
document production in Pillar 70.

Yeh, but ideally the pipeline should only automatically orchestrate what people should be still able to do programatically :)��

So I think keeping

PRHTMLWriter write: document

and

PRHTMLWriter write: document toStream: ...

& family, is good.
��
This is why this is not in master but in a specific branch.

Stef






On Sun, Feb 18, 2018 at 7:13 PM, Arturo Zambrano
<arturo.zambrano@gmail.com> wrote:
> Hi,
> I figured it out (at least in part)
>
>�� �� �� ��configuration := PRPillarConfiguration new.
>�� �� �� ��configuration outputType: PRMarkdownWriter.
>�� �� �� ��export:=PRExportPhase new .
>�� �� �� ��export executeOn:
>�� ��(PRCompilationContext withDocument: document withConfiguration:
> configuration)
>
>
> This code snipped generates a Json file which contains the markdown... how
> do I generate just the markdown?
>
> TIA
> Arturo
>
>
> On Sun, Feb 18, 2018 at 2:16 PM, Arturo Zambrano <arturo.zambrano@gmail.com>
> wrote:
>>
>> Hi,
>>�� ��can someone please tell me how to export a document using pillar7?
>>
>>�� For pillar5�� the example used to be:
>>
>> configuration := PRPillarConfiguration new.
>> configuration outputType: PRHTMLWriter.
>> PRExportPhase executeOn: { document } with: configuration.
>>
>>
>> Thanks!
>
>




--

������

Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - http://www.cnrs.fr


Web: http://guillep.github.io

Phone: +33 06 52 70 66 13