Skip to content

Latest commit

 

History

History
114 lines (83 loc) · 1.82 KB

README.md

File metadata and controls

114 lines (83 loc) · 1.82 KB

CLI tool for Aozora Bunko API

(Japanese / 日本語)

Requirements

Getting Started

$ pip install aozora-cli

For Development

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

Environment Variable

  • AOZORAPI_HOST: host or host:port of Aozora Bunko API server (default: www.aozorahack.net)

Commands

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.