Skip to main content

Sabbath School Lessons

This module is part of a project to improve upon the work done by Adventist Archives in digitizing old Sabbath School Lessons. Its purpose is to produce output documents in multiple formats for use on the web, on phone applications, and for printing, which are free from the OCR errors that exist in the documents scanned and OCRed by Adventist Archives. Furthermore, it enables the reproduction of an old lesson for a new quarter at the click of a button.

Contents

  1. The Process
  2. Features
  3. Requirements
  4. Usage
  5. Contributing

The Process

Text documents extracted from the PDFs available from Adventist Archives are available at ssl-pdfs. These documents should be proofread to remove OCR errors and add a little formatting:

##

Original Title

### SABBATH SCHOOL LESSONS ON THE ACTS OF THE APOSTLES

#### For Senior Classes

#### SECOND QUARTER, 1898

....
## LESSON 1. — JOURNEYING TO JERUSALEM.
(Acts 21:1-17.)
April 2, 1898

<start_numbering>
question 1
question 2
...
<stop_numbering>

### Notes
<start_numbering>
note 1
note 2
...
<stop_numbering>

Formatting Guidelines:

  1. Start the document with ## followed by a blank line
  2. For sections which appear before the first lesson, for titles or for centering big text use heading 3 (### followed by space before the title). For smaller centered text use heading 4 ####. Try all possible headings (excluding heading1 and heading2) to see what fits your need.
  3. Use heading 2 on all lesson sections
  4. After the lesson title line, add both the lesson texts and date. For now, only a single date in the format April 2, 1898 is supported. The order of the date and texts does not matter as long as they are in adjacent lines.
  5. Use heading 3 for all notes sections
  6. In case extra material such as images are added, these will appear each on its own page.
  7. (Optionally) use the <start_numbering> and <stop_numbering> tags between sections which you would like to turn into an ordered list and have numbers added, if the lines are not numbered already.

Features

  • Converts markdown to PDF
  • Generates a table of contents
  • Adds page numbers
  • Supports multiple languages (currently English and Swahili)
  • Handles images and creates full-page image spreads
  • Creates a cover page
  • Supports custom styling and formatting

Requirements

  • Python 3.x
  • Required Python libraries: reportlab, BeautifulSoup, markdown, PyPDF2, Pillow

Usage

  1. Prepare your markdown file according to the specified format (see the process).
  2. Install the package:
pip install sabbath-school-lessons

Numbering

This section is only needed if you need to fix lists in your markdown files:

from sabbath_school_lessons import markdown
markdown.number_lines_in_md("input.md", "output.md")  # the output file can be set to be the same as the input

Generating PDFs

from sabbath_school_lessons import markdown_to_pdf
markdown2pdf = markdown_to_pdf("english.md", quarter="Quarter 4, 2024", lesson_title="Acts of the Apostles", start_date="October 5, 2024", lesson_book="Chapters 21:1 - 28:31")

# lesson_book is optional. It is only used for lessons which are based on a book

example of output file name: SSL20241001-04-ACTS_OF_THE_APOSTLES.pdf will match the format SSSYYYYMMNN-QQ-LESSON_TITLE.pdf Where N is the number of lesson in the quarter. Most quarters will only have one lesson. Q is the quarter.

CMS

Initial setup

The lessons are designed to be hosted using gh-pages, divided per decade, each decade closing on the 0th year. Therefore there is a repo for each decade. Creating these repos is a one time affair. One you have a personal access token, put it in your environment variables export GHPAT=token. Then run this script:

from sabbath_school_lessons import cms
CMS = cms()
CMS.create_repos_for_all_decades()

Adding the original content

Next we add the original content (pdfs and extracted text from Adventist Archives).

from sabbath_school_lessons import cms
CMS = cms()
CMS.original_content()

Contributing

Contributions to improve the module are welcome. Please submit pull requests or open issues for any bugs or feature requests.

Metadata

Release files for sabbath-school-lessons 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sabbath-school-lessons 0.1.5
File Size Uploaded Provenance
sabbath_school_lessons-0.1.5.tar.gz 436.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sabbath-school-lessons 0.1.5
File Interpreter ABI Platform
sabbath_school_lessons-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 872.4 kB

Release files / sabbath_school_lessons-0.1.5.tar.gz

Download URL sabbath_school_lessons-0.1.5.tar.gz
Size 436.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3cc91d514b49c65997427a84447c83aacd7609ea78907fb6f814f59394cd9f75
BLAKE2b-256 checksum
How to use checksums
806ac25528b27048eb36650056517d890addb1af9fb2d09bfa8118e47cf37419
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Release files / sabbath_school_lessons-0.1.5-py3-none-any.whl

Download URL sabbath_school_lessons-0.1.5-py3-none-any.whl
Size 435.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
303053e6c3fd13b71d479a30362934c702d55f890ef87982aeb4f7f1f6b0ec45
BLAKE2b-256 checksum
How to use checksums
6940d31d2eef8b66ca6ba33e9f17e142a6d77262d08dd9b553ed8217932c68ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Security for sabbath-school-lessons 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page