update everything
Some checks are pending
Build Multiarch Container Image / call-reusable-workflow (push) Waiting to run

This commit is contained in:
Sebastian Hugentobler 2025-07-02 08:20:04 +02:00
parent 033a3e2c72
commit 1c95f4391f
Signed by: shu
SSH key fingerprint: SHA256:ppcx6MlixdNZd5EUM1nkHOKoyQYoJwzuQKXM6J/t66M
11 changed files with 1162 additions and 572 deletions

1
.gitignore vendored
View file

@ -1,3 +1,2 @@
target target
result
.direnv .direnv

1623
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -5,9 +5,9 @@ members = [
] ]
[workspace.dependencies] [workspace.dependencies]
serde = "1.0.203" serde = "1.0.219"
thiserror = "1.0.61" thiserror = "1.0.61"
time = { version = "0.3.36", features = ["macros", "serde", "formatting", "parsing" ] } time = { version = "0.3.41", features = ["macros", "serde", "formatting", "parsing" ] }
[workspace.package] [workspace.package]
license = "AGPL-3.0" license = "AGPL-3.0"

View file

@ -1,7 +1,7 @@
[package] [package]
name = "calibre-db" name = "calibre-db"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2024"
license = { workspace = true } license = { workspace = true }
authors = { workspace = true } authors = { workspace = true }
repository = { workspace = true } repository = { workspace = true }
@ -9,9 +9,9 @@ description = "Read data from a calibre library, leveraging its SQLite metadata
[dependencies] [dependencies]
r2d2 = "0.8.10" r2d2 = "0.8.10"
r2d2_sqlite = "0.24.0" r2d2_sqlite = "0.30.0"
rusqlite = { version = "0.31.0", features = ["bundled", "time"] } rusqlite = { version = "0.36.0", features = ["bundled", "time"] }
serde = { workspace = true } serde = { workspace = true }
tempfile = "3.10.1" tempfile = "3.20.0"
thiserror = { workspace = true } thiserror = { workspace = true }
time = { workspace = true } time = { workspace = true }

30
flake.lock generated
View file

@ -6,11 +6,11 @@
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
"lastModified": 1714544767, "lastModified": 1751352216,
"narHash": "sha256-kF1bX+YFMedf1g0PAJYwGUkzh22JmULtj8Rm4IXAQKs=", "narHash": "sha256-dJj8TUoZGj55Ttro37vvFGF2L+xlYNfspQ9u4BfqTFw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "73124e1356bde9411b163d636b39fe4804b7ca45", "rev": "61b4f1e21bd631da91981f1ed74c959d6993f554",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -24,11 +24,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1731533236,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -39,11 +39,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1714253743, "lastModified": 1751271578,
"narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994", "rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -55,11 +55,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1714253743, "lastModified": 1751271578,
"narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994", "rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -79,11 +79,11 @@
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1714501997, "lastModified": 1751296293,
"narHash": "sha256-g31zfxwUFzkPgX0Q8sZLcrqGmOxwjEZ/iqJjNx4fEGo=", "narHash": "sha256-oaGMVdCcI32y6jQ7RE0+CqshZngfI19XnY31eYjdinI=",
"owner": "rust-lang", "owner": "rust-lang",
"repo": "rust-analyzer", "repo": "rust-analyzer",
"rev": "49e502b277a8126a9ad10c802d1aaa3ef1a280ef", "rev": "eaf37e2c98b66ff7f7a0ac04e4cada39e51fde4b",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,5 +1,4 @@
{ {
description = "little-hesinde project";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
@ -17,15 +16,21 @@
system: system:
let let
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
rust = fenix.packages.${system}.stable; fx = fenix.packages.${system};
rust = fx.combine [
(fx.fromToolchainFile {
file = ./rust-toolchain.toml;
sha256 = "sha256-AJ6LX/Q/Er9kS15bn9iflkUwcgYqRQxiOIL2ToVAXaU=";
})
];
buildInputs = [
rust
pkgs.cargo-deny
];
in in
{ {
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = [ buildInputs = buildInputs;
rust.toolchain
pkgs.cargo-deny
pkgs.rust-analyzer
];
}; };
} }
); );

View file

@ -1,7 +1,7 @@
[package] [package]
name = "little-hesinde" name = "little-hesinde"
version = "0.3.1" version = "0.3.1"
edition = "2021" edition = "2024"
license = { workspace = true } license = { workspace = true }
authors = { workspace = true } authors = { workspace = true }
repository = { workspace = true } repository = { workspace = true }
@ -9,25 +9,25 @@ description = "A very simple ebook server for a calibre library, providing a htm
[dependencies] [dependencies]
calibre-db = { path = "../calibre-db/", version = "0.1.0" } calibre-db = { path = "../calibre-db/", version = "0.1.0" }
clap = { version = "4.5.7", features = ["derive", "env"] } clap = { version = "4.5.40", features = ["derive", "env"] }
image = { version = "0.25.1", default-features = false, features = ["jpeg", "rayon"] } image = { version = "0.25.6", default-features = false, features = ["jpeg", "rayon"] }
once_cell = "1.19.0" once_cell = "1.21.3"
poem = { version = "3.0.1", features = ["embed", "static-files"] } poem = { version = "3.0.1", features = ["embed", "static-files"] }
rust-embed = "8.4.0" rust-embed = "8.7.2"
sha2 = "0.10.8" sha2 = "0.10.9"
serde = { workspace = true } serde = { workspace = true }
serde_json = "1.0.118" serde_json = "1.0.140"
serde_with = "3.8.1" serde_with = "3.14.0"
tera = "1.20.0" tera = "1.20.0"
thiserror = { workspace = true } thiserror = { workspace = true }
time = { workspace = true } time = { workspace = true }
tokio = { version = "1.38.0", features = ["signal", "rt-multi-thread", "macros"] } tokio = { version = "1.45.1", features = ["signal", "rt-multi-thread", "macros"] }
tokio-util = "0.7.11" tokio-util = "0.7.15"
tracing = "0.1.40" tracing = "0.1.41"
tracing-subscriber = "0.3.18" tracing-subscriber = "0.3.19"
uuid = { version = "1.9.1", features = ["v4", "fast-rng"] } uuid = { version = "1.17.0", features = ["v4", "fast-rng"] }
quick-xml = { version = "0.34.0", features = ["serialize"] } quick-xml = { version = "0.38.0", features = ["serialize"] }
[build-dependencies] [build-dependencies]
ignore = "0.4.22" ignore = "0.4.23"
zip = { version = "2.1.3", default-features = false, features = ["deflate"] } zip = { version = "4.2.0", default-features = false, features = ["deflate"] }

View file

@ -3,9 +3,6 @@ use little_hesinde::{cli::Cli, config::Config};
#[tokio::main] #[tokio::main]
async fn main() -> Result<(), std::io::Error> { async fn main() -> Result<(), std::io::Error> {
if std::env::var_os("RUST_LOG").is_none() {
std::env::set_var("RUST_LOG", "debug");
}
tracing_subscriber::fmt::init(); tracing_subscriber::fmt::init();
let args = Cli::parse(); let args = Cli::parse();

View file

@ -1,6 +1,6 @@
//! Error handling for OPDS data. //! Error handling for OPDS data.
use std::string::FromUtf8Error; use std::{io, string::FromUtf8Error};
use quick_xml::DeError; use quick_xml::DeError;
use thiserror::Error; use thiserror::Error;
@ -18,4 +18,10 @@ pub enum OpdsError {
/// Error decoding xml as UTF-8. /// Error decoding xml as UTF-8.
#[error("failed to decode as utf-8")] #[error("failed to decode as utf-8")]
Utf8Error(#[from] FromUtf8Error), Utf8Error(#[from] FromUtf8Error),
/// Error parsing OPDS xml structure.
#[error("xml serialization failure")]
XmlSerializationError(#[from] quick_xml::SeError),
/// Error parsing OPDS xml structure.
#[error("xml io failure")]
XmlIoError(#[from] io::Error),
} }

View file

@ -3,9 +3,9 @@
use std::io::Cursor; use std::io::Cursor;
use quick_xml::{ use quick_xml::{
Reader, Writer,
events::{BytesDecl, BytesStart, Event}, events::{BytesDecl, BytesStart, Event},
se::to_string, se::to_string,
Reader, Writer,
}; };
use serde::Serialize; use serde::Serialize;
use time::OffsetDateTime; use time::OffsetDateTime;

4
rust-toolchain.toml Normal file
View file

@ -0,0 +1,4 @@
[toolchain]
channel = "1.85.0"
components = ["rust-src", "rustc", "cargo", "rust-std", "rustfmt", "clippy", "rust-analyzer"]
profile = "minimal"