From fd7f55172601a86a63f0b25bdb81e04363df9563 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Fri, 10 May 2024 17:31:27 +0200 Subject: [PATCH] rename to little-hesinde --- Cargo.lock | 46 +++++++++---------- Cargo.toml | 2 +- Containerfile | 2 +- README.md | 2 +- flake.nix | 2 +- {rusty-library => little-hesinde}/Cargo.toml | 2 +- .../src/app_state.rs | 0 {rusty-library => little-hesinde}/src/cli.rs | 0 .../src/config.rs | 0 .../src/data/book.rs | 0 .../src/handlers/author.rs | 0 .../src/handlers/authors.rs | 0 .../src/handlers/books.rs | 0 .../src/handlers/cover.rs | 0 .../src/handlers/download.rs | 0 .../src/handlers/error.rs | 0 .../src/handlers/html/author.rs | 0 .../src/handlers/html/authors.rs | 0 .../src/handlers/html/books.rs | 0 .../src/handlers/html/recent.rs | 0 .../src/handlers/html/series.rs | 0 .../src/handlers/html/series_single.rs | 0 .../src/handlers/opds/author.rs | 2 +- .../src/handlers/opds/authors.rs | 2 +- .../src/handlers/opds/books.rs | 9 +++- .../src/handlers/opds/feed.rs | 12 ++--- .../src/handlers/opds/recent.rs | 2 +- .../src/handlers/opds/series.rs | 2 +- .../src/handlers/opds/series_single.rs | 2 +- .../src/handlers/paginated.rs | 0 .../src/handlers/recent.rs | 0 .../src/handlers/series.rs | 0 .../src/handlers/series_single.rs | 0 {rusty-library => little-hesinde}/src/lib.rs | 0 {rusty-library => little-hesinde}/src/main.rs | 4 +- .../src/opds/author.rs | 0 .../src/opds/content.rs | 0 .../src/opds/entry.rs | 4 +- .../src/opds/error.rs | 0 .../src/opds/feed.rs | 2 +- .../src/opds/link.rs | 0 .../src/opds/media_type.rs | 0 .../src/opds/relation.rs | 0 .../src/templates.rs | 0 .../static/pico.min.css | 0 .../static/style.css | 0 .../templates/authors.html | 0 .../templates/base.html | 4 +- .../templates/book_card.html | 0 .../templates/book_list.html | 0 .../templates/books.html | 0 .../templates/series.html | 0 52 files changed, 54 insertions(+), 47 deletions(-) rename {rusty-library => little-hesinde}/Cargo.toml (96%) rename {rusty-library => little-hesinde}/src/app_state.rs (100%) rename {rusty-library => little-hesinde}/src/cli.rs (100%) rename {rusty-library => little-hesinde}/src/config.rs (100%) rename {rusty-library => little-hesinde}/src/data/book.rs (100%) rename {rusty-library => little-hesinde}/src/handlers/author.rs (100%) rename {rusty-library => little-hesinde}/src/handlers/authors.rs (100%) rename {rusty-library => little-hesinde}/src/handlers/books.rs (100%) rename {rusty-library => little-hesinde}/src/handlers/cover.rs (100%) rename {rusty-library => little-hesinde}/src/handlers/download.rs (100%) rename {rusty-library => little-hesinde}/src/handlers/error.rs (100%) rename {rusty-library => little-hesinde}/src/handlers/html/author.rs (100%) rename {rusty-library => little-hesinde}/src/handlers/html/authors.rs (100%) rename {rusty-library => little-hesinde}/src/handlers/html/books.rs (100%) rename {rusty-library => little-hesinde}/src/handlers/html/recent.rs (100%) rename {rusty-library => little-hesinde}/src/handlers/html/series.rs (100%) rename {rusty-library => little-hesinde}/src/handlers/html/series_single.rs (100%) rename {rusty-library => little-hesinde}/src/handlers/opds/author.rs (94%) rename {rusty-library => little-hesinde}/src/handlers/opds/authors.rs (97%) rename {rusty-library => little-hesinde}/src/handlers/opds/books.rs (88%) rename {rusty-library => little-hesinde}/src/handlers/opds/feed.rs (91%) rename {rusty-library => little-hesinde}/src/handlers/opds/recent.rs (96%) rename {rusty-library => little-hesinde}/src/handlers/opds/series.rs (97%) rename {rusty-library => little-hesinde}/src/handlers/opds/series_single.rs (94%) rename {rusty-library => little-hesinde}/src/handlers/paginated.rs (100%) rename {rusty-library => little-hesinde}/src/handlers/recent.rs (100%) rename {rusty-library => little-hesinde}/src/handlers/series.rs (100%) rename {rusty-library => little-hesinde}/src/handlers/series_single.rs (100%) rename {rusty-library => little-hesinde}/src/lib.rs (100%) rename {rusty-library => little-hesinde}/src/main.rs (79%) rename {rusty-library => little-hesinde}/src/opds/author.rs (100%) rename {rusty-library => little-hesinde}/src/opds/content.rs (100%) rename {rusty-library => little-hesinde}/src/opds/entry.rs (97%) rename {rusty-library => little-hesinde}/src/opds/error.rs (100%) rename {rusty-library => little-hesinde}/src/opds/feed.rs (97%) rename {rusty-library => little-hesinde}/src/opds/link.rs (100%) rename {rusty-library => little-hesinde}/src/opds/media_type.rs (100%) rename {rusty-library => little-hesinde}/src/opds/relation.rs (100%) rename {rusty-library => little-hesinde}/src/templates.rs (100%) rename {rusty-library => little-hesinde}/static/pico.min.css (100%) rename {rusty-library => little-hesinde}/static/style.css (100%) rename {rusty-library => little-hesinde}/templates/authors.html (100%) rename {rusty-library => little-hesinde}/templates/base.html (90%) rename {rusty-library => little-hesinde}/templates/book_card.html (100%) rename {rusty-library => little-hesinde}/templates/book_list.html (100%) rename {rusty-library => little-hesinde}/templates/books.html (100%) rename {rusty-library => little-hesinde}/templates/series.html (100%) diff --git a/Cargo.lock b/Cargo.lock index defc78b..652bb5f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -837,6 +837,29 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "little-hesinde" +version = "0.1.0" +dependencies = [ + "calibre-db", + "clap", + "once_cell", + "poem", + "quick-xml", + "rust-embed", + "serde", + "serde_json", + "serde_with", + "tera", + "thiserror", + "time", + "tokio", + "tokio-util", + "tracing", + "tracing-subscriber", + "uuid", +] + [[package]] name = "lock_api" version = "0.4.12" @@ -1354,29 +1377,6 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" -[[package]] -name = "rusty-library" -version = "0.1.0" -dependencies = [ - "calibre-db", - "clap", - "once_cell", - "poem", - "quick-xml", - "rust-embed", - "serde", - "serde_json", - "serde_with", - "tera", - "thiserror", - "time", - "tokio", - "tokio-util", - "tracing", - "tracing-subscriber", - "uuid", -] - [[package]] name = "ryu" version = "1.0.17" diff --git a/Cargo.toml b/Cargo.toml index ac2af26..96444e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [workspace] resolver = "2" members = [ - "calibre-db", "rusty-library", + "calibre-db", "little-hesinde", ] [workspace.dependencies] diff --git a/Containerfile b/Containerfile index 6bb9360..97352b4 100644 --- a/Containerfile +++ b/Containerfile @@ -10,7 +10,7 @@ WORKDIR /work COPY . . RUN cargo build --release --target=$(arch)-unknown-linux-musl -RUN cp "./target/$(arch)-unknown-linux-musl/release/rusty-library" /app +RUN cp "./target/$(arch)-unknown-linux-musl/release/little-hesinde" /app FROM scratch diff --git a/README.md b/README.md index 6a7aed0..1540da2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Rusty Library +# Little Hesinde I have been a long time user of [cops](https://github.com/seblucas/cops) and its [fork](https://github.com/mikespub-org/seblucas-cops) in order to access my diff --git a/flake.nix b/flake.nix index 68b8983..da1dc6f 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "rusty-library project"; + description = "little-hesinde project"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; diff --git a/rusty-library/Cargo.toml b/little-hesinde/Cargo.toml similarity index 96% rename from rusty-library/Cargo.toml rename to little-hesinde/Cargo.toml index de77660..ef4fad8 100644 --- a/rusty-library/Cargo.toml +++ b/little-hesinde/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "rusty-library" +name = "little-hesinde" version = "0.1.0" edition = "2021" license = { workspace = true } diff --git a/rusty-library/src/app_state.rs b/little-hesinde/src/app_state.rs similarity index 100% rename from rusty-library/src/app_state.rs rename to little-hesinde/src/app_state.rs diff --git a/rusty-library/src/cli.rs b/little-hesinde/src/cli.rs similarity index 100% rename from rusty-library/src/cli.rs rename to little-hesinde/src/cli.rs diff --git a/rusty-library/src/config.rs b/little-hesinde/src/config.rs similarity index 100% rename from rusty-library/src/config.rs rename to little-hesinde/src/config.rs diff --git a/rusty-library/src/data/book.rs b/little-hesinde/src/data/book.rs similarity index 100% rename from rusty-library/src/data/book.rs rename to little-hesinde/src/data/book.rs diff --git a/rusty-library/src/handlers/author.rs b/little-hesinde/src/handlers/author.rs similarity index 100% rename from rusty-library/src/handlers/author.rs rename to little-hesinde/src/handlers/author.rs diff --git a/rusty-library/src/handlers/authors.rs b/little-hesinde/src/handlers/authors.rs similarity index 100% rename from rusty-library/src/handlers/authors.rs rename to little-hesinde/src/handlers/authors.rs diff --git a/rusty-library/src/handlers/books.rs b/little-hesinde/src/handlers/books.rs similarity index 100% rename from rusty-library/src/handlers/books.rs rename to little-hesinde/src/handlers/books.rs diff --git a/rusty-library/src/handlers/cover.rs b/little-hesinde/src/handlers/cover.rs similarity index 100% rename from rusty-library/src/handlers/cover.rs rename to little-hesinde/src/handlers/cover.rs diff --git a/rusty-library/src/handlers/download.rs b/little-hesinde/src/handlers/download.rs similarity index 100% rename from rusty-library/src/handlers/download.rs rename to little-hesinde/src/handlers/download.rs diff --git a/rusty-library/src/handlers/error.rs b/little-hesinde/src/handlers/error.rs similarity index 100% rename from rusty-library/src/handlers/error.rs rename to little-hesinde/src/handlers/error.rs diff --git a/rusty-library/src/handlers/html/author.rs b/little-hesinde/src/handlers/html/author.rs similarity index 100% rename from rusty-library/src/handlers/html/author.rs rename to little-hesinde/src/handlers/html/author.rs diff --git a/rusty-library/src/handlers/html/authors.rs b/little-hesinde/src/handlers/html/authors.rs similarity index 100% rename from rusty-library/src/handlers/html/authors.rs rename to little-hesinde/src/handlers/html/authors.rs diff --git a/rusty-library/src/handlers/html/books.rs b/little-hesinde/src/handlers/html/books.rs similarity index 100% rename from rusty-library/src/handlers/html/books.rs rename to little-hesinde/src/handlers/html/books.rs diff --git a/rusty-library/src/handlers/html/recent.rs b/little-hesinde/src/handlers/html/recent.rs similarity index 100% rename from rusty-library/src/handlers/html/recent.rs rename to little-hesinde/src/handlers/html/recent.rs diff --git a/rusty-library/src/handlers/html/series.rs b/little-hesinde/src/handlers/html/series.rs similarity index 100% rename from rusty-library/src/handlers/html/series.rs rename to little-hesinde/src/handlers/html/series.rs diff --git a/rusty-library/src/handlers/html/series_single.rs b/little-hesinde/src/handlers/html/series_single.rs similarity index 100% rename from rusty-library/src/handlers/html/series_single.rs rename to little-hesinde/src/handlers/html/series_single.rs diff --git a/rusty-library/src/handlers/opds/author.rs b/little-hesinde/src/handlers/opds/author.rs similarity index 94% rename from rusty-library/src/handlers/opds/author.rs rename to little-hesinde/src/handlers/opds/author.rs index c79af76..69fbb2a 100644 --- a/rusty-library/src/handlers/opds/author.rs +++ b/little-hesinde/src/handlers/opds/author.rs @@ -24,7 +24,7 @@ pub async fn handler(author: Author, books: Vec) -> Result Result, poem::Error> { }; let books_entry = Entry { title: "Books".to_string(), - id: "rusty:books".to_string(), + id: "little-hesinde:books".to_string(), updated: now, content: Some(Content { media_type: MediaType::Text, @@ -43,7 +43,7 @@ pub async fn handler() -> Result, poem::Error> { let authors_entry = Entry { title: "Authors".to_string(), - id: "rusty:authors".to_string(), + id: "little-hesinde:authors".to_string(), updated: now, content: Some(Content { media_type: MediaType::Text, @@ -61,7 +61,7 @@ pub async fn handler() -> Result, poem::Error> { let series_entry = Entry { title: "Series".to_string(), - id: "rusty:series".to_string(), + id: "little-hesinde:series".to_string(), updated: now, content: Some(Content { media_type: MediaType::Text, @@ -79,7 +79,7 @@ pub async fn handler() -> Result, poem::Error> { let recents_entry = Entry { title: "Recent Additions".to_string(), - id: "rusty:recentbooks".to_string(), + id: "little-hesinde:recentbooks".to_string(), updated: now, content: Some(Content { media_type: MediaType::Text, @@ -97,8 +97,8 @@ pub async fn handler() -> Result, poem::Error> { let feed = Feed::create( now, - "rusty:catalog", - "Rusty-Library", + "little-hesinde:catalog", + "Little Hesinde", self_link, vec![], vec![authors_entry, series_entry, books_entry, recents_entry], diff --git a/rusty-library/src/handlers/opds/recent.rs b/little-hesinde/src/handlers/opds/recent.rs similarity index 96% rename from rusty-library/src/handlers/opds/recent.rs rename to little-hesinde/src/handlers/opds/recent.rs index d2e0fa2..8e36691 100644 --- a/rusty-library/src/handlers/opds/recent.rs +++ b/little-hesinde/src/handlers/opds/recent.rs @@ -23,7 +23,7 @@ pub async fn handler(recent_books: Vec) -> Result { }; let feed = Feed::create( now, - "rusty:recentbooks", + "little-hesinde:recentbooks", "Recent Books", self_link, vec![], diff --git a/rusty-library/src/handlers/opds/series.rs b/little-hesinde/src/handlers/opds/series.rs similarity index 97% rename from rusty-library/src/handlers/opds/series.rs rename to little-hesinde/src/handlers/opds/series.rs index afe31a7..9aeedf2 100644 --- a/rusty-library/src/handlers/opds/series.rs +++ b/little-hesinde/src/handlers/opds/series.rs @@ -31,7 +31,7 @@ pub async fn handler( }; let feed = Feed::create( now, - "rusty:series", + "little-hesinde:series", "All Series", self_link, vec![], diff --git a/rusty-library/src/handlers/opds/series_single.rs b/little-hesinde/src/handlers/opds/series_single.rs similarity index 94% rename from rusty-library/src/handlers/opds/series_single.rs rename to little-hesinde/src/handlers/opds/series_single.rs index ad8e5cb..20d68ba 100644 --- a/rusty-library/src/handlers/opds/series_single.rs +++ b/little-hesinde/src/handlers/opds/series_single.rs @@ -24,7 +24,7 @@ pub async fn handler(series: Series, books: Vec) -> Result Result<(), std::io::Error> { @@ -11,5 +11,5 @@ async fn main() -> Result<(), std::io::Error> { let args = Cli::parse(); let config = Config::load(&args).expect("failed to load configuration"); - rusty_library::run(config).await + little_hesinde::run(config).await } diff --git a/rusty-library/src/opds/author.rs b/little-hesinde/src/opds/author.rs similarity index 100% rename from rusty-library/src/opds/author.rs rename to little-hesinde/src/opds/author.rs diff --git a/rusty-library/src/opds/content.rs b/little-hesinde/src/opds/content.rs similarity index 100% rename from rusty-library/src/opds/content.rs rename to little-hesinde/src/opds/content.rs diff --git a/rusty-library/src/opds/entry.rs b/little-hesinde/src/opds/entry.rs similarity index 97% rename from rusty-library/src/opds/entry.rs rename to little-hesinde/src/opds/entry.rs index 2c601dc..6686990 100644 --- a/rusty-library/src/opds/entry.rs +++ b/little-hesinde/src/opds/entry.rs @@ -88,7 +88,7 @@ impl From for Entry { Self { title: value.name.clone(), - id: format!("rusty:authors:{}", value.id), + id: format!("little-hesinde:authors:{}", value.id), updated: OffsetDateTime::now_utc(), content: None, author: None, @@ -112,7 +112,7 @@ impl From for Entry { Self { title: value.name.clone(), - id: format!("rusty:series:{}", value.id), + id: format!("little-hesinde:series:{}", value.id), updated: OffsetDateTime::now_utc(), content: None, author: None, diff --git a/rusty-library/src/opds/error.rs b/little-hesinde/src/opds/error.rs similarity index 100% rename from rusty-library/src/opds/error.rs rename to little-hesinde/src/opds/error.rs diff --git a/rusty-library/src/opds/feed.rs b/little-hesinde/src/opds/feed.rs similarity index 97% rename from rusty-library/src/opds/feed.rs rename to little-hesinde/src/opds/feed.rs index 022f1cc..bd8d28b 100644 --- a/rusty-library/src/opds/feed.rs +++ b/little-hesinde/src/opds/feed.rs @@ -50,7 +50,7 @@ impl Feed { ) -> Self { let author = Author { name: "Thallian".to_string(), - uri: "https://code.vanwa.ch/shu/rusty-library".to_string(), + uri: "https://code.vanwa.ch/shu/little-hesinde".to_string(), email: None, }; let mut links = vec![ diff --git a/rusty-library/src/opds/link.rs b/little-hesinde/src/opds/link.rs similarity index 100% rename from rusty-library/src/opds/link.rs rename to little-hesinde/src/opds/link.rs diff --git a/rusty-library/src/opds/media_type.rs b/little-hesinde/src/opds/media_type.rs similarity index 100% rename from rusty-library/src/opds/media_type.rs rename to little-hesinde/src/opds/media_type.rs diff --git a/rusty-library/src/opds/relation.rs b/little-hesinde/src/opds/relation.rs similarity index 100% rename from rusty-library/src/opds/relation.rs rename to little-hesinde/src/opds/relation.rs diff --git a/rusty-library/src/templates.rs b/little-hesinde/src/templates.rs similarity index 100% rename from rusty-library/src/templates.rs rename to little-hesinde/src/templates.rs diff --git a/rusty-library/static/pico.min.css b/little-hesinde/static/pico.min.css similarity index 100% rename from rusty-library/static/pico.min.css rename to little-hesinde/static/pico.min.css diff --git a/rusty-library/static/style.css b/little-hesinde/static/style.css similarity index 100% rename from rusty-library/static/style.css rename to little-hesinde/static/style.css diff --git a/rusty-library/templates/authors.html b/little-hesinde/templates/authors.html similarity index 100% rename from rusty-library/templates/authors.html rename to little-hesinde/templates/authors.html diff --git a/rusty-library/templates/base.html b/little-hesinde/templates/base.html similarity index 90% rename from rusty-library/templates/base.html rename to little-hesinde/templates/base.html index 4219f2d..b0c38cf 100644 --- a/rusty-library/templates/base.html +++ b/little-hesinde/templates/base.html @@ -6,7 +6,7 @@ - Rusty Library + Little Hesinde
@@ -28,7 +28,7 @@