Skip to main content

Python module for designing mechanisms and robots

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("input.md", "output.pdf", 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

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.3.tar.gz (431.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.3-py3-none-any.whl (430.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sabbath_school_lessons-0.1.3.tar.gz
  • Upload date:
  • Size: 431.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.3.tar.gz
Algorithm Hash digest
SHA256 751dc7add346066f6816ab6656e836b2fb9c6ef7d1880f1d90710792f6a09ca1
MD5 424f0f86791d42864de729243e48827f
BLAKE2b-256 22b69dddafcb2ecbb69090ccb60ae6cc7be054b1581f9677075bf28121d71237

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sabbath_school_lessons-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b04f966e543e79a7feb3e12e243cef603b263733cfa87f10d620d83694549b30
MD5 9f9dd8f753bb62258f1c0a20c8ef67e3
BLAKE2b-256 adfd0df02785f4f899b17b436064cfb74fdbf16447fdfc4cc35c262d39b27fd8

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