Download and process Sabbath School lessons from GitHub
Project description
Sabbath School Lessons Reproducer
A tool to download, format, and reproduce Sabbath School lessons from historical archives for modern use.
Features
- YAML-based configuration for easy customization
- Automatic downloading of lesson content from GitHub
- Reproduction mode for adapting historical lessons to current dates
- Professionally formatted PDF generation with customizable styling
- Support for custom cover designs
Requirements
- Python 3.6+
- Dependencies:
pyyaml,requests,markdown,weasyprint,beautifulsoup4
Installation
From PyPI
pip install sabbath-school-reproducer
From Source
- Clone the repository:
git clone https://github.com/sabbathschool/sabbath-school-reproducer.git
cd sabbath-school-reproducer
- Install the package:
pip install -e .
Quick Start
- Generate a configuration file:
sabbath-school-reproducer --generate-config
-
Edit the generated
config.yamlfile with your desired settings -
Run the downloader:
sabbath-school-reproducer config.yaml
Configuration Options
Create a YAML configuration file with the following options:
# Target output options
year: 2025 # Year for generated lessons
quarter: q2 # Quarter (q1, q2, q3, q4)
language: en # Language code
# File paths
input_file: ./combined_lessons_2025_q2.md # Path for intermediate markdown file
output_file: ./output/sabbath_school_lesson_2025_q2.pdf # Final PDF path
# Optional cover SVG files
front_cover_svg: ./assets/front_cover.svg # Custom front cover
back_cover_svg: ./assets/back_cover.svg # Custom back cover
# Reproduction options
reproduce:
# Original content to adapt
year: 1905 # Historical year to source from
quarter: q2 # Historical quarter to source from
# Lesson selection
start_lesson: 1 # First lesson to include (starting from 1)
stop_lesson: 13 # Last lesson to include (or null for all)
# New date assignment
quarter_start_date: 2025-04-01 # First lesson date (YYYY-MM-DD)
# PDF metadata
title: Sabbath School Lessons # Title for the lesson quarterly
subtitle: Quarter 2, 2025 # Subtitle
publisher: Gospel Sounders # Publisher name
Reproduction Mode
The reproduction feature allows you to adapt historical Sabbath School lessons for modern use:
- Source lessons from a specific historical year and quarter
- Start from any lesson number (e.g., lesson 5)
- Set a limit for the number of lessons to include
- Apply modern dates starting from a specified date
- Generate a PDF that uses current dates while attributing the source material
Example reproduction configuration:
reproduce:
year: 1888 # Source from 1888
quarter: q3 # Third quarter
start_lesson: 3 # Start from lesson 3
stop_lesson: 10 # Include up to lesson 10
quarter_start_date: 2025-04-01 # Use dates starting April 1, 2025
Advanced Usage
Debug Mode
Run with debug output for more detailed information:
sabbath-school-reproducer config.yaml --debug
Debug HTML Only
Generate only the debug HTML without PDF generation:
sabbath-school-reproducer config.yaml --debug-html-only
Custom CSS
You can customize the PDF styling by modifying the CSS in your project:
# In css_styles.py
CSS_TEMPLATE = """
/* Your custom CSS here */
"""
Documentation
The project documentation is available at https://sabbathschool.github.io/sabbath-school-reproducer/.
To build the documentation locally:
# Navigate to docs directory
cd docs
# Build the documentation
make html
# View the documentation
# Open docs/_build/html/index.html in your browser
Development
Version Control
The project includes an automated version checker that increments the version number when building:
./build.sh
Testing
Run tests with:
pytest tests/
Building and Publishing
To build the package:
# Clean and build
./build.sh
To upload to PyPI:
# Upload to PyPI
./upload.sh
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Steps to contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sabbath_school_reproducer-0.1.0.tar.gz.
File metadata
- Download URL: sabbath_school_reproducer-0.1.0.tar.gz
- Upload date:
- Size: 29.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a6c983de764d6dbb8dd63edfe908205172485aa3f7774745b0b75eb830108e8
|
|
| MD5 |
e4c21ce961563cf57e1acd5c57c50301
|
|
| BLAKE2b-256 |
6ad462003b46cc9dafb61896f59f55d48bde767f19088fca84cb7fc0bca3b4bb
|
File details
Details for the file sabbath_school_reproducer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sabbath_school_reproducer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 37.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f69f672bd97c9bfeff16ce878e8455e81afa719ed9252edbc1b347924d11c634
|
|
| MD5 |
467ed5e19460e44954d8ce25dfdeab05
|
|
| BLAKE2b-256 |
3948f0490e06269575f43cf707640d73d4842b9d06f2a873256405f70d032f6a
|