Skip to content

trevorlauder/church-class-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Church Class List

When syncing Member Tools, it includes class information in the membership data. However, it doesn't allow me to see the class membership under Organizations.

I'm assuming this is a bug as I can see class information for individual members in the Directory.

I wrote this project to retrieve the data and output the members of the class I enter. I include a Docker image, or you can run it on iOS with Pythonista.

Building

Set your unit number in church_class_list/config.json

---
unit: 000000 # Int: Your unit number
docker build . --tag church-class-list:latest

Running

You will need the CLIENT_ID and CLIENT_SECRET for Member Tools to perform the OAuth. Place them into .docker_env in the root of this repo.

Do not place quotes around the values in this file.

CHURCH_CLASS_OAUTH_CLIENT_ID=*****************
CHURCH_CLASS_OAUTH_CLIENT_SECRET=*****************

Alernatively, if you are running this in Pythonista you can save them to the Pythonista keystore.

keychain.set_password("lds", "oauth_client_id", "*****************")
keychain.set_password("lds", "oauth_client_secret", "*****************")
mkdir data

docker run -it \
  --mount type=bind,source=`pwd`/church_class_list/config.yml,target=/app/config.yml \
  --mount type=bind,source=`pwd`/data,target=/app/data \
  --env-file=.docker_env church-class-list:latest

It will prompt you for your credentials, organization and class and save a list of class members in data/class_members.txt.

The organization and class need to match what is in Member Tools.

It will also save a cache in data/membertools_data.json and will use that for future runs. Delete it if you wish to download fresh data.