This is the code that produces the widget for VPR's Latest Newscast.
- Make sure you have Python 2.7 installed.
- Clone the repo locally.
git clone git@github.com:vprnet/latest-newscast.git
- Install
pip
- Install virtualenv.
pip install virtualenv
- Create a virtual environment for the app.
virtualenv venv
- Enter the virtual environment.
source venv/bin/activate
- Install the app requirements.
pip install -r requirements.txt
- Change into the project directory.
cd latest-newscast
- Enter the virtual environment.
source venv/bin/activate
- To run locally, just hit a quick
python app/index.py
and head to127.0.0.1:5000
This project runs on a cron job in Webfaction. The cron is currently set to run every three minutes, pushing up to Amazon S3. To update the production code, SSH into our Webfaction server and update changes to the production code.
We embed the latest newscast widget into Core Publisher using Pym.js.
Block Title: Subscribe To The VPR News Podcast
In the subheading field: <div data-pym-src="http://www.vpr.net/apps/newscast/index.html"></div> <script type="text/javascript" src="//pym.nprapps.org/pym-loader.v1.min.js"></script>