Sphinxæ‹¡å¼µ 探訪 / Explor Extensions ========================================== (発表時ã¯sphinxjp.themes.htmlslideã®ãƒ†ãƒ¼ãƒžã§ç™ºè¡¨ã—ã¾ã—ãŸ) / (Used sphinxjp.themes.htmlslide when I had this presentation.) ãŠã¾ãˆã れよ? / Who are you? --------------------------------- - ã‚ã‹ã‚„ã¾ã—ã‚ㆠ(Twitter: r_rudi) / Shirou WAKAYAMA | - sphinxã¨ã‹ / Sphinx - blockdiagã¨ã‹ / blockdiag - Whoosh(PurePython全文検索)ã¨ã‹ / Whoosh(pure python full-text search) ã»ã‹ã«ã¯ / other - PostgreSQLã¨ã‹ - mercurialã¨ã‹ ã¡ã‚‡ã£ã¨å®£ä¼: dipus / commercial: dipus --------------------------------------------- - ãŠæ‰‹è»½å…¨æ–‡æ¤œç´¢ã‚µãƒ¼ãƒãƒ¼ / light-use full-text search server - ãƒãƒ¼ã‚«ãƒ«ãƒ›ã‚¹ãƒˆã ã¨ã»ã¼è¨å®šå¿…è¦ãªã— / You don't need any settings if you run under localhost. - builder付ãã§sphinxã¨ã®é€£æºãŒç°¡å˜! / Builder included! easy to use by sphinx - sphinx-build -b dipus source build - 複数ドã‚ュメントã®ä¸²åˆºã—検索もå¯èƒ½ / search from Multi-document. - http://tdoc.info:9876 今日ã®Agenda -------------- ã²ãŸã™ã‚‰ä»Šã‚ã‚‹ãŸãã•ã‚“ã®æ‹¡å¼µã«ã¤ã„ã¦ã—ゃã¹ã‚Šã¾ã™ / Speak extentions. Only that! Sphinxã®é…力 / (One of )Sphinx Good point ----------------------------------------------- - **å¤šå½©ãªæ‹¡å¼µ** / ManyMany extentions pip search sphinx → 100以上! / Over 100! æ‹¡å¼µã®ç¨®é¡ž / Extension classification ----------------------------------------- 分類ã—ã¦ã¿ãŸ / Tentatively classified 1. 言語ãªã©ã®ãƒ‰ãƒ¡ã‚¤ãƒ³ / language domain 2. テーマ / theme 3. グラフãªã©æç”»ç³» / drawing like graph 4. excelãªã©ã®å¤‰æ›ç³» / transrator 5. Django/Zope ãªã©ã¨ã®é€£æº / Django/zope 6. ãã®ä»– / misc 言語ドメインã¨ã¯ï¼Ÿ / What is the language domain ---------------------------------------------------- - マークアップ(ディレクティブã¨ãƒãƒ¼ãƒ«) / markup (directive/role) - å„ç¨®è¨€èªžã®æ§‹æˆè¦ç´ / language specific ã§å‡ºæ¥ã¦ã‚‹ã€‚ / it consists. 例ãˆã° / example ---------------------- - C, C++, JSã¯æ¨™æº–添付 - ruby, php, coffee - erlang, scala - httpdomain, jinja2 - 10個以上 / over 10 sphinxcontrib-erlangdomain ------------------------------------------------ .. code-block:: rst .. erl:function:: append(ListOfLists) -> List1 :type ListOfLists: [[term()]] :rtype: [term()] .. erl:function:: append(ListOfLists) -> List1 :type ListOfLists: [[term()]] :rtype: [term()] sphinxcontrib-httpdomain ---------------------------------- .. code-block:: rst http:get:: /users/(int:user_id)/posts/(tag) :query sort: ``hit`` ã‹ ``created-at`` :query offset: オフセット. åˆæœŸå€¤ 㯠0 / offset. default is 0 :query limit: ä¸Šé™ åˆæœŸå€¤ 㯠30 / limit default is 30 :statuscode 200: æ£å¸¸ / OK :statuscode 404: ユーザーãŒå˜åœ¨ã—ãªã„ / user not found sphinxcontrib-httpdomain ---------------------------------- .. http:get:: /users/(int:user_id)/posts/(tag) :query sort: ``hit`` ã‹ ``created-at`` :query offset: オフセット. åˆæœŸå€¤ 㯠0 / offset. default is 0 :query limit: ä¸Šé™ åˆæœŸå€¤ 㯠30 / limit default is 30 :statuscode 200: æ£å¸¸ / OK :statuscode 404: ユーザーãŒå˜åœ¨ã—ãªã„ / user not found sphinxcontrib-eagle ----------------------- eagleã¨ã¯ / what is eagle プリント基æ¿ã¨ã‹ã‚’作れる言語ã€ã‚‰ã—ã„ / I heard it is to-make-hardware-board language :: .. eagle-image:: singlesided.sch :resolution: 100 :scale: 30 % eagle çµæžœ / result ------------------------- .. figure:: img/eagle.png :scale: 90% :align: center テーマ/ theme --------------------- å„種テーマも拡張ã¨ã—ã¦é…られã¦ã„ã¾ã™ã€‚ / many themes are distributed as an extention sphinxjp.themecore テーマ拡張ã®åŸºç›¤ / core util of theme extention. ã“ã®ã‚¹ãƒ©ã‚¤ãƒ‰ã‚‚å®Ÿã¯æ‹¡å¼µã®ä¸€ã¤ã§ã™ / This slide is one of theme extention sphinxjp.themes.htmlslide sphinxjp.themes.solarized ---------------------------------- .. figure:: img/solarized.png :scale: 80% :align: center cloud_sptheme ---------------------- .. figure:: img/cloud.png :scale: 80% :align: center グラフãªã©ã®æç”»ç³» / drawing ------------------------------ - blockdiagシリーズ - gnuplot - graphviz - googlechart - nicovideo / youtube ... sphinxcontrib-googlechart ソース ---------------------------------------- .. code-block:: rst .. piechart3d:: :size: 480x240 dog: 100 cat: 80 rabbit: 40 googlechart æç”»ä¾‹ / example ---------------------------------- .. piechart3d:: :size: 700x400 dog: 100 cat: 80 rabbit: 40 sphinxcontrib-nicovideo ---------------------------- :: .. nicovideo:: sm9 .. nicovideo:: sm9 (nicovideo is a video site like the Youtube) sphinxcontrib-aafig ---------------------------- .. code-block:: rst .. aafig:: :aspect: 60 :width: 600 :height: 300 :proportional: :textual: :class: aafig +-------+ +-----------+ | Hello +-------->+ aafigure! | +-------+ +-----------+ sphinxcontrib-aafig ---------------------------- .. aafig:: :aspect: 60 :width: 600 :height: 300 :proportional: :textual: :class: aafig +-------+ +-----------+ | Hello +-------->+ aafigure! | +-------+ +-----------+ sphinxjp.shibukawa -------------------- カレンダーæç”» / Drawing calender .. code-block:: rst .. schedule:: item1: 9/1 - 9/3 item2: 9/4 - 9/10 item3: 9/5 - 9/7 .. schedule:: item1: 9/1 - 9/3 item2: 9/4 - 9/10 item3: 9/5 - 9/7 excelãªã©ã®å¤‰æ›ç³» / Translator ----------------------------------- wiki2sphinx moin-moin wikiã‹ã‚‰restã«å¤‰æ› / from moin-moin wiki sphinxcontrib-exceltable Excelã‹ã‚‰å¤‰æ› / from Excel odt2sphinx OpenDocumentã‹ã‚‰å¤‰æ› / from OpenDocument sphinx-git git changelogã‚’å¤‰æ› / from changelog nose-sphinx-doc noseã®ãƒ†ã‚¹ãƒˆã‹ã‚‰å¤‰æ› / from nose testing sphinxcontrib-exceltable ----------------------------- .. code-block:: rst .. exceltable:: Table caption :file: img/sphinxcon2012-test.xls :header: 1 :selection: A1:B3 .. figure:: img/xls-shot.png exceltable çµæžœ / result ----------------------------- | .. exceltable:: Table caption :file: img/sphinxcon2012-test.xls :header: 1 :selection: A1:B3 sphinx-git --------------- .. code-block:: rst .. git_changelog:: .. git_changelog:: Django/Zope ãªã©ã¨ã®é€£æº / Integration with Django/Zope ------------------------------------------------------------- **ã”ã‚ã‚“ãªã•ã„。試ã›ã¦ã¾ã›ã‚“ ><** / **Sorry! not yet** django-documentation djangoã®ãƒ‰ã‚ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’è‡ªå‹•ç”Ÿæˆ / document automake wuxi djangoã®ãƒ†ãƒ³ãƒ—レートをsphinxã§ä½¿ã†ï¼Ÿ / using django template in sphinx?? ãã®ä»– / misc --------------------- 分類ã«å›°ã£ãŸã‚‚ã® / These are hard to classifier. 実ã¯ã“れãŒä¸€ç•ªå¤šã„ / Actually, the number is top. sphinxcontrib-osaka ----------------------- 大阪å¼ãƒ•ィルタ / Filter to osaka dialect 勿‰‹ã«å¤§é˜ªå¼ã«ãªã‚Šã¾ã™ã€‚ / made osaka dialect without asking (å‰ä¼šé•·ä½œ) / created by former chairman sphinxcontrib-issuetracker -------------------------------- :: :issue:`{issue.title} (#{issue.id}) <33>` ã¨æ›¸ãã¨ãƒªãƒ³ã‚¯ã‚’è²¼ã£ã¦ãれる / crete link :issue:`{issue.title} (#{issue.id}) <33>` github, bitbucket, launchpad, google code, debian, jira ã«å¯¾å¿œ 自分ã§å¥½ãã«URLを生æˆã‚‚å¯èƒ½ / or set your own URL sphinxfeed ------------ RSSフィードを生æˆã—ã¦ãれる。 / generate RSS feed conf.pyã«ä»¥ä¸‹ã®ã‚ˆã†ã«è¨˜è¼‰ã™ã‚‹ã€‚ / write below in conf.py .. code-block:: rst feed_base_url = 'http://YOUR_HOST_URL' feed_author = 'YOUR NAME' sphinxcontrib.spelling ------------------------------ PyEnchantã¨ã„ã†ã‚¹ãƒšãƒ«ãƒã‚§ãƒƒã‚¯ãƒ©ã‚¤ãƒ–ラリを使ã„ã€ãƒ‰ã‚ュメントã®ã‚¹ãƒšãƒ«ãƒã‚§ãƒƒã‚¯ã‚’ã—ã¦ãれる。ドã‚ュメントã”ã¨ã«è¾žæ›¸ã‚’ã‚‚ã¦ãŸã‚Šã™ã‚‹ã€‚ / Document spellcheck using PyEnchant. This can own a dictonary per document. .. code-block:: bash % sphinx-build -b spelling source build Running Sphinx v1.1.3 ... Spelling checker messages written to ./docs/build/spelling/output.txt ãã®ã»ã‹ / other -------------------- sphinxcontrib-googleanalytics analytics貼り付ã‘を便利㫠/ for google analytics sphinx-gettext-helper gettextを便利㫠/ for gettext builder sphinxtogithub github pagesã«æ›¸ã出ã—ã¦ãれる / write for github pages sphinxcontrib-bibtex bibtexファイルを使ã£ã¦æ–‡çŒ®ç›®éŒ²ã‚’作れる / bibtex ã¾ã¨ã‚ / conclusion ----------------------- - Sphinxã¯è±Šå¯Œãªæ‹¡å¼µã‚‚é…力 / Extension is one of good thing of Sphinx - ãã®ã†ã¡ã®ã”ã一部を紹介ã—ã¾ã—㟠/ Introduce one of them - 今回調ã¹ã¦æ–°ã—ã„発見ãŒã„ãã¤ã‚‚ã‚りã¾ã—㟠- 「ã“ã‚“ãªã®ãŒæ¬²ã—ã„ï¼ã§ã‚‚ç„¡ã„ãªâ€¦ã€ / "I want like this, but not yet..." - sphinx-users-jpã¸ï¼ / Write sphinx-users-jp ML - ãƒãƒƒã‚·ãƒ¥ã‚¿ã‚°ã€€ #sphinxjp / or hashtag .. collective.sphinx.includedoc sphinxcontrib-sqltable sphinxcontrib-bitbucket omegat numpydoc sphinxcontrib-rawfiles