rename to little-hesinde
This commit is contained in:
parent
155e09b159
commit
fd7f551726
46
Cargo.lock
generated
46
Cargo.lock
generated
@ -837,6 +837,29 @@ dependencies = [
|
|||||||
"vcpkg",
|
"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]]
|
[[package]]
|
||||||
name = "lock_api"
|
name = "lock_api"
|
||||||
version = "0.4.12"
|
version = "0.4.12"
|
||||||
@ -1354,29 +1377,6 @@ version = "0.1.23"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
|
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]]
|
[[package]]
|
||||||
name = "ryu"
|
name = "ryu"
|
||||||
version = "1.0.17"
|
version = "1.0.17"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[workspace]
|
[workspace]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
members = [
|
members = [
|
||||||
"calibre-db", "rusty-library",
|
"calibre-db", "little-hesinde",
|
||||||
]
|
]
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
|
@ -10,7 +10,7 @@ WORKDIR /work
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN cargo build --release --target=$(arch)-unknown-linux-musl
|
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
|
FROM scratch
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Rusty Library
|
# Little Hesinde
|
||||||
|
|
||||||
I have been a long time user of [cops](https://github.com/seblucas/cops) and its
|
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
|
[fork](https://github.com/mikespub-org/seblucas-cops) in order to access my
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
description = "rusty-library project";
|
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";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rusty-library"
|
name = "little-hesinde"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = { workspace = true }
|
license = { workspace = true }
|
@ -24,7 +24,7 @@ pub async fn handler(author: Author, books: Vec<Book>) -> Result<Response, poem:
|
|||||||
};
|
};
|
||||||
let feed = Feed::create(
|
let feed = Feed::create(
|
||||||
now,
|
now,
|
||||||
&format!("rusty:author:{}", author.id),
|
&format!("little-hesinde:author:{}", author.id),
|
||||||
&author.name,
|
&author.name,
|
||||||
self_link,
|
self_link,
|
||||||
vec![],
|
vec![],
|
@ -34,7 +34,7 @@ pub async fn handler(
|
|||||||
};
|
};
|
||||||
let feed = Feed::create(
|
let feed = Feed::create(
|
||||||
now,
|
now,
|
||||||
"rusty:authors",
|
"little-hesinde:authors",
|
||||||
"All Authors",
|
"All Authors",
|
||||||
self_link,
|
self_link,
|
||||||
vec![],
|
vec![],
|
@ -33,7 +33,14 @@ pub async fn handler(
|
|||||||
title: None,
|
title: None,
|
||||||
count: None,
|
count: None,
|
||||||
};
|
};
|
||||||
let feed = Feed::create(now, "rusty:books", "All Books", self_link, vec![], entries);
|
let feed = Feed::create(
|
||||||
|
now,
|
||||||
|
"little-hesinde:books",
|
||||||
|
"All Books",
|
||||||
|
self_link,
|
||||||
|
vec![],
|
||||||
|
entries,
|
||||||
|
);
|
||||||
let xml = feed.as_xml().map_err(HandlerError::OpdsError)?;
|
let xml = feed.as_xml().map_err(HandlerError::OpdsError)?;
|
||||||
|
|
||||||
Ok(xml
|
Ok(xml
|
@ -25,7 +25,7 @@ pub async fn handler() -> Result<WithContentType<String>, poem::Error> {
|
|||||||
};
|
};
|
||||||
let books_entry = Entry {
|
let books_entry = Entry {
|
||||||
title: "Books".to_string(),
|
title: "Books".to_string(),
|
||||||
id: "rusty:books".to_string(),
|
id: "little-hesinde:books".to_string(),
|
||||||
updated: now,
|
updated: now,
|
||||||
content: Some(Content {
|
content: Some(Content {
|
||||||
media_type: MediaType::Text,
|
media_type: MediaType::Text,
|
||||||
@ -43,7 +43,7 @@ pub async fn handler() -> Result<WithContentType<String>, poem::Error> {
|
|||||||
|
|
||||||
let authors_entry = Entry {
|
let authors_entry = Entry {
|
||||||
title: "Authors".to_string(),
|
title: "Authors".to_string(),
|
||||||
id: "rusty:authors".to_string(),
|
id: "little-hesinde:authors".to_string(),
|
||||||
updated: now,
|
updated: now,
|
||||||
content: Some(Content {
|
content: Some(Content {
|
||||||
media_type: MediaType::Text,
|
media_type: MediaType::Text,
|
||||||
@ -61,7 +61,7 @@ pub async fn handler() -> Result<WithContentType<String>, poem::Error> {
|
|||||||
|
|
||||||
let series_entry = Entry {
|
let series_entry = Entry {
|
||||||
title: "Series".to_string(),
|
title: "Series".to_string(),
|
||||||
id: "rusty:series".to_string(),
|
id: "little-hesinde:series".to_string(),
|
||||||
updated: now,
|
updated: now,
|
||||||
content: Some(Content {
|
content: Some(Content {
|
||||||
media_type: MediaType::Text,
|
media_type: MediaType::Text,
|
||||||
@ -79,7 +79,7 @@ pub async fn handler() -> Result<WithContentType<String>, poem::Error> {
|
|||||||
|
|
||||||
let recents_entry = Entry {
|
let recents_entry = Entry {
|
||||||
title: "Recent Additions".to_string(),
|
title: "Recent Additions".to_string(),
|
||||||
id: "rusty:recentbooks".to_string(),
|
id: "little-hesinde:recentbooks".to_string(),
|
||||||
updated: now,
|
updated: now,
|
||||||
content: Some(Content {
|
content: Some(Content {
|
||||||
media_type: MediaType::Text,
|
media_type: MediaType::Text,
|
||||||
@ -97,8 +97,8 @@ pub async fn handler() -> Result<WithContentType<String>, poem::Error> {
|
|||||||
|
|
||||||
let feed = Feed::create(
|
let feed = Feed::create(
|
||||||
now,
|
now,
|
||||||
"rusty:catalog",
|
"little-hesinde:catalog",
|
||||||
"Rusty-Library",
|
"Little Hesinde",
|
||||||
self_link,
|
self_link,
|
||||||
vec![],
|
vec![],
|
||||||
vec![authors_entry, series_entry, books_entry, recents_entry],
|
vec![authors_entry, series_entry, books_entry, recents_entry],
|
@ -23,7 +23,7 @@ pub async fn handler(recent_books: Vec<Book>) -> Result<Response, poem::Error> {
|
|||||||
};
|
};
|
||||||
let feed = Feed::create(
|
let feed = Feed::create(
|
||||||
now,
|
now,
|
||||||
"rusty:recentbooks",
|
"little-hesinde:recentbooks",
|
||||||
"Recent Books",
|
"Recent Books",
|
||||||
self_link,
|
self_link,
|
||||||
vec![],
|
vec![],
|
@ -31,7 +31,7 @@ pub async fn handler(
|
|||||||
};
|
};
|
||||||
let feed = Feed::create(
|
let feed = Feed::create(
|
||||||
now,
|
now,
|
||||||
"rusty:series",
|
"little-hesinde:series",
|
||||||
"All Series",
|
"All Series",
|
||||||
self_link,
|
self_link,
|
||||||
vec![],
|
vec![],
|
@ -24,7 +24,7 @@ pub async fn handler(series: Series, books: Vec<Book>) -> Result<Response, poem:
|
|||||||
};
|
};
|
||||||
let feed = Feed::create(
|
let feed = Feed::create(
|
||||||
now,
|
now,
|
||||||
&format!("rusty:series:{}", series.id),
|
&format!("little-hesinde:series:{}", series.id),
|
||||||
&series.name,
|
&series.name,
|
||||||
self_link,
|
self_link,
|
||||||
vec![],
|
vec![],
|
@ -1,5 +1,5 @@
|
|||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use rusty_library::{cli::Cli, config::Config};
|
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> {
|
||||||
@ -11,5 +11,5 @@ async fn main() -> Result<(), std::io::Error> {
|
|||||||
let args = Cli::parse();
|
let args = Cli::parse();
|
||||||
let config = Config::load(&args).expect("failed to load configuration");
|
let config = Config::load(&args).expect("failed to load configuration");
|
||||||
|
|
||||||
rusty_library::run(config).await
|
little_hesinde::run(config).await
|
||||||
}
|
}
|
@ -88,7 +88,7 @@ impl From<DbAuthor> for Entry {
|
|||||||
|
|
||||||
Self {
|
Self {
|
||||||
title: value.name.clone(),
|
title: value.name.clone(),
|
||||||
id: format!("rusty:authors:{}", value.id),
|
id: format!("little-hesinde:authors:{}", value.id),
|
||||||
updated: OffsetDateTime::now_utc(),
|
updated: OffsetDateTime::now_utc(),
|
||||||
content: None,
|
content: None,
|
||||||
author: None,
|
author: None,
|
||||||
@ -112,7 +112,7 @@ impl From<Series> for Entry {
|
|||||||
|
|
||||||
Self {
|
Self {
|
||||||
title: value.name.clone(),
|
title: value.name.clone(),
|
||||||
id: format!("rusty:series:{}", value.id),
|
id: format!("little-hesinde:series:{}", value.id),
|
||||||
updated: OffsetDateTime::now_utc(),
|
updated: OffsetDateTime::now_utc(),
|
||||||
content: None,
|
content: None,
|
||||||
author: None,
|
author: None,
|
@ -50,7 +50,7 @@ impl Feed {
|
|||||||
) -> Self {
|
) -> Self {
|
||||||
let author = Author {
|
let author = Author {
|
||||||
name: "Thallian".to_string(),
|
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,
|
email: None,
|
||||||
};
|
};
|
||||||
let mut links = vec![
|
let mut links = vec![
|
@ -6,7 +6,7 @@
|
|||||||
<meta name="color-scheme" content="light dark" />
|
<meta name="color-scheme" content="light dark" />
|
||||||
<link rel="stylesheet" href="/static/pico.min.css" />
|
<link rel="stylesheet" href="/static/pico.min.css" />
|
||||||
<link rel="stylesheet" href="/static/style.css" />
|
<link rel="stylesheet" href="/static/style.css" />
|
||||||
<title>Rusty Library</title>
|
<title>Little Hesinde</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header class="container fixed">
|
<header class="container fixed">
|
||||||
@ -28,7 +28,7 @@
|
|||||||
<footer class="container">
|
<footer class="container">
|
||||||
<hr />
|
<hr />
|
||||||
<small>
|
<small>
|
||||||
<div>From <a href="https://code.vanwa.ch/shu/rusty-library">https://code.vanwa.ch</a>
|
<div>From <a href="https://code.vanwa.ch/shu/little-hesinde">https://code.vanwa.ch</a>
|
||||||
under <a href="https://www.gnu.org/licenses/agpl-3.0.txt">AGPL-3</a></div>
|
under <a href="https://www.gnu.org/licenses/agpl-3.0.txt">AGPL-3</a></div>
|
||||||
<div><a href="/opds">opds feed</a></div>
|
<div><a href="/opds">opds feed</a></div>
|
||||||
</small>
|
</small>
|
Loading…
Reference in New Issue
Block a user