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
- Use the provided command-line interface:
- Clone the repo:
git clone https://github.com/ephraimkunz/rs-lcr.git
. - 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. - If using the ward photo directory option, pass additional
GOOGLE_SHEETS_CLIENT_ID
andGOOGLE_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:
- Add
lcr = { git = "https://github.com/ephraimkunz/rs-lcr" }
to your Cargo.toml under the dependencies section. - You can run
cargo doc --open
in your project after doing so to get autogenerated documentation.