Skip to content

Generate membership directory and other reports via ChurchTools API

License

Notifications You must be signed in to change notification settings

smehrbrodt/churchtools-memberlist

Repository files navigation

Reporting via Churchtools API

Python script to create documents via Churchtools API.

  • Member list
  • Prayer list
  • Checkin form
  • Attendance report

Initial Setup

Usage

Any of the below commands will create odt output files. Use LibreOffice to preview or postprocess them, or generate a PDF of it.

You can also use the command line to generate a PDF: libreoffice --convert-to pdf --outdir . input.odt

Member list

Creates a membership directory.

./create-memberlist.py \
    --filter-group <group_id> \
    [--template template_memberlist.odt] \
    [--output memberlist.odt]

The --filter-group param is used to filter by a certain group in Churchtools.

Prayer list

Creates a prayer list (similiar to membership directory, but different layout). Can be filtered to include only part of the members using --surname-from and surname-to arguments.

./create-prayerlist.py \
    [--surname-from <letter>] \
    [--surname-to <letter>] \
    [--template template_prayerlist.odt] \
    [--output prayerlist.odt]

Checkin form

Create a checkin form. This assumes you have two groups: Members and regular visitors. The regular visitors group can be filtered to include only certain roles from that group.

./create-checkinform.py \
    --group-members <group_id> \
    --group-regularvisitors <group_id> \
    --role-id-regularvisitors <role_id> \
    [--template template_checkinform.odt] \
    [--output checkinform.odt]

Attendance report

Generate an attendance report.

./create-attendancereport.py \
    --group-members <group_id> \
    --group-regular-visitors <group_id> \
    --role-id-regularvisitors <role_id> \
    --group-visitors <group_id> \
    --role-id-visitors <role_id> \
    --date YYYY-MM-DD \
    [--template template_attendancereport.odt] \
    [--output attendancereport.odt]

Getting a login token

Find your ChurchTools API documentation / playground here: <mychurch>.church.tools/api

To retrieve a login token, first find your user ID using the GET /persons API.

Then use the GET /persons/{id}/logintoken API to get your login token.

About

Generate membership directory and other reports via ChurchTools API

Topics

Resources

License

Stars

Watchers

Forks

Languages