flexicon.code.Scripture package

Submodules

flexicon.code.Scripture.ScrAnnotationsOperations module

class flexicon.code.Scripture.ScrAnnotationsOperations.ScrAnnotationsOperations(project)[source]

Bases: BaseOperations

This class provides operations for managing Scripture book annotations in a FieldWorks project.

Scripture book annotations are containers for notes (translator notes, consultant notes, etc.) associated with a Scripture book.

This class should be accessed via FLExProject.ScrAnnotations property.

Usage:

from flexlibs2 import FLExProject

project = FLExProject()
project.OpenProject("my project", writeEnabled=True)

# Get a book
genesis = project.ScrBooks.Find(1)

# Create annotations container
annotations = project.ScrAnnotations.Create(genesis, "note")

# Get annotations for a book
annotations = project.ScrAnnotations.GetForBook(genesis)

# Get notes in annotations
notes = project.ScrAnnotations.GetNotes(annotations)

project.CloseProject()
Create(*args, **kwargs)

Automatically instantiate and call the method.

Delete(*args, **kwargs)

Automatically instantiate and call the method.

GetForBook(*args, **kwargs)

Automatically instantiate and call the method.

GetNotes(*args, **kwargs)

Automatically instantiate and call the method.

flexicon.code.Scripture.ScrBookOperations module

class flexicon.code.Scripture.ScrBookOperations.ScrBookOperations(project)[source]

Bases: BaseOperations

This class provides operations for managing Scripture books in a FieldWorks project.

Scripture books represent individual books of the Bible (Genesis, Matthew, etc.) identified by canonical numbers (1-66 for standard Protestant canon). Each book contains sections with headings and paragraph content.

This class should be accessed via FLExProject.ScrBooks property.

Usage:

from flexlibs2 import FLExProject

project = FLExProject()
project.OpenProject("my project", writeEnabled=True)

# Get all Scripture books
for book in project.ScrBooks.GetAll():
    title = project.ScrBooks.GetTitle(book)
    print(f"Book: {title}")

# Create a new book (Genesis = 1)
genesis = project.ScrBooks.Create(1, "Genesis")

# Find book by canonical number
matthew = project.ScrBooks.Find(40)  # Matthew = 40

# Get sections in a book
sections = project.ScrBooks.GetSections(genesis)

project.CloseProject()
GetAll(**kwargs)
Create(*args, **kwargs)

Automatically instantiate and call the method.

Delete(*args, **kwargs)

Automatically instantiate and call the method.

Find(*args, **kwargs)

Automatically instantiate and call the method.

FindByName(*args, **kwargs)

Automatically instantiate and call the method.

GetCanonicalNum(*args, **kwargs)

Automatically instantiate and call the method.

GetTitle(*args, **kwargs)

Automatically instantiate and call the method.

SetTitle(*args, **kwargs)

Automatically instantiate and call the method.

GetSections(*args, **kwargs)

Automatically instantiate and call the method.

flexicon.code.Scripture.ScrDraftOperations module

class flexicon.code.Scripture.ScrDraftOperations.ScrDraftOperations(project)[source]

Bases: BaseOperations

This class provides operations for managing Scripture drafts/versions in a FieldWorks project.

Scripture drafts are saved versions of the Scripture text, allowing tracking of different translation drafts, consultant checks, or archived versions.

This class should be accessed via FLExProject.ScrDrafts property.

Usage:

from flexlibs2 import FLExProject

project = FLExProject()
project.OpenProject("my project", writeEnabled=True)

# Get all drafts
for draft in project.ScrDrafts.GetAll():
    desc = project.ScrDrafts.GetDescription(draft)
    print(f"Draft: {desc}")

# Create a new draft
draft = project.ScrDrafts.Create("First Draft - January 2025", "saved_version")

# Find draft by description
draft = project.ScrDrafts.Find("First Draft")

# Get books in draft
books = project.ScrDrafts.GetBooks(draft)

project.CloseProject()
GetAll(**kwargs)
Create(*args, **kwargs)

Automatically instantiate and call the method.

Delete(*args, **kwargs)

Automatically instantiate and call the method.

Find(*args, **kwargs)

Automatically instantiate and call the method.

GetDescription(*args, **kwargs)

Automatically instantiate and call the method.

SetDescription(*args, **kwargs)

Automatically instantiate and call the method.

GetBooks(*args, **kwargs)

Automatically instantiate and call the method.

flexicon.code.Scripture.ScrNoteOperations module

class flexicon.code.Scripture.ScrNoteOperations.ScrNoteOperations(project)[source]

Bases: BaseOperations

This class provides operations for managing Scripture notes in a FieldWorks project.

Scripture notes are annotations attached to specific paragraphs or locations in Scripture text. They can be translator notes, consultant notes, checking questions, etc.

This class should be accessed via FLExProject.ScrNotes property.

Usage:

from flexlibs2 import FLExProject

project = FLExProject()
project.OpenProject("my project", writeEnabled=True)

# Get a book
genesis = project.ScrBooks.Find(1)

# Get a paragraph
section = project.ScrSections.Find(genesis, 0)
para = project.ScrTxtParas.Find(section, 0)

# Create a note
note = project.ScrNotes.Create(
    genesis,
    para,
    "Check: Is 'beginning' the best translation?",
    "translator_note"
)

# Get all notes for a book
notes = project.ScrNotes.GetAll(genesis)

# Get note text
text = project.ScrNotes.GetText(note)

# Resolve a note
project.ScrNotes.Resolve(note)

project.CloseProject()
Create(*args, **kwargs)

Automatically instantiate and call the method.

Delete(*args, **kwargs)

Automatically instantiate and call the method.

Find(*args, **kwargs)

Automatically instantiate and call the method.

GetAll(**kwargs)
GetText(*args, **kwargs)

Automatically instantiate and call the method.

SetText(*args, **kwargs)

Automatically instantiate and call the method.

GetType(*args, **kwargs)

Automatically instantiate and call the method.

Resolve(*args, **kwargs)

Automatically instantiate and call the method.

IsResolved(*args, **kwargs)

Automatically instantiate and call the method.

flexicon.code.Scripture.ScrSectionOperations module

class flexicon.code.Scripture.ScrSectionOperations.ScrSectionOperations(project)[source]

Bases: BaseOperations

This class provides operations for managing Scripture sections in a FieldWorks project.

Scripture sections are subdivisions of books, each with a heading and content paragraphs. Sections organize Scripture text into logical units.

This class should be accessed via FLExProject.ScrSections property.

Usage:

from flexlibs2 import FLExProject

project = FLExProject()
project.OpenProject("my project", writeEnabled=True)

# Get a book
genesis = project.ScrBooks.Find(1)

# Create a section
section = project.ScrSections.Create(genesis, "Creation", "In the beginning...")

# Get all sections in a book
sections = project.ScrSections.GetAll(genesis)

# Get section heading and content
heading = project.ScrSections.GetHeading(section)
paras = project.ScrSections.GetContent(section)

project.CloseProject()
Create(*args, **kwargs)

Automatically instantiate and call the method.

Delete(*args, **kwargs)

Automatically instantiate and call the method.

Find(*args, **kwargs)

Automatically instantiate and call the method.

GetAll(**kwargs)
GetHeading(*args, **kwargs)

Automatically instantiate and call the method.

SetHeading(*args, **kwargs)

Automatically instantiate and call the method.

GetContent(*args, **kwargs)

Automatically instantiate and call the method.

MoveTo(*args, **kwargs)

Automatically instantiate and call the method.

flexicon.code.Scripture.ScrTxtParaOperations module

class flexicon.code.Scripture.ScrTxtParaOperations.ScrTxtParaOperations(project)[source]

Bases: BaseOperations

This class provides operations for managing Scripture text paragraphs in a FieldWorks project.

Scripture paragraphs are the basic text units within sections, each with text content and a paragraph style (Normal, Poetry, Quote, etc.).

This class should be accessed via FLExProject.ScrTxtParas property.

Usage:

from flexlibs2 import FLExProject

project = FLExProject()
project.OpenProject("my project", writeEnabled=True)

# Get a section
genesis = project.ScrBooks.Find(1)
section = project.ScrSections.Find(genesis, 0)

# Create a paragraph
para = project.ScrTxtParas.Create(
    section,
    "In the beginning God created the heavens and the earth.",
    "Normal"
)

# Get paragraph text
text = project.ScrTxtParas.GetText(para)

# Set paragraph style
project.ScrTxtParas.SetStyleName(para, "Poetry")

project.CloseProject()
Create(*args, **kwargs)

Automatically instantiate and call the method.

Delete(*args, **kwargs)

Automatically instantiate and call the method.

Find(*args, **kwargs)

Automatically instantiate and call the method.

GetAll(**kwargs)
GetText(*args, **kwargs)

Automatically instantiate and call the method.

SetText(*args, **kwargs)

Automatically instantiate and call the method.

GetStyleName(*args, **kwargs)

Automatically instantiate and call the method.

SetStyleName(*args, **kwargs)

Automatically instantiate and call the method.

Module contents