Skip to content

Unofficial API and utilities for Leader and Clerk Resources (LCR) data in Rust.

Notifications You must be signed in to change notification settings

ephraimkunz/rs-lcr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI codecov

rs-lcr

Unofficial API and utilities for Leader and Clerk Resources (LCR) data in Rust.

The official Church LCR website is where leaders and clerks spend a lot of time. The Church doesn't offer an API, so I thought I'd expose one.

  • A Python package to do similar things exists here and I've used it for a few projects, but the Church keeps changing the login flow so it's constantly broken. This project uses headless Chrome to login so I'm hoping it will be more stable, and easier to fix if things do change.

  • Current supported:

    • Member list
    • Members moved in
    • Members moved out
    • Member profile
    • Ward photo directory

Usage

  • Use the provided command-line interface:
  1. Clone the repo: git clone https://github.com/ephraimkunz/rs-lcr.git.
  2. In the root of the repo, run cargo run which will print a help menu of possible options. You'll need to provide 3 environment variables: LCR_USERNAME, LCR_PASSWORD, LCR_UNIT. These correspond to your LDS username, password, and unit number. Your unit number can be found in parenthesis after the name of the ward in the LCR homepage.
  3. If using the ward photo directory option, pass additional GOOGLE_SHEETS_CLIENT_ID and GOOGLE_SHEETS_CLIENT_SECRET environment variables. These should come from the Google developer console after you set up Sheets API access. To do this, go to console.cloud.google.com and enable sheets access. Go to Credentials and click Create Credentials, choosing OAuth client ID. Choose Desktop App. After the ward photo directory is generated into a fresh Google Sheet, the URL of the sheet is printed. It's recommended to quickly print out that sheet in portrait orientation, since it appears the photo URLs fetched from LCR quickly expire.
  • Use as a library:
  1. Add lcr = { git = "https://github.com/ephraimkunz/rs-lcr" } to your Cargo.toml under the dependencies section.
  2. You can run cargo doc --open in your project after doing so to get autogenerated documentation.

About

Unofficial API and utilities for Leader and Clerk Resources (LCR) data in Rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published