<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bin-Blog &#187; aggregate</title>
	<atom:link href="http://www.bin-co.com/blog/tag/aggregate/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bin-co.com/blog</link>
	<description>Learn about the latest in Web Development - as soon as I do.</description>
	<lastBuildDate>Tue, 13 Oct 2009 18:55:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Seinfeld Calendar &#8211; Simple way to Force Yourself to Create Content Regularly</title>
		<link>http://www.bin-co.com/blog/2007/09/seinfeld-calendar-simple-way-to-force-yourself-to-create-content-regularly/</link>
		<comments>http://www.bin-co.com/blog/2007/09/seinfeld-calendar-simple-way-to-force-yourself-to-create-content-regularly/#comments</comments>
		<pubDate>Sun, 16 Sep 2007 18:01:20 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[aggregate]]></category>
		<category><![CDATA[announce]]></category>
		<category><![CDATA[binnyva.com]]></category>
		<category><![CDATA[blogs]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/2007/09/seinfeld-calendar-simple-way-to-force-yourself-to-create-content-regularly/</guid>
		<description><![CDATA[I created an RSS aggregater for my site BinnyVA.com that aggregates the content from all my sites. The basic idea is to build a Seinfeld Calendar that will force me to continually publish posts &#8211; at least 1 per day. It is very simple to create &#8211; whole system is contained in the following files&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.binnyva.com/'><img class="intro" align="right" src='http://www.bin-co.com/blog/wp-content/uploads/2007/09/binnyva.png' alt='BinnyVA.com' /></a></p>
<p class="intro">I created an RSS aggregater for my site <strong class="highlight"><a href="http://www.binnyva.com/">BinnyVA.com</a> that aggregates the content from all my sites</strong>. The basic idea is to build a <a href="http://lifehacker.com/software/motivation/jerry-seinfelds-productivity-secret-281626.php">Seinfeld Calendar</a> that will <a href="http://blog.binnyva.com/2007/09/binnyvacom-my-seinfeld-calendar/">force me to continually publish</a> posts &#8211; at least 1 per day.</p>
<p>It is very simple to create &#8211; whole system is contained in the following files&#8230;</p>
<h3>fetcher.php</h3>
<p>This will <strong class="highlight">run once a day as a cron</strong> job. It <strong class="highlight">downloads the feeds for all my sites, parses the XML and inserts the new posts into the database</strong>.</p>
<p>The download is done by my <a href="http://www.bin-co.com/php/scripts/load/">load PHP function</a>. It uses the curl library.</p>
<p>The XML parsing uses the <a href="http://www.bin-co.com/php/scripts/xml2array/">xml2array() PHP function</a>. Currently I parse only the RSS format &#8211; I am completely ignoring the atom format.</p>
<p>Finally the data is inserted into the database &#8211; the following data is stored&#8230;</p>
<ul>
<li>Title</li>
<li>Link</li>
<li>Date</li>
<li>Summary</li>
<li>Full Content</li>
<li>Categories/Tags</li>
</ul>
<p>The full file is around 100 lines long.</p>
<h3>index.php</h3>
<p>This is a simple <strong class="highlight">calendar scripts that lists all the posts of each days of one month</strong>. Includes a navigation to enable the visitor to go to the past months as well.</p>
<h3>Other Files</h3>
<p>There is a bit of <a href="http://binnyva.blogspot.com/2006/07/practical-uses-for-modrewrite.html">mod_rewrite</a> code that make sure that the URL are very clean. For example, the URL for April 2007 is <a href="http://www.binnyva.com/2007/04/">http://www.binnyva.com/2007/04/</a>.</p>
<p>The mod_rewrite for this is in the .htaccess file&#8230;</p>
<pre><code><IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([0-9]+)/([0-9]+) index.php?year=$1&#038;month=$2
</IfModule>
</code></pre>
<h2>Don&#8217;t Break the Chain</h2>
<p>Now all you have to do is <strong class="highlight">make sure that each day has at least one post</strong> in it. This system had me creating content continually for the last two months.</p>
<p>If you are looking for an easier way to create the calendar, try out <a href="http://dontbreakthechain.com/">Don&#8217;t break the chain</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2007/09/seinfeld-calendar-simple-way-to-force-yourself-to-create-content-regularly/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

