meetup2apricot

Synopsis

meetup2apricot [-h] [-d] [-l LOGFILE] [-m] [-n] [-r] [-s MEETUP_ID [MEETUP_ID …]] [-t MEETUP_ID [MEETUP_ID …]] [-v] [-w]

Description

meetup2apricot downloads events from Meetup and creates events in Wild Apricot.

meetup2apricot also downloads featured event photos from Meetup and saves them locally for manual upload to Wild Apricot.

meetup2apricot reads its configuration from environment variables. The command line options control only the message levels to log and where to send the logs.

Options

-h, --help

Show a help message and exit.

-d, --debug

Also log debug messages. If this option is omitted, log only info and higher level messages.

-l LOGFILE, --logfile LOGFILE

Path to logfile (default: meetup2apricot.log).

-m, --meetup-ids

Show Meetup event IDs in reports.

-n, --dryrun

Perform a dry run. Do not add events to Wild Apricot. Do not download photos from Meetup. Do not update event and photo data cached between runs.

-r, --report

Report added events, registration types, and photos to standard output.

-s MEETUP_ID [MEETUP_ID ...], --skip MEETUP_ID [MEETUP_ID ...]

Skip events matching the Meetup event IDs during this and subsequent runs. This option may be repeated.

-t MEETUP_ID [MEETUP_ID ...], --transfer MEETUP_ID [MEETUP_ID ...]

Transfer from Meetup to Wild Apricot only those events matching Meetup event IDs. When no Meetup IDs are specified, transfer all upcoming Meetup events. This option may be repeated.

-v, --verbose

Log to standard error. This is useful for debugging when running from the command line.

-w, --warnings

Log warnings and higher level messages to standard error. This is useful when running in cron job because cron will mail any standard error output.

Environment

ALL_EVENT_TAGS

Tags to assign to all Wild Apricot events formated as a JSON list of strings. Some examples:

export ALL_EVENT_TAGS='[]'
export ALL_EVENT_TAGS='["new"]'
export ALL_EVENT_TAGS='["new", "meetup"]'
APRICOT_ACCOUNT_NUMBER

The Wild Apricot account number.

APRICOT_API_KEY

The Wild Apricot API key.

APRICOT_PHOTO_BASE_URL

The base URL for uploading photos to Wild Apricot via WEBDAV.

APRICOT_PHOTO_DIRECTORY

The Wild Apricot web directory for photos.

APRICOT_PHOTO_PASSWORD

The password for uploading photos to Wild Apricot via WEBDAV.

APRICOT_PHOTO_USERNAME

The username for uploading photos to Wild Apricot via WEBDAV.

CODES_TO_TAGS

A mapping from Nova Labs accounting codes to Wild Apricot event tags. Format as a JSON object with codes as keys and strings (or lists of strings) as values. For example:

export CODES_TO_TAGS='{
    "3D": "3d-printing",
    "AC": "arts-and-crafts",
    "EL": "electronics",
    "RO": ["electronics", "3d-printing"],
    "SL": "3d-printing",
    }'
EARLIEST_EVENT_START_TIME

The start time of the earliest event to convert from Meetup to Wild Apricot. Use ISO 8601 format including a timezone offset. For example:

export EARLIEST_EVENT_START_TIME="2020-11-10 00:00 -05:00"
EVENT_CACHE_FILE

The path to a Python pickle formatted cache file of event conversion details.

EVENT_RESTRICTIONS

Event restrictions formatted as a list of JSON objects. Each object optionally specifies an event restriction name, a case-insensitive Python regular expression to find in event names, a price restriction (free or paid), an member level (or list of levels), and a guest policy. For example:

export EVENT_RESTRICTIONS='[
     {
             "name": "Green Orientation",
             "pattern": "go:.*orientation",
             "levels": "Associate (onboarding)",
             "guests": "count"
     },
     {
             "name": "Members Only",
             "pattern": "members[ -]*only",
             "price": "paid"
     }]'

The following table lists the name-value pairs within an event restriction JSON object. All name-value pairs are optional.

Table 4. Event Restriction Name-Value Pairs

Name

Value

Default Value

name

Event registration type name

RSVP

pattern

Case-insensitive regular expression to match an event name

Match all names

price

free or paid

Match all prices

levels

A Wild Apricot membership level or a JSON list of membership levels

Allow everyone

guests

count, contact, or full

No guests

LATEST_EVENT_START_TIME

The start time of the latest event to convert from Meetup to Wild Apricot. Use ISO 8601 format including a timezone offset. For example:

export LATEST_EVENT_START_TIME="2020-12-31 23:59 -05:00"
MEETUP_EVENTS_WANTED

The number of events to request from Meetup.

MEETUP_GROUP_URL_NAME

The group name for Meetup URLs. For example, in the URL https://www.meetup.com/NOVA-Makers/, the group name is NOVA-Makers.

PHOTO_DIRECTORY

A local directory for photos from Meetup.

PHOTO_CACHE_FILE

The path to a Python pickle formatted cache file of photo conversion details.