$ export PYTHONPATH=.
$ python3 ./bin/aozora books --output txt
Traceback (most recent call last):
File "./bin/aozora", line 11, in <module>
sys.exit(main())
File "./bin/aozora", line 8, in main
return aozoracli.cli()
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/yasuhiroki/ghq/github.com/aozorahack/aozora-cli/aozoracli/cli.py", line 40, in books
_print(res, output)
File "/Users/yasuhiroki/ghq/github.com/aozorahack/aozora-cli/aozoracli/cli.py", line 98, in _print
output = aozoracli.output.txt.dump(res)
File "/Users/yasuhiroki/ghq/github.com/aozorahack/aozora-cli/aozoracli/output/txt.py", line 5, in dump
return _format_print_txt(res)
File "/Users/yasuhiroki/ghq/github.com/aozorahack/aozora-cli/aozoracli/output/txt.py", line 9, in _format_print_txt
return "\n".join([_to_txt(d) for d in data])
File "/Users/yasuhiroki/ghq/github.com/aozorahack/aozora-cli/aozoracli/output/txt.py", line 9, in <listcomp>
return "\n".join([_to_txt(d) for d in data])
File "/Users/yasuhiroki/ghq/github.com/aozorahack/aozora-cli/aozoracli/output/txt.py", line 28, in _to_txt
val = _to_txt(data[key])
File "/Users/yasuhiroki/ghq/github.com/aozorahack/aozora-cli/aozoracli/output/txt.py", line 22, in _to_txt
output += _to_txt(d)
File "/Users/yasuhiroki/ghq/github.com/aozorahack/aozora-cli/aozoracli/output/txt.py", line 30, in _to_txt
return " ".join(sorted_values)
TypeError: sequence item 0: expected str instance, bytes found