Submit Search
Upload
Pillarの紹介
•
2 likes
•
333 views
M
Masashi Umezawa
Follow
Smalltalkによるドキュメント生成ツール、Pillarの紹介です
Read less
Read more
Software
Report
Share
Report
Share
1 of 35
Download now
Download to read offline
Recommended
Islamic Finance Course work (3)
Islamic Finance Course work (3)
Temitope Ologburo
NanoStrand
NanoStrand
Masashi Umezawa
MAYER, James 2015
MAYER, James 2015
James Mayer
Podsumowanie 13. edycji akcji charytatywnej "Czapka św. Mikołaja"
Podsumowanie 13. edycji akcji charytatywnej "Czapka św. Mikołaja"
MRMRybnika
Mayer, james 2015
Mayer, james 2015
James Mayer
BLVC-plannen_Brochure
BLVC-plannen_Brochure
Peter Veringmeier
Improving UX checkout
Improving UX checkout
Myriam Jessier
Fucking with algorithms
Fucking with algorithms
Myriam Jessier
Recommended
Islamic Finance Course work (3)
Islamic Finance Course work (3)
Temitope Ologburo
NanoStrand
NanoStrand
Masashi Umezawa
MAYER, James 2015
MAYER, James 2015
James Mayer
Podsumowanie 13. edycji akcji charytatywnej "Czapka św. Mikołaja"
Podsumowanie 13. edycji akcji charytatywnej "Czapka św. Mikołaja"
MRMRybnika
Mayer, james 2015
Mayer, james 2015
James Mayer
BLVC-plannen_Brochure
BLVC-plannen_Brochure
Peter Veringmeier
Improving UX checkout
Improving UX checkout
Myriam Jessier
Fucking with algorithms
Fucking with algorithms
Myriam Jessier
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
More Related Content
Featured
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Featured
(20)
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Pillarの紹介
1.
Pillarの紹介 Smalltalkで文書生成 2015/09/30 第80回Smalltalk勉強会 合同会社ソフトウメヤ 梅澤真史
2.
Pillarとは?? ● 文書生成ツール ○ https://github.com/pillar-markup ○
SphinxやRe:VIEWのSmalltalk版 ● Wikiに似た記法のテキストから各種文書を生成できる ○ HTML ○ LaTeX ○ Markdown ○ Pillar ○ text ○ Beamer ○ deck.js ● Smalltalkがわかれば拡張も容易
3.
Pillarの利用例 ● PillarHub ○ http://pillarhub.pharocloud.com ■
Pillerで書かれた文書の置き場 ○ オンラインエディタでプレビューしながら文書の作成が可能 ● Book ○ Book Skeleton ■ https://github.com/pillar-markup/book-skeleton ○ 改訂版Pharo by ExampleやEnterprise Pharo などがPillarで 書かれている ● Ecstatic ○ 静的サイトジェネレータ ■ https://github.com/guillep/ecstatic
4.
入手の仕方 ● SmalltalkHubからロード ○ Pillar.imageとして保存 Gofer
new smalltalkhubUser: 'Pier' project: 'Pillar'; configuration; load. (Smalltalk at: #ConfigurationOfPillar) load ● またはインストール済みイメージをCIサーバから ○ https://ci.inria.fr/pharo- contribution/job/Pillar/PHARO=40,VERSION=stable, VM=vm/lastSuccessfulBuild/artifact/Pillar.zip ● Pharo VMは別途取得 $ curl get.pharo.org/vm40 | bash
5.
チュートリアル ● Enterprise PharoのPillarの章 ○
HTML版 ○ Pillar版 ■ Pillarフォーマットの網羅的な例にもなっているので オススメ ● Pillar Cheet Sheet ○ http://www.cheatography. com/benjaminvanryseghem/cheat- sheets/pillar/ ○ Tableの箇所が一部間違っているので注意すること
6.
Hello, world ● Pillarを実行 ○
output.htmlが生成される !Hello, world !!こんにちは世界 $ ./pharo Pillar.image pillar export -- to=html first.pillar ● first.pillar というファイルを作成
7.
8.
メタ情報の記述 ● 文章の先頭にJSON(STON)形式で記述 { "title": "こんにちはPillar", "author":
"ume" } !Hello, world !!こんにちは世界 ● 共通の設定はpillar.confに記述 { "level1": {"numbering": true, "size": 1, "renderAs": "number"} }
9.
10.
リスト ● -か#で指定 { "title": "こんにちはPillar" } !Hello,
world !!こんにちは世界 -項目1 --項目2 --#項目3 -##項目4
11.
12.
テーブル ● 先頭|で指定 ○ !が続くとヘッダ ○
{ or } or !が続くと位置の指定 (右寄せ、左寄せ、中央寄せ) { "title": "こんにちはPillar" } !Hello, world !!こんにちは世界 |!ヘッダ1 |!ヘッダ2 |!ヘッダ3 |{セル1 |}セル2 ||セル2
13.
14.
リンク ● *label>url* で通常リンク ● +caption>url+
で画像リンク ● @ でアンカー { "title": "こんにちはPillar" } @top !Hello, world !!こんにちは世界 *Pharo>http://pharo.org* +Pharo image>http://pharo.org/web/files/pharo.png+ *top>@top*
15.
16.
コードブロック ● [[[と]]]で囲む ● language=xxx
で言語を指定 ● eval=true で実行結果を表示可能 (但しSmalltalkに限る) { "title": "こんにちはPillar" } [[[language=smalltalk|lineNumber=true | sum | sum := (1 to: 100) sum. ]]] [[[eval=true stream << ('sum = ', (1 to: 100) sum asString). ]]]
17.
18.
RAWブロック ● {{{と}}}で囲む ● 出力言語をそのまま埋め込むことができる { "title":
"こんにちはPillar" } __以下HTML__ {{{ <hr> <div>HTML文書そのまま</div> }}}
19.
20.
その他、強調など ● "" (ダブルクォート2つ)で囲むとボールド ●
'' (シングルクォート2つ)で囲むとイタリック ● __ で囲むとアンダーライン ● -- で囲むと打ち消し線 { "title": "こんにちはPillar" } - ""ボールド"" - ''イタリック'' - __アンダーライン__ - --打ち消し--
21.
22.
エディタ用プラグイン ● Pillarのシンタックスハイライトなどをしてくれる ○ Emacs ○
Vim ○ TextMate ○ Atom
23.
複数ファイルの扱い ● pillar.confに以下を指定 ○ inputFileNames ○
outputDirectory ○ separateOutputFiles { "level1": {"numbering": true, "size": 0, "renderAs": "number"}, "outputDirectory" : "result", "inputFiles" : ["first.pillar","second.pillar"], "separateOutputFiles" : true } $ ./pharo Pillar.image pillar export --to=html
24.
25.
テンプレートの使用 ● pillar.confで出力フォーマットに応じたテンプレートを指定できる ● テンプレートはMustache形式 { "level1":
{"numbering": true, "size": 0, "renderAs": "number"}, "configurations" : { "html": { "outputType" : #html, "template" : "pillar-template.html" } } }
26.
HTMLテンプレート例 ● Safariでも文字化けしないようにcharsetを指定 ● addressタグ部分に値が入るように設定 <!DOCTYPE
html> <html lang="ja"> <head> <meta charset="UTF-8"> <title>{{{title}}}</title> </head> <body> <div>{{{content}}}<div> <address>{{address}}</address> </body> </html>
27.
first.pillar では... ● メタ情報部分にaddressを入れておく { "title":
"こんにちはPillar", "address": "ume@softumeya.com" } !第1章 !!これこれ あれあれ
28.
29.
Pillar の拡張 ● PRDocumentWriterを継承して各種のwriter が作られている ○
visitXXX: を実装していけば良い (XXX部分はPillarのパースされた要素) ○ PRTextWriterやPRMarkdownWriterを 見るとなんとなくわかる
30.
GitHub Flavored Markdownの拡張例 ●
PillarにPRGitHubMarkdownWriter があるが... ○ コードブロックのサポートが弱い (``` が使えない)ので追加してみる ○ 参考: GitHub Flavored Markdown
31.
PRGitHubMarkdownWriterにメソッド追加 ● コードブロック用のvisitメソッドはvisitScript:なのでオーバーライド ○ 引数はPRScriptオブジェクト、languageなどの情報が取れる ○
canvasを使って書いていく PRGitHubMarkdownWriter >> visitScript: aScript canvas newLine. canvas raw: '```'. aScript language isSpecified ifTrue:[canvas raw: aScript language class standardName]. canvas newLine. canvas raw: aScript text trimBoth. canvas newLine. canvas raw: '```'
32.
markdown-test.pillar でテスト ● コードブロックのプロパティにlanguage=smalltalkを入れておく [[[language=smalltalk Transcript
cr; show: 'hi'. ]]] $ ./pharo Pillar.image pillar export -- to=githubmarkdown markdown-test.pillar $ ./pharo Pillar.image pillar export -- to=markdown markdown-test.pillar ● markdownとgithubmarkdownで出力
33.
34.
35.
まとめ ● Pillarを使うと、Wikiに似たマークアップを元に 様々なフォーマットの出力を行うことができる ● 本を書いたり、サイトを作成したり、プレゼンを作成したりする 際に役立つ ●
VMとイメージさえ用意すればすぐに動くのでインストールも 楽 ● PDF、EPUB、reveal.jsなどの出力も欲しいところ ● ライブラリの見通しが良いので、作ってみると良いかも
Download now