Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

626 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

aozora

ci crates.io docs.rs license msrv OpenSSF Scorecard

A parser for 青空文庫記法 (Aozora Bunko notation). Reads Shift_JIS or UTF-8; emits HTML, JSON, or canonical source — and, via Pandoc, EPUB, LaTeX, DOCX and the rest.

Install

cargo install aozora-cli --locked   # command line
cargo add aozora                    # Rust library
npm install aozora-wasm             # JavaScript
pip install aozora                  # Python

Pre-built CLI binaries are on the releases page. The Go SDK ships there as a tarball (aozora-go.tar.gz); crates/aozora-go covers its replace-directive install.

Use

aozora check FILE.txt      # report diagnostics
aozora render FILE.txt     # HTML on stdout
aozora fmt FILE.txt        # rewrite to canonical form

Every subcommand reads stdin when given - or no path. Encoding is detected; -E sjis forces it. aozora --help lists the rest.

use aozora::parse;

let doc = parse("|青梅《おうめ》").expect("source fits parser limits");
let snapshot = doc.snapshot();

let html = snapshot.to_html();
let diagnostics = snapshot.diagnostics();

Documentation

Contributing

CONTRIBUTING.md · SECURITY.md · CHANGELOG.md

aozora-flavored-markdown builds a CommonMark + GFM + 青空文庫記法 dialect on top of this parser.

License

Apache-2.0 OR MIT, at your option. NOTICE lists third-party attribution.

About

Pure-functional Rust parser for 青空文庫記法 (Aozora Bunko notation): ルビ, 傍点, 縦中横, 外字, 返り点, indent containers, page breaks.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages