Improve title handling and rework catalog builder

This commit is contained in:
2026-08-25 20:16:42 -06:00
parent d5a05f532f
commit 1b6f7c3bf0
143 changed files with 1188 additions and 1186 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "flix-cli"
version = "0.0.19"
version = "0.0.20"
license-file.workspace = true
description = "CLI for interacting with a flix database"
+10 -1
View File
@@ -50,10 +50,19 @@ pub async fn add(
let fs_slug = overrides
.fs_slug
.unwrap_or_else(|| text::make_fs_slug(&title));
let web_slug = overrides
let mut web_slug = overrides
.web_slug
.unwrap_or_else(|| text::make_web_slug(&title));
const COLLECTION_SUFFIX_TO_REMOVE: &str = "-collection";
if web_slug.ends_with(COLLECTION_SUFFIX_TO_REMOVE) {
web_slug.truncate(
web_slug
.len()
.saturating_sub(COLLECTION_SUFFIX_TO_REMOVE.len()),
);
}
let result: Result<CollectionId, TransactionError<DbErr>> = db
.transaction(|txn| {
let title = title.clone();