| Crates.io | naromat |
| lib.rs | naromat |
| version | 0.3.1 |
| created_at | 2019-12-22 01:53:00.677905+00 |
| updated_at | 2021-04-05 14:12:03.979648+00 |
| description | Convert text to narou novel format |
| homepage | |
| repository | https://github.com/Hitomaru/naromat |
| max_upload_size | |
| id | 191371 |
| size | 1,462,935 |
Naromat is a library crate that converts text file from specific typesetting format to Shosetsuka ni Naro(https://syosetu.com/) format.
cargo install naromatnaromat -huse 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");