MailChimp is an awesome tool for sending mail to large numbers of people. But it's has a problem that a lot of sites face. WYSIWYG :-(. I became frustrated with MailChimp's WYSIWYG html editor. I found and fell in love with markdown during the last year of using MailChimp. Being a command line junkie I wanted a way to compose my campaigns in markdown using vim. Then publish the campaign to MailChimp with a single command. I wanted something similar to jykell and octopress for managing my blog.
I searched far and wide. I was unable to find anything on the internet to scratch this itch.
I also wanted an excuse to learn python. Soo...I decided to take advantage of the awesome MailChimp API and write my own tool.
After some tinkering gitdownchim.py was brought to life and doing what I wanted it to.
gitdownchim.py looks for a config.yaml file that looks like.
key: YOUMAILCHIMPAPIKEY list_id: THELISTID template_id: TEMPLATEID from_email: firstname.lastname@example.org from_name: 'Your Name' to_name: '*|FNAME|* *|LNAME|*'
Armed with this information you can now simply
gitdownchim.py -m campaign.md -t 'Campaign Name' -s 'Campaign Subject'
Which takes your markdown file and replaces the [editable content area] (http://kb.mailchimp.com/article/template-language-creating-editable-content-areas) defined as mc:edit="MAIN" with the provided markdown.