<commit_before>==============================
django-lifestream Installation
==============================

Requirements
-------------------

* Django (only tested with 0.97trunk)
* `dateutil <http://labix.org/python-dateutil>`_
* `Universal Feed Parser <http://feedparser.org/>`_
* cron

Actual Installation
-------------------

1.	Install the django_lifestream package into your PYTHONPATH using 
	the bundled setup.py by executing ``python setup.py install``
	
2.	Open your project's settings.py and add "django_lifestream" to your
	apps.
	
3.	Now you have to specify some settings for lifestream like the place where
	the cached stream should be stored and what feeds should be included
	in this stream. 
	
	In the demosite's settings.py at the bottom you can find examples of
	all the required settings: ::
		
		INSTALLED_APPS = (
		    'django_lifestream',
		)


		LIFESTREAM_DUMP = os.path.join(os.path.dirname(os.path.abspath(__file__)),'lifestream.dump')
		LIFESTREAM_SOURCES = (
			{'url':'http://zerokspot.com/feed/',
				'class':'zerokspot',
				'content_type':'application/atom+xml'},
		)
	
4.	Now you have to install a cronjob for actually generating the lifestream.
	For this purpose you use the bundled "django_lifestream" script that
	should by now be in your PATH.
	
	Simply add something like this to your crontab:	::
		
		0,30 * * * * /usr/bin/django_lifestream -s 'demosite.settings' -p /path/to/your/projects/parent/directory
	
	Depending on your system's configure you will have to adapt the path 
	given for django_lifestream and the path to your project's parent 
	directory.
	
5.	This should be it. Now every 30 minutes django_lifestream will generate
	a new lifestream.

	<commit_msg>Document the template change<commit_after>==============================
django-lifestream Installation
==============================

Requirements
-------------------

* Django (only tested with 0.97trunk)
* `dateutil <http://labix.org/python-dateutil>`_
* `Universal Feed Parser <http://feedparser.org/>`_
* cron

Actual Installation
-------------------

1.	Install the django_lifestream package into your PYTHONPATH using 
	the bundled setup.py by executing ``python setup.py install``
	
2.	Open your project's settings.py and add "django_lifestream" to your
	apps.
	
3.	Now you have to specify some settings for lifestream like the place where
	the cached stream should be stored and what feeds should be included
	in this stream. 
	
	In the demosite's settings.py at the bottom you can find examples of
	all the required settings: ::
		
		INSTALLED_APPS = (
		    'django_lifestream',
		)


		LIFESTREAM_DUMP = os.path.join(os.path.dirname(os.path.abspath(__file__)),'lifestream.dump')
		LIFESTREAM_SOURCES = (
			{'url':'http://zerokspot.com/feed/',
				'class':'zerokspot',
				'content_type':'application/atom+xml'},
		)
	
4.	Now you have to install a cronjob for actually generating the lifestream.
	For this purpose you use the bundled "django_lifestream" script that
	should by now be in your PATH.
	
	Simply add something like this to your crontab:	::
		
		0,30 * * * * /usr/bin/django_lifestream -s 'demosite.settings' -p /path/to/your/projects/parent/directory
	
	Depending on your system's configure you will have to adapt the path 
	given for django_lifestream and the path to your project's parent 
	directory.
	
5.	This should be it. Now every 30 minutes django_lifestream will generate
	a new lifestream.


How to customize?
-----------------

To customize, I'd recommend that you override django_lifestream/lifesteam.html
which should extend "django_lifestream/base.html" instead of overriding
the base template itself in order to be able to re-use as much as possible.
{'fraction_non_alphanumeric': 0.13452188006482982, 'fraction_numerical': 0.007023230686115613, 'mean_word_length': 3.6814159292035398, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3333848', 'n_tokens_mistral': 1225, 'n_tokens_neox': 1078, 'n_words': 398}