Sync CCL Roster to Mailerlite.
This tool is useful for me to sync the Citizens Climate Lobby Chapter roster into a mailerlite mailing list. Which includes a bunch of custom fields syncing across to it.
It's provided without much support. It works for me, and maybe there are others where this is helpful. You'll need to have the level of expertise to install and run python code.
Install this tool using pip:
git clone https://github.com/sdague/mailerlite-sync
cd mailerlite-sync
pip install -e . You'll need to get a mailerlite API.
Then you'll need to:
export ML_TOKEN="YOUR TOKEN.................."Download the roster to your chapter as a csv file.
mailerlite-sync sync chapter-roster.csvThis will go through the csv file and ensure that every entry in it is added to your roster in mailer lite.
NOTE: there are a bunch of custom fields I've defined so that I can segment by district or engagement segment. This might blow up if those fields aren't set.
To contribute to this tool, first checkout the code. Then create a new virtual environment:
cd mailerlite-sync
python -m venv venv
source venv/bin/activateNow install the dependencies and test dependencies:
pip install -e '.[test]'To run the tests:
python -m pytest