Skip to content

Commit 4b8eb80

Browse files
ali5terclaude
andcommitted
Remove pfb submodule; require pfb as an installed dependency
pfb now supports direct execution, so sourcing lib/pfb/pfb.sh is no longer needed. Replace submodule bootstrapping in all scripts with a `command -v pfb` guard that exits with a clear install message if pfb is not on PATH. Remove .gitmodules and the lib/pfb submodule entry. Closes #32 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 55c497f commit 4b8eb80

6 files changed

Lines changed: 17 additions & 40 deletions

File tree

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

CLAUDE.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ publication-library/
2323
│ ├── pdfs/ ← source PDFs (gitignored; may be a symlink to cloud storage)
2424
│ └── indexed/ ← converted output (gitignored)
2525
├── findings/ ← personal research outputs (gitignored)
26-
├── lib/
27-
│ └── pfb/ ← pretty-feedback terminal output library (submodule)
2826
├── LIBRARIAN.md ← AI orientation guide (read this first)
2927
├── CATALOGUE.md ← master cross-collection index (local instance, generated)
3028
├── COLLECTION.md.example ← template for writing COLLECTION.md files

bootstrap.sh

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@
33
#
44
# Reconstructs the complete library from a clean clone:
55
# 1. Validates configuration (.env, LIBRARY_BASE)
6-
# 2. Initialises the lib/pfb submodule if needed
7-
# 3. Creates cloud-storage directories for each collection
8-
# 4. Runs init-symlinks.sh to restore local symlinks
9-
# 5. Downloads PDFs for each collection (skips if already present)
10-
# 6. Converts PDFs to searchable Markdown (skips if already done)
11-
# 7. Regenerates the cross-collection CATALOGUE.md
6+
# 2. Creates cloud-storage directories for each collection
7+
# 3. Runs init-symlinks.sh to restore local symlinks
8+
# 4. Downloads PDFs for each collection (skips if already present)
9+
# 5. Converts PDFs to searchable Markdown (skips if already done)
10+
# 6. Regenerates the cross-collection CATALOGUE.md
1211
#
1312
# Name: bootstrap.sh
1413
# Description: Full reconstruction pipeline for a publication-library instance
1514
# Author: Alister Lewis-Bowen <alister@lewis-bowen.org>
1615
# Usage: ./bootstrap.sh
17-
# Dependencies: bash 4+, python3, pymupdf, git, lib/pfb submodule
16+
# Dependencies: bash 4+, python3, pymupdf, git, pfb
1817
# Exit codes: 0 success, 1 error
1918
#
2019
# Configuration (via .env or environment):
@@ -36,16 +35,12 @@ if [[ -f "${SCRIPT_DIR}/.env" ]]; then
3635
source "${SCRIPT_DIR}/.env"
3736
fi
3837

39-
# Initialise lib/pfb submodule if not already done
40-
if [[ ! -f "${SCRIPT_DIR}/lib/pfb/pfb.sh" ]]; then
41-
echo "Initialising lib/pfb submodule..."
42-
git submodule update --init lib/pfb
38+
# Require pfb for terminal output
39+
if ! command -v pfb &>/dev/null; then
40+
echo "ERROR: pfb is required but not found. Install it from https://github.com/ali5ter/pfb" >&2
41+
exit 1
4342
fi
4443

45-
# Load pfb for terminal output
46-
# shellcheck source=lib/pfb/pfb.sh
47-
source "${SCRIPT_DIR}/lib/pfb/pfb.sh"
48-
4944
# ---------------------------------------------------------------------------
5045
# Validate required configuration
5146
# ---------------------------------------------------------------------------

init-findings.sh

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,9 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
2020
FINDINGS_DIR="${SCRIPT_DIR}/findings"
2121
CLOUD_TYPE="${1:-}"
2222

23-
# Load pfb for terminal output
24-
PFB_SCRIPT="${SCRIPT_DIR}/lib/pfb/pfb.sh"
25-
if [[ -f "${PFB_SCRIPT}" ]]; then
26-
# shellcheck source=lib/pfb/pfb.sh
27-
source "${PFB_SCRIPT}"
28-
elif command -v pfb &>/dev/null; then
29-
: # pfb already on PATH
30-
else
31-
echo "ERROR: pfb not found. Run: git submodule update --init lib/pfb" >&2
23+
# Require pfb for terminal output
24+
if ! command -v pfb &>/dev/null; then
25+
echo "ERROR: pfb is required but not found. Install it from https://github.com/ali5ter/pfb" >&2
3226
exit 1
3327
fi
3428

init-symlinks.sh

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Description: Recreate cloud-storage symlinks for a publication-library instance
1010
# Author: Alister Lewis-Bowen <alister@lewis-bowen.org>
1111
# Usage: ./init-symlinks.sh
12-
# Dependencies: bash 4+, lib/pfb submodule (or pfb on PATH)
12+
# Dependencies: bash 4+, pfb
1313
# Exit codes: 0 success, 1 error
1414
#
1515
# Configuration (via .env or environment):
@@ -43,15 +43,9 @@ if [[ -f "${SCRIPT_DIR}/.env" ]]; then
4343
source "${SCRIPT_DIR}/.env"
4444
fi
4545

46-
# Load pfb for terminal output
47-
PFB_SCRIPT="${SCRIPT_DIR}/lib/pfb/pfb.sh"
48-
if [[ -f "${PFB_SCRIPT}" ]]; then
49-
# shellcheck source=lib/pfb/pfb.sh
50-
source "${PFB_SCRIPT}"
51-
elif command -v pfb &>/dev/null; then
52-
: # pfb already on PATH
53-
else
54-
echo "ERROR: pfb not found. Run: git submodule update --init lib/pfb" >&2
46+
# Require pfb for terminal output
47+
if ! command -v pfb &>/dev/null; then
48+
echo "ERROR: pfb is required but not found. Install it from https://github.com/ali5ter/pfb" >&2
5549
exit 1
5650
fi
5751

lib/pfb

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)