At Tetalab, most of our content is generated on our mailing-list.
Because we want people to read some of this content on the website, and without subscribing on the mailing list, this script helps with reading mails from a gmail account, select the interesting subjects, and import the content in refinerycms-blog engine.
- copy config.yml.sample to config.yml
- insert your gmail details in config.yml
- insert the path to your production sqlite3 db in config.yml
- Display all avalaible mails for import:
ruby mailing.rb
- Select a particular mail from this list into refinerycms-blog engine database:
ruby mailing.rb 3
- Mark all mails as read
ruby mailing.rb 0