Giter Site home page Giter Site logo

boumer / correole Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mrrusof/correole

0.0 2.0 0.0 79 KB

Correole is a minimum feature newsletter in Ruby.

Home Page: http://ruslanledesma.com/2016/07/17/correole.html

Ruby 97.52% Makefile 0.27% HTML 2.21%

correole's Introduction

Correole

Build Status

Correole is a minimum feature newsletter in Ruby. Correole subscribes/unsubscribes readers and sends the newsletter.

Correole accepts subscribes/unsubscribes by way of its web API. Readers subscribe by means of a form in your website that makes an Ajax request to the API. Readers unsubscribe by means of an unsubscribe link in the newsletter. The unsubscribe endpoint redirects readers to a given confirmation page in your website.

Correole sends out the newsletter by means of command correole send. Correole tries to send the newsletter to each reader and does not retry or record failures. Correole composes a multipart email for each reader from given templates and RSS feed. Correole includes only new RSS items in the email. Correole determines the RSS items that are new by remembering the items it sent in previous runs. You tell Correole to skip new items (remember items and not send email) by means of command correole purge.

Get it

git clone [email protected]:mrrusof/correole.git
cd correole
bundle install
bundle exec rake test

Deploy it

Deploy to Heroku.

git clone [email protected]:mrrusof/correole.git
cd correole
heroku create
git push heroku master

Configure environment variables. For example:

heroku config:set QUIET=false
heroku config:set DRY_RUN=false
heroku config:set [email protected]
heroku config:set BASE_URI=https://application-name.herokuapp.com/
heroku config:set UNSUBSCRIBE_URI=http://yourdomain.com/unsubscribe/?email=<%= recipient %>'
heroku config:set CONFIRMATION_URI=http://yourdomain.com/unsubscribed/
heroku config:set FEED=http://yourdomain.com/feed.xml
heroku config:set SUBJECT='<%= title %>: newsletter for <%= date %>'
heroku config:set FROM='<%= title %> <[email protected]>'
heroku config:set HTML_TEMPLATE=production.html.erb
heroku config:set PLAIN_TEMPLATE=production.txt.erb
heroku config:set SMTP_HOST=smtp.server
heroku config:set SMTP_PORT=25
heroku config:set SMTP_USER=your-username
heroku config:set SMTP_PASS=your-password
heroku config:set SMTP_AUTH=plain
heroku config:set SMTP_TTLS=true

Create database.

heroku addons:create heroku-postgresql:hobby-dev
heroku run migrate

Usage

Correole provides three commands.

  • correole, from repo root bundle exec ruby -I config -I lib bin/correole. Runs API for subscribe / unsubscribe.
    • Subscribe: curl -X PUT http://application-name.herokuapp.com/subscribers/[email protected]
    • Unsubscribe:
  • correole send [-q], from repo root bundle exec ruby -I config -I lib bin/correole send [-q]. Composes and sends newsletter.
  • correole purge [-q], from repo root bundle exec ruby -I config -I lib bin/correole purge [-q]. Skips current RSS items.

License

The MIT License (MIT)

Copyright (c) 2016 Ruslán Ledesma Garza

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

correole's People

Contributors

mrrusof avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.