Configuring RSS feeds with Leed

Our server can handle videos, pictures, and music from any source and it would be cool to have another tool to retrieve news from some RSS providers. This can be done with Leed, a RSS project organized for servers. You can have a final result, as shown in the following screenshot:

Configuring RSS feeds with Leed

This project has a "quick and easy" installation spirit, so you can give it a try without harness. Leed (for Light Feed) allows you to you access RSS feeds from any browser, so no RSS reader application is needed, and every user in your network can read them as well. You install it on the server and feeds are automatically updated.

Note

Well, the truth behind the scenes is that a cron task does this for you. You will be guided to set some synchronisation after the installation.

Creating the environment for Leed in three steps

We already have Apache, MySQL, and PHP installed, and we need a few other prerequisites to run Leed:

  1. Create a database for Leed
  2. Download the project code and set permissions
  3. Install Leed itself

Creating a database for Leed

Remember the database that we created for MediaDrop in Chapter 1, Transforming Your BeagleBone Black into a Media Server?

You will be at ease here, as this is exactly the same approach because Leed requires its own database as well.

You will begin by opening a MySQL session:

debian@arm:~$ mysql –u root –p

What we need here is to have a dedicated Leed user with its database. This user will be connected using the following:

create user 'debian_leed'@'localhost' IDENTIFIED BY 'temppwd';
create database leed_db;
use leed_db;
grant create, insert, update, select, delete on leed_db.* to debian_leed@localhost;
exit
Creating a database for Leed

Downloading the project code and setting permissions

We prepared our server to have its environment ready for Leed, so after getting the latest version, we'll get it working with Apache by performing the following steps:

  1. From your home, retrieve the latest project's code. It will also create a dedicated directory:
    debian@arm:~$  git clone https://github.com/ldleman/Leed.git
    debian@arm:~$  ls
    mediadrop mjpg-streamer Leed music
    
  2. Now, we need to put this new directory where the Apache server can find it:
    debian@arm:~$  sudo mv Leed /var/www/
    
  3. Change the permissions for the application:
    debian@arm:~$  chmod 777 /var/www/Leed/ -R
    

Installing Leed

When you go to the server address (http//192.168.0.15/leed/install.php), you'll get the following installation screen:

Installing Leed

We now need to fill in the database details that we previously defined and add the Administrator credentials as well. Now save and quit. Don't worry about the explanations, we'll discuss these settings thereafter.

It's important that all items from the prerequisites list on the right are green.

Otherwise, a warning message will be displayed about the wrong permissions settings, as shown in the following screenshot:

Installing Leed

After the configuration, the installation is complete:

Installing Leed

Leed is now ready for you.

Setting up a cron job for feed updates

If you want automatic updates for your feeds, you'll need to define a synchronization task with cron:

  1. Modify cron jobs:
    debian@arm:~$ sudo crontab –e
    
  2. Add the following line:
    0 * * * * wget -q -O /var/www/leed/logsCron "http://192.168.0.15/Leed/action.php?action=synchronize
    
  3. Save it and your feeds will be refreshed every hour.
  4. Finally, some little cleanup: remove install.php for security matters:
    debian@arm:~$ rm /var/www/Leed/install.php
    

Using Leed to add your RSS feed

When you need to add some feeds from the Manage menu, in Feed Options (on the right- hand side) select Preferences and you just have to paste the RSS link and add it with the button:

Using Leed to add your RSS feed

You might find it useful to organize your feeds into groups, as we did for movies in MediaDrop. The Rename button will serve to achieve this goal. For example, here a TV Shows category has been created, so every feed related to this type will be organized on the main screen.

Some Leed preferences settings in a server environment

You will be asked to choose between two synchronisation modes: Complete and Graduated.

  • Complete: This is to be used in a usual computer, as it will update all your feeds in a row, which is a CPU consuming task
  • Graduated: Look for the oldest 10 feeds and update them if required

You also have the possibility of allowing anonymous people to read your feeds. If you remember, in Chapter 3, Examples of Real-world Situations, we allowed guests to access our content but not to publish any. This is the same case here. Setting Allow anonymous readers to Yes will let your guests access your feeds but not add any.

Extending Leed with plugins

If you want to extend Leed capabilities, you can use the Leed Market—as the author defined it—from Feed options in the Manage menu. There, you'll be directed to the Leed Market space. Installation is just a matter of downloading the ZIP file with all plugins:

debian@arm:~/Leed$  wget  https://github.com/ldleman/Leed-market/archive/master.zip
debian@arm:~/Leed$ sudo unzip master.zip

Let's use the AdBlock plugin for this example:

  1. Copy the content of the AdBlock plugin directory where Leed can see it:
    debian@arm:~/Leed$ sudo cp –r Leed-market-master/adblock /var/www/Leed/plugins
    
  2. Connect yourself and set the plugin by navigating to Manage | Available Plugins and then activate adblock with Enable, as follows:
    Extending Leed with plugins

In this chapter, we covered:

  • Some words about the hardware
  • How to know your webcam
  • Configuring RSS feeds with Leed
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset