Skip to content

Consolidate sabbath-school-reproducer into monorepo structure #1

Description

@Surgbc

Problem

Currently, the Sabbath School lessons processing workflow is split across multiple repositories:

  1. This repository (lessons): Contains lesson content, OCR processing scripts, and monorepo structure setup
  2. sabbath-school-reproducer: Contains the PDF generation functionality

This separation creates several issues:

  • Fragmented workflow: Users need to manage multiple repositories for a single process
  • Missing functionality: The package.json references apps/* and packages/* workspaces that don't exist
  • Complex dependencies: The reproducer must be installed separately as a PyPI package
  • Inconsistent tooling: Different repositories use different development workflows

Current State

The monorepo structure was partially implemented in commit 096988d with:

  • ✅ Turbo monorepo configuration in package.json
  • ✅ PDF processing scripts for downloading and OCR
  • ✅ Lesson content organization and management
  • ❌ Missing apps/ and packages/ directories
  • ❌ Missing PDF generation capability (exists in separate repo)

Proposed Solution

Integrate the sabbath-school-reproducer functionality into this monorepo as a workspace package:

Structure

lessons/
├── apps/
│   └── lesson-processor/          # Main CLI application
├── packages/
│   ├── pdf-generator/            # Core PDF generation (from reproducer)
│   ├── lesson-parser/            # Lesson content parsing
│   └── shared-config/            # Shared configuration types
├── scripts/                      # Existing OCR and download scripts
├── data/                         # Existing lesson data
└── lessons/                      # Existing lesson content

Benefits

  • Unified workflow: Single repository for complete lesson processing pipeline
  • Simplified development: Unified tooling with Turbo monorepo
  • Better integration: Direct imports between packages
  • Consistent versioning: Single source of truth for releases
  • Improved CI/CD: Unified testing and deployment pipeline

Implementation Plan

  1. Create workspace structure: Add missing apps/ and packages/ directories
  2. Migrate reproducer code: Move sabbath-school-reproducer into packages/pdf-generator/
  3. Update dependencies: Integrate WeasyPrint and other PDF dependencies
  4. Unify configuration: Ensure config.yaml format compatibility
  5. Update scripts: Modify existing scripts to use local packages
  6. Documentation: Update README with unified workflow instructions

Expected Outcome

A complete lesson processing monorepo where users can:

  1. Download historical lesson PDFs
  2. Process them through OCR to markdown
  3. Generate new PDFs from markdown content
  4. Deploy lesson indexes to GitHub Pages

All within a single, well-organized repository structure.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions