Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Sphinx/docutilsの光と闇
Search
cocoatomo
November 28, 2018
Programming
1
810
Sphinx/docutilsの光と闇
cocoatomo
November 28, 2018
Tweet
Share
More Decks by cocoatomo
See All by cocoatomo
みんなの知らない翻訳の世界
cocoatomo
0
750
PyPy における静的解析
cocoatomo
0
140
型とは何か
cocoatomo
0
110
Sphinx が支える翻訳ドキュメント
cocoatomo
0
2.5k
Other Decks in Programming
See All in Programming
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
Grafana Loki によるサーバログのコスト削減
mot_techtalk
1
130
Rubyで始める関数型ドメインモデリング
shogo_tksk
0
100
富山発の個人開発サービスで日本中の学校の業務を改善した話
krpk1900
4
380
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
110
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
2
320
Pulsar2 を雰囲気で使ってみよう
anoken
0
240
JavaScriptツール群「UnJS」を5分で一気に駆け巡る!
k1tikurisu
9
1.8k
Spring gRPC について / About Spring gRPC
mackey0225
0
220
Multi Step Form, Decentralized Autonomous Organization
pumpkiinbell
1
740
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
220
TokyoR116_BeginnersSession1_環境構築
kotatyamtema
0
110
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.6k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
410
It's Worth the Effort
3n
184
28k
Six Lessons from altMBA
skipperchong
27
3.6k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Practical Orchestrator
shlominoach
186
10k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Documentation Writing (for coders)
carmenintech
67
4.6k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Site-Speed That Sticks
csswizardry
4
380
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Transcript
Sphinx/docutils ܕ͚ͷޫͱҋ @cocoatomo
ΞδΣϯμ 1. ܕͱ 2. Pythonͷܕώϯτ 3. ޙ͚ͷܕ͚࡞ۀ 4. ܕ͚ͷҋ 5.
ܕ͚ͷޫ 6. ऴΘΓʹ
1. ܕͱ • ͷछผྨ • ࣮ߦલʹ໌͠ͳ͍ܕʢಈతܕʣ • ॊೈͳϓϩάϥϜ͕ॻ͚Δ • ॊೈա͗ͯͲΜͳ͕དྷΔ͔͔Βͳ͍
• ࣮ߦલʹ໌͢Δܕʢ੩తܕʣ • ࣮ߦલʹ෦తʹόά͕ݕग़Ͱ͖Δ • ܕγεςϜ͕ځ۶ͳ͜ͱʢ͏ੲͷʣ
2. Pythonͷܕώϯτ • มɺؔʢύϥϝʔλ&ฦΓʣʹର͢Δܕࢦఆ • ͋͘·ͰΦϓγϣϯ • ੩తͳܕղੳπʔϧ͕ར༻/࣮ߦ࣌ʹແࢹ • PEP
484 -- Type Hints • PEP 561 -- Distributing and Packaging Type Information
3. ޙ͚ͷܕ͚࡞ۀ • มؔͷΘΕํ͔ΒܕΛਪଌ • ೖɺଐੑɺҾɺฦΓ͕ೖ͞ΕΔมͳͲ • ෳͷܕ͕༗ΓಘΔ߹UnionΛ͏ • Ͳ͏ͯ͠ܕ͕͚ΒΕͳ͍ͱ͖ܕΛແࢹ͢Δ
• # type: ignoreͱ͍͏ίϝϯτͰແࢹ • ಈతʹੜ͑Δଐੑɺ৯͍ҧ͏ϝιουΦʔόʔϥΠυ
4. ܕ͚ͷҋ • ܕ͕͔Βͳ͍ • ಛʹϑϨʔϜϫʔΫͷ൚༻తͳ࣮ • ઈରʹטΈ߹Θͳ͍ܕ • docutils.nodes.Elementͷ__add__ͱ__iadd__
• MypyҾͷܕ͕ಉ͡Ͱ͋Δ͜ͱΛٻΊΔ ͕……
__add__ͱ__iadd__
5. ܕ͚ͷޫ • όά͕ݟ͔Δ • quote_plusͷฦΓʢstrʣͷdecodeϝιουΛ ݺ΅͏ͱ͢Δ͕ʢPy3ʹʣͦΜͳͷແ͍!! • https://github.com/sphinx-doc/sphinx/commit/ 3808405b50503f8902ce6c061272c2e7d1b359
cc#diff-d0e894e396b3cee20ed52b6be6ad63e6
decodeΛআ
6. ऴΘΓʹ • ΈΜͳγϯϓϧͳܕ͕͘PythonίʔυΛॻ͜ ͏ͳ!! • ※. docutilsʹޫ͋Δ͠ɺSphinxʹҋ͋ Δ