$ pip install aozora-cli
git clone https://github.com/aozorahack/aozora-cli
cd aozora-cli
export PYTHONPATH=.
AOZORAPI_HOST
:host
orhost:port
of Aozora Bunko API server (default:www.aozorahack.net
)
$ ./bin/aozora books
$ ./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.
$ ./bin/aozora persons
$ ./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.
$ ./bin/aozora content --id <book_id>
$ ./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.
$ ./bin/aozora ranking --type [txt|xhtml] --year 2018 --month 8
$ ./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.