$30 off During Our Annual Pro Sale. View Details »

2012/09/05 SEC_LT

Yuuki Sumida
September 04, 2012

2012/09/05 SEC_LT

Introduction to Sphinx

Yuuki Sumida

September 04, 2012
Tweet

More Decks by Yuuki Sumida

Other Decks in Technology

Transcript

  1. Sphinxで
    ドキュメントを作ろう!
    2012/09/05(Wed)

    View Slide

  2. おしながき

    Sphinxとは

    Sphinxの使い方

    何でSphinxだと嬉しいの?

    View Slide

  3. Sphinxとは

    Python製のドキュメンテーションビルダー

    reStructuredText(reST)と呼ばれる
    軽量マークアップ言語で記述していく

    html/ePub/PDFなど、様々なフォーマット
    で出力可能

    View Slide

  4. Sphinxの使い方

    インストール
    $ easy_install sphinx
    ※Windowsはスタンドアロンインストーラを使ったほうが無難

    View Slide

  5. Sphinxの使い方

    プロジェクト作成
    $ sphinx-quickstart
    Welcome to the Sphinx 1.1.3 quickstart utility.
    Please enter values for the following settings (just press Enter to
    accept a default value, if one is given in brackets).
    Enter the root path for documentation.
    > Root path for the documentation [.]:
    You have two options for placing the build directory for Sphinx output.
    Either, you use a directory "_build" within the root path, or you separate
    "source" and "build" directories within the root path.
    > Separate source and build directories (y/N) [n]: y
    ...

    View Slide

  6. Sphinxの使い方

    文書の作成

    View Slide

  7. Sphinxの使い方

    ビルド
    $ make html

    View Slide

  8. Sphinxの使い方

    ビルド
    $ make pdf

    View Slide

  9. 何でSphinxだと嬉しいの?

    ソースがテキストベース
    – バージョン管理システムで差分が管理できる
    – 同時に編集してあばばばばばってならない
    – 複数人数で同一の文書を同時に編集できる

    用途に応じて出力方式を変更できる
    – 社内で確認する用はHTMLで出す
    – お客様に見せる用はPDF

    View Slide

  10. Sphinxで
    ドキュメントを作ろう!
    2012/09/05(Wed)

    View Slide