<?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>GFMorris.org &#187; Planet</title>
	<atom:link href="http://gfmorris.org/categories/planet/feed/" rel="self" type="application/rss+xml" />
	<link>http://gfmorris.org</link>
	<description>Smart Guy, Dumb Code</description>
	<lastBuildDate>Sat, 17 Jul 2010 15:39:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Planet, Shell Scripts, and Binary Locations</title>
		<link>http://gfmorris.org/archives/2006/07/13/planet-shell-scripts-and-binary-locations/</link>
		<comments>http://gfmorris.org/archives/2006/07/13/planet-shell-scripts-and-binary-locations/#comments</comments>
		<pubDate>Thu, 13 Jul 2006 18:11:28 +0000</pubDate>
		<dc:creator>Geof F. Morris</dc:creator>
				<category><![CDATA[Planet]]></category>
		<category><![CDATA[Shell Scripts]]></category>

		<guid isPermaLink="false">http://gfmorris.org/archives/2006/07/13/planet-shell-scripts-and-binary-locations/</guid>
		<description><![CDATA[I ran into some issues in the last week or so with getting my Planet-updating shell script invoked by CRON; it would run when I ran the script by hand, but it wouldn&#8217;t run when cPanel&#8217;s CRON spooler would try to invoke it. I was getting the following error: Traceback (most recent call last): File [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into some issues in the last week or so with getting <a href="http://gfmorris.org/archives/2006/05/23/shell-script-for-planetplanet-cron-job/">my Planet-updating shell script</a> invoked by CRON; it would run when I ran the script by hand, but it wouldn&#8217;t run when cPanel&#8217;s CRON spooler would try to invoke it.  I was getting the following error:</p>
<blockquote><p>Traceback (most recent call last):<br />
  File &#8220;./planet.py&#8221;, line 23, in ?<br />
    import planet<br />
  File &#8220;./planet/__init__.py&#8221;, line 23, in ?<br />
    from planet.truncate import _TruncateHTMLProcessor<br />
  File &#8220;./planet/truncate.py&#8221;, line 2, in ?<br />
    import textwrap<br />
ImportError: No module named textwrap</p></blockquote>
<p>After looking confused for a while, I talked to my local python guru, <a href="http://grandes.com/">Stephen Granade</a>, and he pointed something out to me: textwrap.py is a Python 2.3-era addition, so I probably had a Python environment issue.  [My server has 2.2.x and 2.4.x installed.  Silly cPanel.]</p>
<p>Armed with this knowledge, I futzed around for a while and figured out that my shell script was missing an invocation of the Python environment.  I have updated it:</p>
<blockquote><p><code>#!/bin/csh -f<br />
cd /home/path/to/planet<br />
/path/to/python/binary ./planet.py ./config.ini</code></p></blockquote>
<p>Consult your system adminstrator if you don&#8217;t know /path/to/python/binary.  If you&#8217;re the sysadmin and can&#8217;t find the Python binary, please ram your forehead into your desk repeatedly.</p>
<p>Thanks again, Stephen.  I owe you a beer.</p>
<img src="http://gfmorris.org/wordpress/?ak_action=api_record_view&id=23&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://gfmorris.org/archives/2006/07/13/planet-shell-scripts-and-binary-locations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GFMorris.net: My Personal Planet</title>
		<link>http://gfmorris.org/archives/2006/06/13/gfmorrisnet-my-personal-planet/</link>
		<comments>http://gfmorris.org/archives/2006/06/13/gfmorrisnet-my-personal-planet/#comments</comments>
		<pubDate>Tue, 13 Jun 2006 17:21:37 +0000</pubDate>
		<dc:creator>Geof F. Morris</dc:creator>
				<category><![CDATA[Planet]]></category>

		<guid isPermaLink="false">http://gfmorris.org/archives/2006/06/13/gfmorrisnet-my-personal-planet/</guid>
		<description><![CDATA[I finally got enough determination to hack on Planet enough to make it work for me; having already built a shell script to update Planet via CRON, I decided to strip most of the extraneous HTML out of the included examples/basic/index.html.tmpl to create my own templates/planet.inc; a php include() statement later, and GFMorris.net is my [...]]]></description>
			<content:encoded><![CDATA[<p>I finally got enough determination to hack on Planet enough to make it work for me; having already built a <a href="http://gfmorris.org/archives/2006/05/23/shell-script-for-planetplanet-cron-job/">shell script to update Planet via CRON</a>, I decided to strip most of the extraneous HTML out of the included examples/basic/index.html.tmpl to create my own templates/planet.inc; a php include() statement later, and <a href="http://gfmorris.net/">GFMorris.net is my own Personal Planet</a>.</p>
<img src="http://gfmorris.org/wordpress/?ak_action=api_record_view&id=22&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://gfmorris.org/archives/2006/06/13/gfmorrisnet-my-personal-planet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Shell Script for PlanetPlanet CRON Job</title>
		<link>http://gfmorris.org/archives/2006/05/23/shell-script-for-planetplanet-cron-job/</link>
		<comments>http://gfmorris.org/archives/2006/05/23/shell-script-for-planetplanet-cron-job/#comments</comments>
		<pubDate>Tue, 23 May 2006 13:13:10 +0000</pubDate>
		<dc:creator>Geof F. Morris</dc:creator>
				<category><![CDATA[Planet]]></category>
		<category><![CDATA[Shell Scripts]]></category>

		<guid isPermaLink="false">http://gfmorris.org/archives/2006/05/23/shell-script-for-planetplanet-cron-job/</guid>
		<description><![CDATA[Has Sam Ruby gotten you excited about PlanetPlanet, even though you don&#8217;t know Python from Perl? Got it running, but don&#8217;t have a clue how to get CRON up and running with a shell script? Yeah, that was me yesterday. Google provided some help, eventually, but I&#8217;ll break it down a little more for you: [...]]]></description>
			<content:encoded><![CDATA[<p>Has <a href="http://www.intertwingly.net/blog/">Sam Ruby</a> gotten you excited about <a href="http://planetplanet.org/">Planet<strike>Planet</strike></a>, even though you don&#8217;t know Python from Perl?  Got it running, but don&#8217;t have a clue how to get CRON up and running with a shell script?  Yeah, that was me yesterday.  Google provided some help, eventually, but I&#8217;ll break it down a little more for you:</p>
<ol>
<li><strong>Make sure all your file permissions are right</strong>.  Half of my hell yesterday was having done all the work as root but not having CHOWN&#8217;d and CHGRP&#8217;d as appropriate.</li>
<li><strong><a href="http://support.invisionfree.com/index.php?showtopic=252790">Use your shell script to change to the appopriate directory before invoking planet.py</a></strong>.  I&#8217;d never really had to do that, as I&#8217;m still a babe in the shell-scripting woods.  But if you go in, cd to the /path/to/your/planet.py, then invoke ./planet.py /path/relative/to/config.ini, you&#8217;ll be rockin&#8217;.</li>
</ol>
<p>My shell script looks like:</p>
<blockquote><p><code>#!/bin/csh -f<br />
cd /home/path/to/planet<br />
/path/to/python/binary ./planet.py ./config.ini</code></p></blockquote>
<p>Now, I simplified things by putting config.ini and planet.py in the same folder.  If you didn&#8217;t [for example, if you're using examples/basic/config.ini just for funsies], you&#8217;d just invoke ./planet.py ./path/examples/basic/config.ini.</p>
<p>Thanks, Sam, for pushing me over the edge to play with Planet<strike>Planet</strike>.  Now it&#8217;s time to get the templates like I want them so I can start using it in production.  <img src='http://gfmorris.org/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://gfmorris.org/wordpress/?ak_action=api_record_view&id=21&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://gfmorris.org/archives/2006/05/23/shell-script-for-planetplanet-cron-job/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
