Skip to main content

Python module for processing sabbath school bible study guides

Project description

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.

Contributing

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sabbath_school_lessons-0.1.4.tar.gz (434.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sabbath_school_lessons-0.1.4-py3-none-any.whl (433.5 kB view details)

Uploaded Python 3

File details

Details for the file sabbath_school_lessons-0.1.4.tar.gz.

File metadata

  • Download URL: sabbath_school_lessons-0.1.4.tar.gz
  • Upload date:
  • Size: 434.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for sabbath_school_lessons-0.1.4.tar.gz
Algorithm Hash digest
SHA256 90c57281cd1f2e2df337455240ed0576bac240cc4d7f73abe04889a364e8bbcd
MD5 0537f9eccb3b64d38de9d5f0553fcb40
BLAKE2b-256 829a484e5b6911d166c67543810d489b5994864065a70a116544b7307734a3f0

See more details on using hashes here.

File details

Details for the file sabbath_school_lessons-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for sabbath_school_lessons-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 201904ad7fe47885e7dac212f2d9a8883de67d7b216edd3cf596f2b7b41854b1
MD5 78c1000646ccbf76e5692505b410d740
BLAKE2b-256 6254419156e5184c7facf123b345074ef74c307cd0c9e805b1c6b88400f3d6ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page