GithubHelp home page GithubHelp logo

planeteria's Introduction

Planeteria Readme

About Planeteria

A planet is a collection of posts from many different blogs, all somewhat related to one topic. It's a great way to keep tabs on a subject, a community, a technology, a team, a project or anything else that attracts a diverse range of bloggers.

Planeteria.org is a hosted planet reader. Planeteria allows anyone to make a planet, host it and administer it on Planeteria.org. After you make your planet, tell people about it. That's the whole point of community-building!

Planeteria was created by James Vasile (james at hackervisions dot net) in 2010 and has been maintained in his copious spare time since its creation.

About Planeteria's code

This is a free open source project licensed under the AGPLv3 license.

This software was originally built on Venus. Venus is great if you're only running one planet, I highly recommend it. However trying to scale up the code for a single planet to make one system do many planets proved to be tricky, so those dependencies were discarded for more flexibility. The code is less robust as a result and could use some love.

In 2013, Aleta Dunne (aleta dot dunne at gmail dot com) took on fixing up the site as an internship project for the GNOME Outreach Program for Women (OPW). We always welcome more help, though!

Please let us know about bugs on the Github issue tracker, or submit a patch!

Installation

Planeteria is compatible with Python versions 2.3 - 2.7.

Grab the code from the master repo:

git clone git://github.com/jvasile/Planeteria.git

Dependencies

Planeteria depends on several libraries. Follow the instructions for your OS below. We've only tested the installation on Debian and Mac OS X so far; we welcome any contributors who would like to help develop installation instructions for other operating systems.

We recommend installing these in a virtual environment (virtualenv) to avoid conflicts with dependencies for other projects run on the same machine. To learn more about installing and using virtualenv, go to http://www.virtualenv.org/en/latest/

Package installation on Debian

To install them on Debian, you can get them all by typing (or pasting) the following into a terminal window:

aptitude install python-feedparser python-utidylib python-simplejson \
python-beautifulsoup python-lxml python-htmltmpl python-dateutil

Package installation on Mac OS X

Most packages can be installed on a Mac with pip, however one of them needs to be downloaded before running pip. Go to http://sourceforge.net/projects/htmltmpl/files/htmltmpl/ and download the 1.22 version (dated 2001-12-17).
WARNING: Do not click the link at the top of the page that says "Looking for the latest version?" Although the version number seems to be the correct version number, the link will actually download htmltmpl 1.22 for PHP, not the Python version which is what this project uses. The download should have the file name htmltmpl-1.22.tar.gz; you should not see php in the filename. Once you have downloaded the htmltmpl tarball, note the file path for the pip install. Copy and paste the following command into a terminal window, and before you hit Enter, replace path/to/htmltmpl-1.22.tar.gz with the file path on your system.

pip install feedparser pytidylib simplejson beautifulsoup lxml python-dateutil path/to/htmltmpl-1.22.tar.gz

The last step for Mac users is to install tidy, which is required for pytidylib to work. We used Homebrew to install tidy but it requires an extra step because it's not in the default Homebrew repository. First, enter

brew tap homebrew/dupes  

which tells homebrew to look in the dupes library, then:

brew install homebrew/dupes/tidy  

which installs tidy.

Loading the site on your machine

Note that without running it on an Apache server, form submission won't work, so you won't be able to create or administer a planet, however you can view the static pages just fine.

Run planeteria.py which should generate the html files for the site and place them in the /www folder. Then open /www/index.html in a browser window.

Running the site on an Apache server virtual host

The site requires sqlite3.

Permissions

Make sure that the Planeteria directory is accessible by the web server (read/execute permission). You also need to give the server write permission for the following directories:

/data
/www
/log

Server Configuration

For those setting up a virtual host on a Mac, this site walks you through the process in more detail than described below.

In your /etc/hosts file, add a new line underneath 127.0.0.1 localhost that says

127.0.0.1 planeteria.local

In your httpd.conf file, make sure it points to the /extra/httpd-vhosts.conf file like below. Verify the file path!

# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf

(The second line is commented out by default.)

In your /extra/httpd-vhosts.conf file, add the following settings:

<VirtualHost *:80>
    ServerName  planeteria.local (it should match the server name in your /etc/hosts file)
    ServerAdmin [email protected]
    DocumentRoot "/path/to/Planeteria/www"
    ErrorLog ${APACHE_LOG_DIR}/planeteria-error.log
    TransferLog ${APACHE_LOG_DIR}/planeteria-access.log
    LogLevel debug
</VirtualHost>

<Directory "/path/to/Planeteria/www/">    
    Options +ExecCGI +FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    AddHandler cgi-script cgi py pl
</Directory>

Make sure to replace /path/to/Planeteria with the full file path to the location of the cloned Planeteria repo. Be especially attentive to the trailing slashes and quotation marks around the file paths, they may vary from machine to machine and can make the difference of whether the server can find the root directory or not.

Once your settings are saved, reboot the server and follow the directions above to load the site.

Set base href

You need to tell Planeteria what domain and directory it lives in by creating a data/base_href file with the domain. It must start with http://. On the server which runs the site, that file contains http://planeteria.org. On Aleta's virtual host, the base_href file contains http://planeteria.local which just adds http:// to the server name used in her /etc/hosts file.

Automatic updates

In a sandbox environment, you can choose to generate the html files as needed by running planeteria.py in the Terminal. However if you want to deploy the site on a server to run on its own, you will need to set up a cron job to run planeteria.py automatically every so often. Planeteria.org runs it every 15 minutes.

To set this up, add a line to your crontab:

15 * * * * cd /path/to/Planeteria; ./planeteria.py

Happy hacking!

planeteria's People

Contributors

dtiburon avatar jvasile avatar brainwane avatar wraithan avatar

Watchers

Mel Chua avatar James Cloos 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.