Slide 1

Slide 1 text

sphinx-new-tab-link nikkie

Slide 2

Slide 2 text

Hello! ● Please call me nikkie ● Python is a tool that feels very natural to me / Pythonはとても手に馴染むツー ルです ○ Thank you, Guido-san, for creating Python. ● I enjoy reading Python documentation, as well as the documentation for libraries implemented in Python / PythonやPythonで実装されたライブラリの ドキュメントを読むのが好きです

Slide 3

Slide 3 text

When reading documentation in a browser e.g. Sorting HOW TO ● Click a link to Wikipedia (external site) ● Wikipedia opens in the same tab ● To compare it side-by- side, always ⌘ + Click 😣

Slide 4

Slide 4 text

backup Click

Slide 5

Slide 5 text

backup same tab 😣

Slide 6

Slide 6 text

The Sphinx documentation generator ● Many documents are made with Sphinx ● I developed a Sphinx extension that opens external site links in a new browser tab / 外部サイトのリンクをブラウザの別のタブで開くSphinx拡張 を自作しました ● called sphinx-new-tab-link ○ I wanted it so badly / 喉から手が出るほどほしかった!

Slide 7

Slide 7 text

● Click a link to PyPI (external site) ● Open PyPI in a new tab without ⌘+Click🎉 e.g. https://ftnext.github.io/sphin x-new-tab- link/guide.en.html With sphinx-new-tab-link

Slide 8

Slide 8 text

backup Click

Slide 9

Slide 9 text

backup NEW TAB!!

Slide 10

Slide 10 text

A lot of thank-you / 先人にありがとう ● implementation from StackOverflow / 実装方法はStackOverflowから ○ since I couldn't find it on PyPI, I published sphinx-new-tab-link ● learned how to develop Sphinx extensions at PyCon / PyConでSphinx拡張の 開発方法を知る ○ About tests Sphinxを通して考える、「拡張」の仕方 (PyCon JP 2022) ● an issue and a pull request, sphinx-new-tab-link now supports dirhtml 🙌 ○ Does not seem to work anymore with dirhtml builder #6

Slide 11

Slide 11 text

Try sphinx-new-tab-link! Thank you With ● reStructuredText ● Python files (sphinx.ext.autodoc) ● Markdown (MyST-Parser) 2 steps pip install sphinx-new-tab-link # conf.py extensions = ["sphinx_new_tab_link"] Even if it's not from Guido-san, I'm always happy to receive feedback /(Guidoさん以外からも)フィードバ ック歓迎です

Slide 12

Slide 12 text

Appendix ● Self-introduction ● How sphinx-new-tab-link works ● Links

Slide 13

Slide 13 text

Self-introduction / お前、誰よ ● nikkie にっきー, Twitter @ftnext, Blog (はてなブログ) ● Use Python since 2017, private & work ● Data scientist at 株式会社ユーザベース ● PyCon JP 2021 Chair🪑 (座長) ● https://github.com/ftnext ○ develop: sphinx-new-tab-link, hayasaka, e.t.c. ○ maintain: Uberi/speech_recognition

Slide 14

Slide 14 text

.. reStructuredText External link: `Example `_ Example Example How sphinx-new-tab-link works

Slide 15

Slide 15 text

Links ● https://pypi.org/project/sphinx-new-tab-link/ ● Recent state: sphinx-new-tab-link リリース1周年! Sphinx拡張公開で広がっ ていく世界に、ありがとう ● With Python files & autodoc: sphinx.ext.autodocでdocstringを元に作った HTMLの中の外部リンクも、sphinx-new-tab-link を使ってブラウザの新しい タブで開けることを確認しました ● With Markdown: Markdownの原稿をSphinxで変換して作ったHTMLの中の外 部リンクも、sphinx-new-tab-link を使ってブラウザの新しいタブで開けるこ とを確認しました