Giter VIP home page Giter VIP logo

sparkpost-rss-program's Introduction

Sign up for a SparkPost account and visit our Developer Hub for even more content.

SparkPost RSS Tool

Build Status

Easy installation

Firstly ensure you have python3, pip and git.

Next, get the project. Install pipenv (--user option recommended, see this article) and this article for MacOS.

Once you have pipenv, you can use it to install the project dependencies.

git clone https://github.com/ZSamuels28/SparkPost-RSS-Program.git
cd SparkPost-RSS-Program
python3 -m pip install pipenv
pipenv install

Note: In the above commands, you may need to run pip3 instead of pip.

Pre-requisites

Input your SparkPost API Key into the sample.env file and rename the file variables.env. Note these are case sensitive:

SPARKPOST_HOST
    The URL of the SparkPost API service you're using. Defaults to https://api.sparkpost.com.

SPARKPOST_API_KEY
    API key on your SparkPost account, with Recipient Validation rights.

The variables.env file should look something like the following:

# .env
SPARKPOST_API_KEY=1234567890ABCDEFGHIJKLMNOPQRSTUVXYZ
SPARKPOST_HOST=https://api.sparkpost.com

NOTE: You must have templates and receipient lists created in SparkPost, if you do not have any, make sure they are created prior to using this program.

Usage

cd SparkPost-RSS-Program
pyenv shell
python SparkPost-RSS.py

You will see the SparkPost RSS Transmission program with the following inputs/options:

Option Description
Enter RSS URL: Enter your RSS URL here to read the elements from.
Read RSS Button to read the RSS URL elements.
How many RSS items to send? Determines how many RSS records should be sent.
Enter Campaign ID Campaign ID to be used with SparkPost.
Choose Template Drop-down to select which template will be used to be sent. Note, this template will appear below and can be edited here as well.
Choose Recipient List Drop-down to select the SparkPost recipient list to be sent to.
Filter Elements Allows the user to filter for specific RSS elements in the feed
Left text box When a template is selected, the HTML for that template will appear here. You can also edit this HTML and update it.
Right text box When an RSS Feed is loeaded, a list of items will be shown. Clicking on those items will add them to the left text box.
Send Sends the email.
Update Template Updates the selected template HTML with the HTML in the textbox. Note, this has a confirmation dialog as well.
Close Closes the program.

See sample template below for usage:

<html>
  <body>
    {{ each items }}
    <p><a href="{{ loop_var.link }}"> {{ loop_var.title }} </a></p>
    <p>{{ loop_var.summary }}</p>
    {{ end }}
  </body>
</html>

Sample sample usage of program below:

sparkpost-rss-program's People

Contributors

zsamuels28 avatar

Stargazers

 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.