Skip to content

Debian Installation

Daniel Scharon edited this page Apr 24, 2017 · 6 revisions

Debian Installation

This tutorial should work for Ubuntu, as well as any Debian derivative

Requirements

  • Python >= 3.5
  • GIT Core
  • PIP
  • feedparser
  • jsonpickle
  • slixmpp
  • termcolor
  • screen

Installation of Requirements

Python

sudo apt-get install python3

Git Core

sudo apt-get install git-core

Python PIP

sudo apt-get install python3-pip

Python FeedParser

sudo pip3 install feedparser

Python Pickle

sudo pip3 install jsonpickle

Slixmpp

sudo pip3 install slixmpp

TermColor

sudo pip3 install termcolor

GNU Screen

sudo apt-get install screen

Getting the Code

cd /opt/
sudo git clone https://github.com/edhelas/atomtopubsub.git
sudo chown -R www-data:www-data /opt/atomtopubsub/
cd /opt/atomtopubsub/
sudo mv config_default.py config.py

Configuration

Edit the config.py file, as per the notations inside the file.

Running AtomToPubsub

screen -S atomtopubsub
sudo -s -u www-data
python atomtopubsub.py

Detaching the Console

Use CTRL+A, then CTRL+D to detach the console.

Re-attaching the Console

screen -R atomtopubsub

Stopping AtomToPubsub

There is no graceful way to shutdown atomtopubsub as of yet. Current known methods are:

  • In the time between refreshes, press CTRL+X
  • Once the screen session is detached, you can run sudo killall python

Notes

  • The XMPP account must be authorized to create Pubsub node on the server(s).
  • The "key" of each feed of the configuration file will be the name of the Pubsub node
  • AtomToPubsub will try to fill the title and the description of the Pubsub node from the title and the subtitle of the Atom node

Updating

cd /opt/atomtopubsub
git pull

Clearing the Cache

If all else fails and you want to retest or resubmit a job, you may find that the cache will tell atomtopubsub that the job is already complete, and will skip.

To fix this, you can delete the cache file and run the job again.

rm -f /opt/atomtopubsub/cache.pkl