Skip to content

Commit

Permalink
maintenance: readme, dependencies, repo;
Browse files Browse the repository at this point in the history
  • Loading branch information
codybloemhard committed May 23, 2024
1 parent cdb5326 commit 2ed19e1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "mangatrans"
version = "1.0.1"
version = "1.0.2"
edition = "2021"
license = "GPL-3.0-or-later"
repository = "https://gitlab.com/codybloemhard/mangatrans"
repository = "https://github.com/codybloemhard/mangatrans"
description = "Manga transcription data format and ways to render them into readable formats, statistics and more."

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
toml = "0.5.9"
serde = { version = "1.0.142", features = ["derive"]}
clap = { version = "3.2.16", features = ["derive"] }
either = { version = "1.8.0", features = ["serde"] }
toml = "0.8.13"
serde = { version = "1.0.202", features = ["derive"]}
clap = { version = "4.5.4", features = ["derive"] }
either = { version = "1.12.0", features = ["serde"] }
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Mangatrans

Manga transcription data format and ways to render them into readable formats, statistics and more.

## Goals

The goal of this project is to be able to write manga transcriptions as data and not at the final result.
The program should parse this data and construct various forms of output from this,
such as readables, language reports and statistics.

### Transcription

A transcription should have the literal text from the manga in it.
Along with it, it could contain extra auxiliary information such as the text with the kanjis replaced,
romanized text and translation or notes.
Expand All @@ -15,12 +18,14 @@ The goal of this is to be able to keep it along while reading the manga or be ab
prevent redoing work such as figuring out the spelling of kanji.

### Language Report

An extra tool for learning Japanese while reading and transcribing manga.
Could contain lists such common kanji and their mappings into hiragana.
The introduction of simple frequency statistics and sorted output may reveal patterns in the language
used such as the most common words and kanij, useful for learning.

### Statistics Report

A tool that is of novel interest. Knowing what locations show up most in the manga,
who speaks most, which characters converse lots which each other and other novelties may be
interesting to know for fans of the manga.
Expand All @@ -31,6 +36,7 @@ That's why you might as well transcribe these things as they don't inflate the e
give rise to the opportunity to compute insights that are just really fun.

### Configuration

Transcribing into a data format and not into a format that is to be consumed directly has some
advantages.
Configuration may allow different output to be generated from the data.
Expand All @@ -41,6 +47,7 @@ This is one of the main goals of the project since I just kept changing my forma
beginning of my transcribing journey.

## Feature list

- [x] parse data
- [x] pictures data: location, characters, nr, page
- [x] transcription
Expand Down Expand Up @@ -248,6 +255,7 @@ Sample output generated from chapter 1 of the manga 日常.
- Stop it, she doesn't know we found out yet.

### Sample output of the statistics mode

```
Manga: 日常
Volumes: 1
Expand Down Expand Up @@ -337,8 +345,9 @@ Kanji frequencies:
```

## License

```
Copyright (C) 2022 Cody Bloemhard
Copyright (C) 2024 Cody Bloemhard
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub fn stats_report(mut s: Stats, doc: &mut String){
write_list(&s.spoken_to, "Morae spoken to:", "", doc);
write_list(&s.conversation_pair, "Conversation pairs in morae:", "", doc);

let total_prom: usize = s.conversation_prominence.iter().map(|(_, c)| c).sum();
let total_prom: usize = s.conversation_prominence.values().sum();
let mut prom = s.conversation_prominence.into_iter()
.map(|(s, c)| (s, c as f64 / total_prom as f64))
.collect::<HashMap<_, f64>>();
Expand Down

0 comments on commit 2ed19e1

Please sign in to comment.