What is Storytlr?
Lifestreaming is the aggregation of all of your actions throughout the web in one place to present a complete picture of your digital life. There are several lifestreaming applications out there, and Storytlr was one of the first.
Storytlr was originally a closed source, hosted web application started by Laurent Eschenauer and Alard Weisscher in 2008. In October 2009 they decided to close the service and in December they open sourced the code.
Considerable community development has occurred since the project was open sourced, including many new plugins, bug fixes and features.
Storytlr is written in PHP and based around the Zend framework. It is usually run on Apache, but works fine on lighttpd and Nginx. The current stable release is 0.9.2, although there is an RC 0.9.3 that works well. Additionally you can use the bleeding edge code on GitHub. I currently maintain my own version of 0.9.3 that has a few more features and plugins you won’t find in the core. You can find it here.
Since it’s coming out of a close source system, expect some rough edges and thin documentation. This is improving all the time with the growing wiki and the issues board. Installation is still one of those rough edges, but it’s fairly easy anyway.
For simplicity I’ll be using the 0.9.2 release from the Google Code site, but these instructions can be easily adapted to other versions. I’ll be doing just about everything from the command line, so if you don’t have shell access, be prepared to tweak things a bit.
First, let’s make sure our server is compatible. 0.9.2 has the following requirements:
- PHP 5
- Zend Framework
An easy way to check compatibility is to use this script.
Most hosts have these extensions. The rarest one is Tidy. For instance, Dreamhost does not run Tidy. If your host doesn’t have Tidy, you can work around it by using a different version with the htmLawed patch.
If you are missing Zend, that can be downloaded here. Make sure to put it in your PHP include path.
Now that you’ve got the requirements met, download the 0.9.2 file and unpack it into your root web directory.
jmhobbs@katya:/var/www/lifestream$ wget http://storytlr.googlecode.com/files/storytlr-0.9.2.tgz --2010-05-07 13:33:05-- http://storytlr.googlecode.com/files/storytlr-0.9.2.tgz Resolving storytlr.googlecode.com... 220.127.116.11 Connecting to storytlr.googlecode.com|18.104.22.168|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 8748114 (8.3M) [application/x-gzip] Saving to: “storytlr-0.9.2.tgz” 100%[============================================>] 8,748,114 233K/s in 36s 2010-05-07 13:33:41 (239 KB/s) - “storytlr-0.9.2.tgz” saved [8748114/8748114] jmhobbs@katya:/var/www/lifestream$ tar -zxf storytlr-0.9.2.tgz jmhobbs@katya:/var/www/lifestream$ ls -a . .. feeds flash friendconnect .htaccess images index.php INSTALL js LICENSE protected storytlr-0.9.2.tgz style themes jmhobbs@katya:/var/www/lifestream$
Now you need to load the database schema. The schema files is located at protected/install/database.sql. If you don’t have a database or user set up, now is the time to do that as well.
jmhobbs@katya:/var/www/lifestream$ cd protected/install/ jmhobbs@katya:/var/www/lifestream/protected/install$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5515 Server version: 5.0.81-1 (Debian) Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database lifestream; Query OK, 1 row affected (0.05 sec) mysql> grant all on lifestream.* to lifestream@localhost identified by 'supersecretpassword'; Query OK, 0 rows affected (0.11 sec) mysql> flush privileges; Query OK, 0 rows affected (0.08 sec) mysql> use lifestream; Database changed mysql> source database.sql Query OK, 0 rows affected (0.00 sec) (Lines Removed For Brevity) Query OK, 0 rows affected (0.00 sec) mysql> Bye jmhobbs@katya:/var/www/lifestream/protected/install$
Your last major step is the configuration file, which goes at protected/config/config.ini. Storytlr provides an example file with good defaults, so we’ll edit that. The key settings to change are:
jmhobbs@katya:/var/www/lifestream$ cd protected/config/ jmhobbs@katya:/var/www/lifestream/protected/config$ ls config.ini.sample jmhobbs@katya:/var/www/lifestream/protected/config$ cp config.ini.sample config.ini jmhobbs@katya:/var/www/lifestream/protected/config$ vim config.ini [general] ;Database connection settings db.adapter=PDO_MYSQL db.host=localhost db.username=lifestream db.password=supersecretpassword db.dbname=lifestream ;Security security.cookie = kg89y6gbval ;Caching ;cache.content = 1 ;cache.metadata = 1 ;cache.path = /tmp/cache/ ;Web deployment settings web.host=lifestream.velvetcache.org web.path=/ web.redirect = 1 web.timezone=America/Chicago jmhobbs@katya:/var/www/lifestream/protected/config$
The Fruits of Our Labor
At this point your lifestream should be working, open a browser and take a look.
Now we need to change our password, so go to the admin page http://www.example.com/admin and log in. The default username and password are admin and storytlr respectively. You can find that under Configure » Password.
There are lots of options to browse through, and I won’t cover them all, but I’d like to run through setting up a source. Sources are the core of lifestreaming, and there are lots of options to choose from. In the admin interface go to Sources and click Add next to a source you want to add, I’ll use Delicious in my example.
This should present you with a form asking for some information. Each source is going to be slightly different, but all should be pretty easy to understand. Fill that out and it should import what it can from that source.
There you have it! Add some more sources until your lifestream really fleshes out.
The very last step, which is often overlooked, is updating your sources. The primary means for this is the PHP script protected/tools/update.php. This must be run from the command line with the name of the user to update. Here’s an example:
jmhobbs@katya:/var/www/lifestream$ php5 protected/tools/update.php admin Memory usage on startup: 4997940 Memory: 5351904 Memory: 5351904 Updating source delicious for user admin [0/2] (5).... found 0 items Updated 1 out of 2 sources in 1 seconds. jmhobbs@katya:/var/www/lifestream$
It’s common to set up a cron job to handle these updates. It’s often important to put in full paths for your cron jobs. This example will update my sources every 10 minutes. You can learn more about cron here.
jmhobbs@katya:/var/www/lifestream$ crontab -e MAILTO=[email protected] # m h dom mon dow command */10 * * * * /usr/bin/php5 /var/www/lifestream/protected/tools/update.php admin jmhobbs@katya:/var/www/lifestream$
Storytlr has lots more features and configuration options, I would encourage you to browse around and make your installation suit your taste. To see an example of a fully customized Storytlr installation, you can visit mine at http://lifestream.velvetcache.org/
Storytlr is rich with opportunities to contribute. It’s fairly young and has lots of finicky little things to figure out, and it can always use one more plugin. Lots of stuff is in the works, including a much simpler installer which will make most of this article obsolete!
Documentation is in need of some TLC, and more eyes on the bug reports would be great.