Skip to content

citychurchbris/churchsuite-tools

Repository files navigation

ChurchSuite Tools

Requirements

Installation

  1. Clone this repo

    git clone https://github.com/citychurchbris/churchsuite-tools.git
  2. Install dependencies with pipenv

    cd churchsuite-tools
    pipenv install
  3. Obtain a credentials 'secret' for Google Drive, by following Step 1 of this guide:

    https://developers.google.com/drive/api/v3/quickstart/python

    (Please note - only step one of the guide above is required. All other steps are covered automatically by the code in this package)

    Rename the downloaded credentials file to 'drive_client_secret.json' and move to the root of directory you placed this package.

  4. Initialize drive credentials:

    pipenv run python drive.py

The Tools

masterrota.py

The master rota script attempts to scrape the 'All Rotas' report in ChurchSuite and populate a google sheet with the results, with a column for every rota, a row for every Sunday, and the names of anyone on the rota in each cell.

It will also create an overview sheet in the same document with details for the 'next' Sunday.

It will also optionally generate an email summary of rotas for 'next' Sunday

  1. Create a config file using config-examples/masterrota.example.json as a guide. You need to provide your churchsuite login details, a reference to the google sheet for output, and smtp credentials for the summary email.
  1. You can then run the script as follows:

    pipenv run python masterrota.py <config-file>
  2. To trigger the email summary:

    pipenv run python masterrota.py <config-file> --notify
  3. This script is designed to be run regularly with cron (e.g. once a day) to keep the drive doc in sync with churchsuite. The notification trigger is designed to be run separately - once or twice a week.

tagalert.py

Notifications for users who match a specific tag on ChurchSuite.

This uses the official ChurchSuite API and requires an API key.

  1. Set up a config file as per the example in config-examples/tagalert.example.json, using your ChurchSuite API key:

  2. Run with:

    pipenv run python tagalert.py <config-file>
  3. This script is designed to be run regularly with cron (e.g. once a week) to check for users who match a tag.

sundayreview.py

IN PROGRESS

This script is designed to pull Sunday numbers and summary data from ChurchSuite.

About

Various tools to extract data from ChurchSuite (beyond the official API)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages