| Crates.io | aozora2text |
| lib.rs | aozora2text |
| version | 0.7.0 |
| created_at | 2026-01-03 09:50:43.967215+00 |
| updated_at | 2026-01-03 16:52:35.896539+00 |
| description | Convert Aozora Bunko format to plain text |
| homepage | |
| repository | https://github.com/takahashim/aozora2 |
| max_upload_size | |
| id | 2019850 |
| size | 31,122 |
A Rust tool to convert Aozora Bunko format text to plain text.
Note: This package is a backward-compatible wrapper providing the same functionality as
aozora2 strip. For new projects, consider using aozora2 instead.
《》|...《》[#...]※[#...] to Unicode〔...〕 to accented characterscargo install aozora2text
# Convert a file
aozora2text input.txt -o output.txt
# Use stdin/stdout
cat input.txt | aozora2text > output.txt
# ZIP file (Aozora Bunko download format)
aozora2text --zip wagahaiwa_nekodearu.zip -o output.txt
// High-level API (with body extraction)
let input = "Title\nAuthor\n\n吾輩《わがはい》は猫である\n底本:青空文庫";
let plain = aozora2text::convert(input.as_bytes());
assert_eq!(plain, "吾輩は猫である\n");
// Low-level API (single line)
let line = "吾輩《わがはい》は猫《ねこ》である";
let plain = aozora2text::convert_line(line);
assert_eq!(plain, "吾輩は猫である");
| Input | Output |
|---|---|
漢字《かんじ》 |
漢字 |
|東京《とうきょう》 |
東京 |
猫である[#「である」に傍点] |
猫である |
※[#「丸印」、U+25CB] |
○ |
〔cafe'〕 |
café |
MIT