From 98325027c731af530d6055164d51070480b7f0cf Mon Sep 17 00:00:00 2001 From: Zykino Date: Sun, 15 Sep 2019 12:49:34 +0200 Subject: [PATCH] Add first documentation of this project --- Cargo.toml | 4 ++++ README.md | 30 +++++++++++++++++++++++++++++- src/main.rs | 4 ++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ed394b0..a0bc754 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,10 @@ name = "comic-book-binder" version = "0.1.0" authors = ["Zykino "] +description = "A helper to manage your comic books and others sorted list of files." +license = "GPL-3.0-or-later" +keywords = ["comic book archive", "cbr", "cbt", "cbz"] +categories = ["command-line-utilities", "filesystem", "value-formatting"] edition = "2018" [lib] diff --git a/README.md b/README.md index 52f597a..ba897c2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,30 @@ -# comic-book-binder +# comic-book-binder (cbb) +This software aim at helping you manage your comic book library. It take care of renaming each page of a book so they are in the same order no matter the operating system or software reading the files. To achieve this, the "number" part of the page's filename is padded with 0, this way we do not have strange sort like `1.png, 10.png, 11.png, 100.png, 2.png, 20.png,…` +## State +The software is still in early developments. I'm using it as a way to introduce myself to the rust programming language. Do not hesitate to give me feedback on how to write more idiomatic rust code. + +# Usage +The simplest way to use this program is to simply call it on a comic folder. This way it will ensure the pages are formatted with just the right number of leading 0 to pad the number part of the page. +``` +cbb comic/ +``` + +You may want to customize the number of leading 0, it is useful when you plan on adding more pages later. +``` +cbb comic/ --pad=3 +``` + +# TODO +* [ ] Add tests: I'm not used to create tests on projects (unit & integration). +* [ ] Add tests: HELP WANTED: how can I tests operations on the filesystem? +* [ ] Add some quality of life features: + * [ ] Dry-run: Show how the files will be changed without modifying anything + * [ ] Recursivity: user select a "library" folder for which each sub-folder is considered to be a comic book (or an other library) + * [ ] Prefix: let the user set the prefix of the pages: Useful when the name contains a number: "Name-Season5-chapter02-page10.png" => prefix = "Name-Season5-chapter02-page". + * [ ] Deduce the prefix from the file name (nice to have, not sure it is used that often) +* [ ] Integrate an archive crate to be able to open/create `.cba`, `.cbr` `.cbt`, or `.cbz` archives. +* [ ] Add documentation +* [ ] Maybe integrate rayon (test with a benchmark if it really help: part 1 of the tool is listing the files, part 2 is based on `os::rename` operations). + +Also I saw on Wikipedia that it is possible to include metadata such as [artists, story information, table of contents or even a separate text layer for comic book translations](https://en.wikipedia.org/wiki/Comic_book_archive). If the feature is requested I could check if the different way to include this metadata are well spread. This however will not be discussed before (almost) releasing the 1.0. diff --git a/src/main.rs b/src/main.rs index 3e81d2b..7d19bb3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,7 @@ +//! This software aim at helping you generate comic book archive. You can use it to generate comic +//! book archive, or just making sure your list of files will be ordered the same way on any +//! operating system. + use cbb; use cbb::ComicBook; use cbb::Opt;