5 unstable releases

0.3.1 Apr 5, 2021
0.3.0 Apr 5, 2021
0.2.1 Jan 13, 2020
0.2.0 Jan 13, 2020
0.0.1 Dec 22, 2019

#1065 in Text processing

MIT license

1MB
512 lines

Contains (WOFF font, 190KB) docs/FiraSans-Medium.woff, (WOFF font, 185KB) docs/FiraSans-Regular.woff, (WOFF font, 94KB) docs/SourceSerifPro-Bold.ttf.woff, (WOFF font, 89KB) docs/SourceSerifPro-Regular.ttf.woff, (WOFF font, 56KB) docs/SourceCodePro-Regular.woff, (WOFF font, 56KB) docs/SourceCodePro-Semibold.woff and 1 more.

Naromat: Narou format converter

Coverage Status

What's Naromat?

Naromat is a library crate that converts text file from specific typesetting format to Shosetsuka ni Naro(https://syosetu.com/) format.

Getting started

As a tool

  1. cargo install naromat
  2. naromat -h

As a library

  1. Add Naromat to your cargo.toml
  2. Use like this:
use naromat::entities::chapter::Chapter;

let chapter = Chapter::new("
我が輩は猫[#犬も検討する]である。名前はまだない。
どこで[生まれた:.]のかとんと[見当:けんとう]がつかぬ。
// コメント行
");

let formatted_string = chapter.get();
assert_eq!(formatted_string, "
 我が輩は猫である。名前はまだない。
 どこで|生まれた《・・・・》のかとんと|見当《けんとう》がつかぬ。");

use naromat::entities::file::TextFile;

let text = TextFile::new("./path/to/source/file").unwrap();
text.format_and_save("./path/to/save.txt");

Contributing

  • If You find any issue, please notice us by open GitHub issue.
  • If You want to change code, please send pull request.

Dependencies

~2.7–4MB
~59K SLoC