Auto-derive symlinks and add bootstrap.sh reconstruction pipeline#23
Merged
Conversation
Issue #22 β init-symlinks.sh: - Replace static LINKS array with dynamic discovery from collections/*/ - Naming convention: NAME/pdfs β LIBRARY_BASE/NAME, NAME/indexed β LIBRARY_BASE/library-indexed/NAME, findings β LIBRARY_BASE/library-findings - LINKS array defined in .env takes precedence over auto-discovery Issue #21 β bootstrap.sh: - Full reconstruction pipeline from a clean clone - Validates .env and LIBRARY_BASE, initialises lib/pfb submodule if needed - Creates cloud-storage directories, runs init-symlinks.sh - Downloads PDFs per collection using Source URL from COLLECTION.md - Converts PDFs to Markdown, regenerates CATALOGUE.md - Idempotent: skips collections already downloaded or converted Docs: - Update CLAUDE.md project layout and common commands - Update README.md with one-command bootstrap workflow and symlink override docs - Update AGENTS.md, GEMINI.md, .github/copilot-instructions.md Tools sections Closes #21, closes #22 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
init-symlinks.shβ replaces the staticLINKSarray with dynamic discovery fromcollections/*/. Uses the naming convention built into the template:NAME/pdfs β LIBRARY_BASE/NAME,NAME/indexed β LIBRARY_BASE/library-indexed/NAME,findings β LIBRARY_BASE/library-findings. Instances that need non-standard paths can define aLINKSarray in.envto override.bootstrap.shβ new full reconstruction pipeline. From a clean clone with.envconfigured, one command creates cloud directories, restores symlinks, downloads PDFs (Source URL fromCOLLECTION.md), converts to Markdown, and regeneratesCATALOGUE.md. Fully idempotent.bootstrap.shandinit-symlinks.shin their Tools sections.README.mdandCLAUDE.mdupdated with the new one-command setup workflow.Test plan
bash -n init-symlinks.shβ no syntax errorsbash -n bootstrap.shβ no syntax errorscollections/subdirs,init-symlinks.shwithLIBRARY_BASEset warns and exits cleanlyinit-symlinks.shauto-derives the correct link pairsLINKSarray in.envtakes precedence over auto-discoverybootstrap.shexits with a clear error if.envis missing orLIBRARY_BASEis unsetbootstrap.shskips collections with no Source URL inCOLLECTION.mdbootstrap.shon a fully-built library skips all download and convert stepsCloses #21, closes #22
π€ Generated with Claude Code