naromat

Crates.ionaromat
lib.rsnaromat
version0.3.1
sourcesrc
created_at2019-12-22 01:53:00.677905
updated_at2021-04-05 14:12:03.979648
descriptionConvert text to narou novel format
homepage
repositoryhttps://github.com/Hitomaru/naromat
max_upload_size
id191371
size1,462,935
Hitomaru Horino (Hitomaru)

documentation

https://hitomaru.github.io/naromat/

README

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.
Commit count: 13

cargo fmt