SlideShare une entreprise Scribd logo
1  sur  49
Télécharger pour lire hors ligne
Pillar
One Format to Rule Them All!
Cyril Ferlicot-Delbecque, Damien Cassou
http://www.smalltalkhub.com/#!/~Pier/Pillar
1
What is Pillar ?
What is Pillar ? 2
Problem
We want more documentation
We want many formats
pdf
html
epub
We do not want to rewrite everything
We want it simple
If you want them to RTFM,
make a better FM.
What is Pillar ? 3
Currently
LaTeX
Complicated
Hard to find an error
Hard to convert in HTML
Markdown
Incomplete
Incompatible implementation
What is Pillar ? 4
Currently
LaTeX
Complicated
Hard to find an error
Hard to convert in HTML
Markdown
Incomplete
Incompatible implementations
What is Pillar ? 5
Our Solution: Pillar
One input, many outputs
HTML
LaTeX
Text
Markdown
Textual syntax
No need for a specific editor
!Example
This is an example of a Pillar file.
*Link>http://www.smalltalkhub.com/*
- Unordered Item
- Unordered Item
# Ordered Item
# Ordered Item
|!Language |!Coolness
|Smalltalk | Hypra cool
|Java | baaad
+ Figure !>file://path.png|width=80+
What is Pillar ? 6
Our Solution: Pillar
Extracted from Pier
Now Pier needs Pillar
!Example
This is an example of a Pillar file.
*Link>http://www.smalltalkhub.com/*
- Unordered Item
- Unordered Item
# Ordered Item
# Ordered Item
|!Language |!Coolness
|Smalltalk | Hypra cool
|Java | baaad
+ Figure !>file://path.png|width=80+
What is Pillar ? 7
Current Uses
Current Uses 8
PillarHub by Mike Filonov.
Current Uses 9
http://pillarhub.pharocloud.com/
Current Uses http://pillarhub.pharocloud.com/ 10
Books
Current Uses http://pillarhub.pharocloud.com/ 11
Current Books
Updated Pharo by Example
Pharo for the Enterprise
Current Uses http://pillarhub.pharocloud.com/ 12
Presentations
Current Uses http://pillarhub.pharocloud.com/ 13
Presentations
This presentation itself is written in Pillar.
Current Uses http://pillarhub.pharocloud.com/ 14
Ecstatic: Static Websites
!Ecstatic
Ecstatic is a static web-site generator engine written entirely in
+Pharo>http://www.pharo.org+.
The Ecstatic engine generates html from the markup language Pillar.
Ecstatic is based on the following principles:
- Ease of use
- Fast feedback
- Extensible
+Getting started>getting_started.pillar+
Current Uses http://pillarhub.pharocloud.com/ 15
Ecstatic: Static Websites
Current Uses http://pillarhub.pharocloud.com/ 16
Ecstatic: Static Websites
Created by Guillermo Polito and Stephane
Ducasse
Generate static website with Pillar
Many templates
Examples
Ecstatic (guillep.github.io/ecstatic)
Current Uses http://pillarhub.pharocloud.com/ 17
Ecstatic: Static Websites
Created by Guillermo Polito and Stephane
Ducasse
Generate static website with Pillar
Many templates
Examples
Ecstatic (guillep.github.io/ecstatic)
DBXTalk (guillep.github.io/DBXTalk)
Current Uses http://pillarhub.pharocloud.com/ 18
Ecstatic: Static Websites
Created by Guillermo Polito and Stephane
Ducasse
Generate static website with Pillar
Many templates
Examples
Ecstatic (guillep.github.io/ecstatic)
DBXTalk (guillep.github.io/DBXTalk)
Personal pages as tinchodias.github.io
Current Uses http://pillarhub.pharocloud.com/ 19
http://guillep.github.io/ecstatic
Current Uses http://guillep.github.io/ecstatic 20
Documentation renderer
Prototype by Kasper Osterbye
Current Uses http://guillep.github.io/ecstatic 21
Begin a Documentation with Pillar
Begin a Documentation with Pillar 22
Simple Example
1 https://raw.githubusercontent.com/pillar-markup/book-skeleton/master/
download.sh
2 echo "!Hello World" > Example.pillar
3 ./pillar export - -to=html - -outputFile=Example.html Example.pillar
Begin a Documentation with Pillar 23
Use Your Own Templates
One default template by exporter
Possibility to create your own template
Possibility to use meta-data in the
template
’<!DOCTYPE html>
<html lang="en">
<head>
<title>{{{title}}}</title>
<link rel="stylesheet" href="http://yandex.st/
highlightjs/8.0/styles/default.min.css">
</head>
<body>
<h1>{{{subtitle}}}</h1>
<div class="container">
{{{content}}}
</div>
</body>
</html>’
Begin a Documentation with Pillar 24
Configuration: pillar.conf
Configure your exports with a simple file
STON syntax
Can contain
Export configuration
Sub configurations
Meta-data
’{
"inputFiles": [ "Pillar.pillar" ],
"outputFile": "Pillar.tex",
"author":"Damien Cassou, Cyril Ferlicot",
"title": "Pillar",
"configurations": {
"beamer":{
"template" : "slides.beamer.template",
}
"beamer2":{
"outputType": #beamer,
"template":"slides.beamer2.template"
}
}
}’
Begin a Documentation with Pillar 25
Text Editor Plugins
You can find Pillar
plugin for:
Emacs
Vim
TextMate
Atom
Begin a Documentation with Pillar 26
Text Editor Plugins
You can find Pillar
plugin for:
Emacs
Vim
TextMate
Atom
Begin a Documentation with Pillar 27
How Pillar Works
How Pillar Works 28
Parse
.Pillar
PRDocumentParser
PRDocument
PRHeader
PRText
PRParagraph
PRText
PRFigure
Example.pillar
!Hello World
I am an example +>file://figures/fig.png+
How Pillar Works 29
Transformation
PRDocument
PRHeader
PRText
PRParagraph
PRText
PRFigure
PRSectionTransformer
PRDocument
PRHeader
PRText
PRSection
PRParagraph
PRText
PRFigure
Example.pillar
!Hello World
I am an example +>file://figures/fig.png+
How Pillar Works 30
Export
PRDocument
PRHeader
PRText
PRSection
PRParagraph
PRText
PRFigure
PRLaTeXWriter
PRHTMLWriter
PRTextWriter
.pdf
.html
.txt
pdflatex
.tex
How Pillar Works 31
Phases System
PRCreationPhase PRParsingPhase PRTransformingPhase
transformerScriptEvaluator
transformerSection
PRExportingPhase
nil
A collection of
input files
A collection of
PRDocuments
A collection of
transformed PRDocuments
Exported files
How Pillar Works 32
Easy Extension
Easy Extension 33
Adding an Exporter
Write a format from a document model
Just write a visitor for the document
Check your exporter with tests
Easy Extension 34
Adding an Annotation
Syntax extension point
Can take parameters
Describe your parameters with
Magritte
Work well with transformers
Examples:
Include a Pillar file
${inputFile:folder/file.pillar}$
Define boundaries of a Slide
${slide:title=title of the slide}$
Divide into columns
${column:width=50}$
Easy Extension 35
Adding an Annotation
PRAbstractAnnotation subclass: #MyNewAnnotation
instanceVariableNames: ’’
classVariableNames: ’’
category: ’Pillar−Model−Document’
Easy Extension 36
Adding an Annotation
PRAbstractAnnotation subclass: #MyNewAnnotation
instanceVariableNames: ’’
classVariableNames: ’’
category: ’Pillar−Model−Document’
MyNewAnnotation class>>#tag
^ #myTag
Easy Extension 37
Adding an Annotation
PRAbstractAnnotation subclass: #MyNewAnnotation
instanceVariableNames: ’’
classVariableNames: ’’
category: ’Pillar−Model−Document’
MyNewAnnotation class>>#tag
^ #myTag
MyNewAnnotation>>#descriptionWidth
<magritteDescription>
^ MANumberDescription new
accessor: #width;
required: true;
min: 0 max: 100;
yourself
Easy Extension 38
Adding a Transformer
Transform a document
Visit the document to transform it
Basic transformers structure exist
Easy Extension 39
Adding a Transformer
PRNodeTransformer subclass: #PRFileInclusion
instanceVariableNames: ’’
classVariableNames: ’’
category: ’Pillar−Model−Transformer’
Easy Extension 40
Adding a Transformer
PRNodeTransformer subclass: #PRFileInclusion
instanceVariableNames: ’’
classVariableNames: ’’
category: ’Pillar−Model−Transformer’
PRFileInclusion>>#visitInputFileAnnotation: anInputFileAnnotation
"I load the file and if the file exist I replace the node of the annotation by the content of the file."
| file |
file := anInputFileAnnotation fileWithConfiguration: self configuration.
file exists
ifTrue: [ self replace: (anInputFileAnnotation parseFile: file withConfiguration: self configuration) children ]
ifFalse: [ anInputFileAnnotation errorFileNotFound: file ]
Easy Extension 41
Adding a Transformer
You can:
Define a priority
Define a keyword to disable a transformer
Generate documentation of the transformer
PRTransformingPhase>>#transformerInputFileOn: aCollection
<pillarTransformer: 1 key: ’fileInclusion’ documentation:
’I visit a document and transform an ==inputFile== annotation into the content of the file.’>
aCollection
do: [ :each |
PRFileInclusion new
configuration: self configuration;
start: each ]
Easy Extension 42
Conclusion
Conclusion 43
Conclusion
One Format to Rule Them All
Easy to extends
Future Work
Improve the Pharo renderer
An Epub and a DocBook exporter
would be great.
We have a large TODO list
Conclusion 44
Annexes
Annexes 45
Partial Diagram of Pillar
PRCocoonConfiguration
exportPRDocument
PRDocumentParser
parse(aFile):aDocument
PRDocumentItem
acceptVisitor(aVisitor)
PRHeader PRParagraph PRText
PRDocumentWriter
write(aDocument)
PRVisitor
visit(aDocument)
visitHeader(aHeader)
visitParagraph(aParagraph)
visitText(aText)
PRHTMLWriter
*
PRLaTeXWriter
PREmptyParagraph
PRPhaser
export()
PRPhase
actionOn(input):output
transform(input):output
n
Annexes 46
Sequence Diagram
a PRHTMLWriter a PRHeader a PRText a PRScript
accept: self
start: aDocument
visit: aDocument
visitDocument: aDocument
visitDocumentGroup: aDocument
visitHeader: self
accept: self
Ici le titre commence
à s'écrire.
visitText: self
Ici le contenu du
titre s'écrit
Puis il écrit la fin
du titre
accept: self
visitScript: self
Ici le script s'écrit
a PRDocument
children
PRItem Collection
Annexes 47
Moose analysis of Pillar
Annexes 48
Non Exhaustive Syntax of Pillar
Annexes 49

Contenu connexe

Plus de ESUG

Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
ESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
ESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
ESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
ESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
ESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
ESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
ESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
ESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
ESUG
 
gt4atproto, A Programmable Environment for Social Media
gt4atproto, A Programmable Environment for Social Mediagt4atproto, A Programmable Environment for Social Media
gt4atproto, A Programmable Environment for Social Media
ESUG
 

Plus de ESUG (20)

Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in Pharo
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 
BioSmalltalk
BioSmalltalkBioSmalltalk
BioSmalltalk
 
gt4atproto, A Programmable Environment for Social Media
gt4atproto, A Programmable Environment for Social Mediagt4atproto, A Programmable Environment for Social Media
gt4atproto, A Programmable Environment for Social Media
 
Roassal3 update
Roassal3 updateRoassal3 update
Roassal3 update
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 

Pillar: One Format to Rule them All