Skip to content

Latest commit

 

History

History
117 lines (83 loc) · 1.77 KB

README.ja.md

File metadata and controls

117 lines (83 loc) · 1.77 KB

青空文庫コマンドラインツール

環境

Python 3.x

Dependencies

使い方

インストール

pip

  1. pip install aozora-cli

Development

  1. git clone https://github.com/aozorahack/aozora-cli
  2. cd aozora-cli
  3. export PYTHONPATH=.

環境変数

  • AOZORAPI_HOST: 青空APIサーバのホスト名:ポート

コマンド

books

$ ./bin/aozora books

Options

$ ./bin/aozora books --help
Usage: aozora books [OPTIONS]

  list books

Options:
  --id INTEGER
  --title TEXT
  --author TEXT
  --output [json|txt]
  --query TEXT
  --help               Show this message and exit.

persons

$ ./bin/aozora persons

Options

$ ./bin/aozora persons --help
Usage: aozora persons [OPTIONS]

  list persons

Options:
  --id INTEGER
  --name TEXT
  --output [json|txt]
  --query TEXT
  --help               Show this message and exit.

content

$ ./bin/aozora content --id <book_id>

Options

$ ./bin/aozora content --help

Usage: aozora content [OPTIONS]

  show content

Options:
  --id INTEGER         [required]
  --format [txt|html]
  --output [txt]
  --help               Show this message and exit.

ranking

$ ./bin/aozora ranking --type [txt|xhtml] --year 2018 --month 8

Options

$ ./bin/aozora ranking --help
Usage: aozora ranking [OPTIONS]

  show access ranking

Options:
  --type [txt|xhtml]   [required] default=xhtml
  --year INTEGER       [required]
  --month INTEGER      [required]
  --query TEXT
  --output [json|txt]
  --help               Show this message and exit.