API Reference

Notes

class ldsnotes.Notes(username=None, password=None, token=None, headless=True)[source]

Wrapper to pull any annotations from lds.org.

The API is rather complex to use to login. We take the lazy route and login with selenium (basically a fake browser). To avoid doing this everytime you can save the necessary token.

The object also supports indexing, so you can get the first note with n[0], or the first 10 doing n[:10]. When doing this it’ll return the most recently edited objects. Whenever querying, it’ll always return the most recently edited objects.

Parameters
  • username (string) – Your username

  • password (string) – Your password

  • token (string) – Instead of inputting your username/password, you can save your token and just input it

  • headless (bool) – Whether to run selenium headless or not

Variables
  • tags (list) – List of Tag objects of all your tags

  • folders (list) – List of Folder objects of all your folders

class ldsnotes.Tag(*args, **kwargs)[source]

Object that holds all Tag info

Variables
  • annotationCount (string) – Number of annotations assigned to tag

  • name (string) – Name of tag

  • id (string) – Seems to always be the same as name…

  • lastUsed (datetime) – Last time that tag was edited

class ldsnotes.Folder(*args, **kwargs)[source]

Object that holds all Tag info

Variables
  • annotationCount (string) – Number of annotations in folder

  • name (string) – Name of folder

  • id (string) – Special id of folder

  • lastUsed (datetime) – Last time that the folder was changed

  • order.id (list) – List of note ids in order that they were put in.

Annotations

class ldsnotes.Annotation(json)[source]

Base class for all annotations.

Variables
  • tags (list) – List of strings of tag names.

  • folders_id (list) – List of strings of folder ids.

  • last_update (datetime) – Last time annotation was edited.

  • id (string) – Id of annotation.

class ldsnotes.Bookmark(json)[source]

A bookmark annotation. Inherits from annotation.

Variables
  • tags (list) – List of strings of tag names.

  • folders_id (list) – List of strings of folder ids.

  • last_update (datetime) – Last time annotation was edited.

  • id (string) – Id of annotation.

  • headline (string) – Name of article ie name of conference talk or Helaman 3.

  • reference (string) – Full reference for scriptures like Helaman 3:29.

  • publication (string) – Refers to book (ie GC 2020 or BoM).

  • url (string) – Url to bookmark location.

class ldsnotes.Journal(json)[source]

A journal entry. Inherits from Annotation.

Variables
  • tags (list) – List of strings of tag names.

  • folders_id (list) – List of strings of folder ids.

  • last_update (datetime) – Last time annotation was edited.

  • id (string) – Id of annotation.

  • title (string) – Title of journal entry.

  • note (string) – Actual note taken.

class ldsnotes.Highlight(json, content_jsons)[source]

A scripture highlight. Inherits from Journal.

Variables
  • tags (list) – List of strings of tag names.

  • folders_id (list) – List of strings of folder ids.

  • last_update (datetime) – Last time annotation was edited.

  • id (string) – Id of annotation.

  • title (string) – Title of journal entry.

  • note (string) – Actual note taken.

  • color (string) – Color of annotation.

  • content (string) – Content of verse/paragraph(s) being highlighted.

  • hl (string) – Portion of verse that’s been highlighted.

  • url (string) – Url to verse/paragraph(s)

  • headline (string) – Name of article ie name of conference talk or Helaman 3.

  • reference (string) – Full reference for scriptures like Helaman 3:29.

  • publication (string) – Refers to book (ie GC 2020 or BoM).

markdown(syntax='==')[source]

Returns content with the highlight wrapped in markdown syntax.

Parameters

syntax (string) – String to wrap highlight in. Defaults to ==

Returns

Return type

Content with wrapped highlight.

class ldsnotes.Reference(json, hl_json, ref_json)[source]

A scripture link/reference. Inherits from Highlight.

Variables
  • tags (list) – List of strings of tag names.

  • folders_id (list) – List of strings of folder ids.

  • last_update (datetime) – Last time annotation was edited.

  • id (string) – Id of annotation.

  • title (string) – Title of journal entry.

  • note (string) – Actual note taken.

  • color (string) – Color of annotation.

  • content (string) – Content of verse/paragraph(s) being highlighted.

  • hl (string) – Portion of verse that’s been highlighted.

  • url (string) – Url to verse/paragraph(s)

  • headline (string) – Name of article ie name of conference talk or Helaman 3.

  • reference (string) – Full reference for scriptures like Helaman 3:29.

  • publication (string) – Refers to book (ie GC 2020 or BoM).

  • ref_content (string) – Content of verse/paragraph(s) that are linked to

  • ref_headline (string) – Headline of reference. See headline for examples.

  • ref_reference (string) – Reference of reference. See reference for examples.

  • ref_publication (string) – Publication of reference. See publication for examples.

markdown(syntax='==')

Returns content with the highlight wrapped in markdown syntax.

Parameters

syntax (string) – String to wrap highlight in. Defaults to ==

Returns

Return type

Content with wrapped highlight.

Content

class ldsnotes.Content(json)[source]
Class that pulls/represents content from anywhere

on churchofjesuschrist.org/study (theoretically)

Parameters

json (dict) – Dictionary made from json pull from lds.org’s API.

Variables
  • content (string) – Book, talk, or section of content.

  • headline (string) – The content (see above) with verse number in case of scriptures.

  • publication (string) – Overarching publication. Think BoM, DoC, General Conference 2020, etc.

  • url (string) – URL of where the content is located (including the paragraph/verse).

  • uri (string) – URI that it was pulled with.

  • p_start (string) – First verse/paragraph pulled.

  • p_end (string) – Last verse/paragraph pulled.