Skip to content

Commit d9e6de2

Browse files
fix: release 0.4.0 packaging and SRU improvements
- Added IDE/AI folders to .distignore (.gemini, .qoder, .claude, .vscode, .idea, .cursor) - Added loose zip files and migrations/ folder to exclusions - Removed AFTER clause from migration for MySQL compatibility - Normalize whitespace after stripping MARC-8 control characters in SRU titles
1 parent 48cf684 commit d9e6de2

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

.distignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88
.gitignore
99
.gitattributes
1010

11+
# IDE and AI assistant folders
12+
.gemini/
13+
.qoder/
14+
.claude/
15+
.vscode/
16+
.idea/
17+
.cursor/
18+
1119
# Development dependencies (node_modules excluded, vendor INCLUDED for production)
1220
node_modules/
1321
frontend/node_modules/
@@ -40,6 +48,16 @@ CLAUDE.md
4048

4149
# Release artifacts (don't package previous releases)
4250
releases/
51+
*.zip
52+
!storage/plugins/*.zip
53+
54+
# Build script outputs
55+
build-tmp/
56+
migrations/
57+
58+
# Development documentation
59+
updater.md
60+
.distignore
4361

4462
# Temporary files
4563
*.bak

installer/database/migrations/migrate_0.4.0.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ CREATE TABLE IF NOT EXISTS `update_logs` (
4040
-- Add columns to track privacy policy acceptance
4141
-- ============================================================
4242

43-
ALTER TABLE `utenti` ADD COLUMN `privacy_accettata` TINYINT(1) NOT NULL DEFAULT 0 AFTER `email_verificata`;
43+
ALTER TABLE `utenti` ADD COLUMN `privacy_accettata` TINYINT(1) NOT NULL DEFAULT 0;
4444

45-
ALTER TABLE `utenti` ADD COLUMN `data_accettazione_privacy` DATETIME DEFAULT NULL AFTER `privacy_accettata`;
45+
ALTER TABLE `utenti` ADD COLUMN `data_accettazione_privacy` DATETIME DEFAULT NULL;
4646

47-
ALTER TABLE `utenti` ADD COLUMN `privacy_policy_version` VARCHAR(20) DEFAULT NULL AFTER `data_accettazione_privacy`;
47+
ALTER TABLE `utenti` ADD COLUMN `privacy_policy_version` VARCHAR(20) DEFAULT NULL;
4848

4949
-- ============================================================
5050
-- 2. PERSISTENT SESSIONS TABLE (Database-backed "Remember Me")

storage/plugins/z39-server/classes/SruClient.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,9 @@ private function parseMarcXml(DOMXPath $xpath): ?array
300300
// These are used in library cataloging but shouldn't display to users
301301
$book['title'] = preg_replace('/[\x88\x89\x98\x9C]/', '', $book['title']);
302302
$book['subtitle'] = preg_replace('/[\x88\x89\x98\x9C]/', '', $book['subtitle']);
303+
// Normalize whitespace (collapse multiple spaces into one)
304+
$book['title'] = trim(preg_replace('/\s+/', ' ', $book['title']));
305+
$book['subtitle'] = trim(preg_replace('/\s+/', ' ', $book['subtitle']));
303306

304307
// Author (100 $a) and additional authors (700 $a)
305308
$author = $getSubfield('100', 'a');
@@ -450,6 +453,8 @@ private function parseDublinCore(DOMXPath $xpath): ?array
450453
$book['title'] = $getDcElement('title') ?? '';
451454
// Remove MARC-8 control characters (NSB/NSE non-sorting markers, etc.)
452455
$book['title'] = preg_replace('/[\x88\x89\x98\x9C]/', '', $book['title']);
456+
// Normalize whitespace (collapse multiple spaces into one)
457+
$book['title'] = trim(preg_replace('/\s+/', ' ', $book['title']));
453458

454459
// Creators/Authors
455460
$creators = $getAllDcElements('creator');

0 commit comments

Comments
 (0)