<?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>*drawcode</title>
	<atom:link href="http://blog.drawcode.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.drawcode.com</link>
	<description>creative engineering, design and development</description>
	<lastBuildDate>Sat, 23 May 2009 19:51:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Python Multi-Platform GUI Frameworks and Libraries for Desktop Applications On Windows, Mac OSX and *nix</title>
		<link>http://blog.drawcode.com/2009/05/23/python-multi-platform-gui-frameworks-and-libraries-for-desktop-applications-on-windows-mac-osx-and-nix/</link>
		<comments>http://blog.drawcode.com/2009/05/23/python-multi-platform-gui-frameworks-and-libraries-for-desktop-applications-on-windows-mac-osx-and-nix/#comments</comments>
		<pubDate>Sat, 23 May 2009 19:33:56 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[engineering]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[wrappers]]></category>

		<guid isPermaLink="false">http://blog.drawcode.com/?p=26</guid>
		<description><![CDATA[Python has some good GUI kits for developers looking to make cross platform tools that are fast and rapid to develop.  There are some great libraries out there to help you get up to speed very fast.
wxPython
wxPython is a GUI toolkit for the Python programming language. It allows Python programmers to create programs with a robust, [...]]]></description>
			<content:encoded><![CDATA[<p>Python has some good GUI kits for developers looking to make cross platform tools that are fast and rapid to develop.  There are some great libraries out there to help you get up to speed very fast.</p>
<h3><span style="font-weight: normal;">wxPython</span></h3>
<p>wxPython is a <strong>GUI toolkit</strong> for the <a href="http://www.python.org/">Python</a> programming language. It allows Python programmers to create programs with a robust, highly functional graphical user interface, simply and easily. It is implemented as a Python extension module (native code) that wraps the popular <a href="http://wxwidgets.org/">wxWidgets</a> cross platform GUI library, which is written in C++.</p>
<p>Like Python and wxWidgets, wxPython is <strong>Open Source</strong> which means that it is free for anyone to use and the source code is available for anyone to look at and modify. Or anyone can contribute fixes or enhancements to the project.</p>
<p>wxPython is a <strong>cross-platform</strong> toolkit. This means that the same program will run on multiple platforms without modification. Currently supported platforms are 32-bit Microsoft Windows, most Unix or unix-like systems, and Macintosh OS X.</p>
<ul>
<li><a href="http://www.wxpython.org/">http://www.wxpython.org/</a></li>
</ul>
<h3><span style="font-weight: normal;">pyQT</span></h3>
<p>PyQt is a set of Python bindings for <a href="http://trolltech.com/">Nokia&#8217;s</a> Qt application framework and runs on all platforms supported by Qt including Windows, MacOS/X and Linux. There are two sets of bindings: PyQt v4 supports Qt v4; and the older PyQt v3 supports Qt v3 and earlier. The bindings are implemented as a set of Python modules and contain over 300 classes and over 6,000 functions and methods.</p>
<ul>
<li><a href="http://www.riverbankcomputing.co.uk/software/pyqt/download">http://www.riverbankcomputing.co.uk/software/pyqt/download</a></li>
<li>Supports lots of great libraries such as:
<ul>
<li>
<ul>
<li>The <strong>QtNetwork</strong> module contains classes for writing UDP and TCP clients and servers. It includes classes that implement FTP and HTTP clients and support DNS lookups. Network events are integrated with the event loop making it very easy to develop networked applications.</li>
<li>The <strong>QtOpenGL</strong> module contains classes that enable the use of OpenGL in rendering 3D graphics in PyQt applications.</li>
<li>The <strong>QtWebKit</strong> module implements a web browser engine based on the <a href="http://webkit.org/">WebKit</a> open source browser engine used by Apple&#8217;s Safari. It allows the methods and properties of Python objects to be published and appear as JavaScript objects to scripts embedded in HTML pages.</li>
<li>The <strong>QtScript</strong> module contains classes that enable PyQt applications to be scripted using Qt&#8217;s JavaScript interpreter.</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3><span style="font-weight: normal;">PyGTK: GTK+ for Python</span></h3>
<p>PyGTK lets you to <strong>easily create programs with a graphical user interface</strong> using the Python programming language. The underlying GTK+ library provides all kind of visual elements and utilities for it and, if needed, you can develop full featured applications for the GNOME Desktop.</p>
<p>PyGTK applications are truly <strong>multiplatform</strong> and they&#8217;re able to run, unmodified, on Linux, Windows, MacOS X and other platforms.</p>
<ul>
<li><a href="http://www.pygtk.org/">http://www.pygtk.org/</a></li>
</ul>
<h3>Opinion</h3>
<p>My personal opinion is that wxPython is best for many windows developers.  PyQt looks great and has many great libraries, Qt itself is a very fast C++ library so using it is beneficial.  PyGTK is also great but more common for *nix apps.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawcode.com/2009/05/23/python-multi-platform-gui-frameworks-and-libraries-for-desktop-applications-on-windows-mac-osx-and-nix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reading from the Windows Registry in Python</title>
		<link>http://blog.drawcode.com/2009/05/22/reading-from-the-windows-registry-in-python/</link>
		<comments>http://blog.drawcode.com/2009/05/22/reading-from-the-windows-registry-in-python/#comments</comments>
		<pubDate>Sat, 23 May 2009 01:34:43 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.drawcode.com/?p=24</guid>
		<description><![CDATA[You can read from the Windows registry in Python.  So for instance you can read the location of an application you want to see if it is installed and then run it by finding the installed location of the EXE in the registry, then calling os.command(reg_key_value) or popen2.popen3(reg_key_value) to run it.

import pickle
import struct
import _winreg
&#160;
def [...]]]></description>
			<content:encoded><![CDATA[<p>You can read from the Windows registry in Python.  So for instance you can read the location of an application you want to see if it is installed and then run it by finding the installed location of the EXE in the registry, then calling os.command(reg_key_value) or popen2.popen3(reg_key_value) to run it.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">pickle</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">struct</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">_winreg</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> floater <span style="color: black;">&#40;</span>s<span style="color: black;">&#41;</span>:
  <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #dc143c;">struct</span>.<span style="color: black;">unpack</span> <span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;f&quot;</span>, s<span style="color: black;">&#41;</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> unpickler <span style="color: black;">&#40;</span>s<span style="color: black;">&#41;</span>:
  <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #dc143c;">pickle</span>.<span style="color: black;">loads</span> <span style="color: black;">&#40;</span>s<span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
root = <span style="color: #dc143c;">_winreg</span>.<span style="color: black;">HKEY_CURRENT_USER</span>
key_values = <span style="color: black;">&#91;</span>
  <span style="color: black;">&#40;</span>r<span style="color: #483d8b;">&quot;Software<span style="color: #000099; font-weight: bold;">\P</span>ySoft<span style="color: #000099; font-weight: bold;">\P</span>yApp&quot;</span>, <span style="color: #483d8b;">&quot;owner&quot;</span>, <span style="color: #008000;">unicode</span><span style="color: black;">&#41;</span>,
  <span style="color: black;">&#40;</span>r<span style="color: #483d8b;">&quot;Software<span style="color: #000099; font-weight: bold;">\P</span>ySoft<span style="color: #000099; font-weight: bold;">\P</span>yApp&quot;</span>, <span style="color: #483d8b;">&quot;settings&quot;</span>, <span style="color: #008000;">list</span><span style="color: black;">&#41;</span>,
  <span style="color: black;">&#40;</span>r<span style="color: #483d8b;">&quot;Software<span style="color: #000099; font-weight: bold;">\P</span>ySoft<span style="color: #000099; font-weight: bold;">\P</span>yApp&quot;</span>, <span style="color: #483d8b;">&quot;version&quot;</span>, floater<span style="color: black;">&#41;</span>,
  <span style="color: black;">&#40;</span>r<span style="color: #483d8b;">&quot;Software<span style="color: #000099; font-weight: bold;">\P</span>ySoft<span style="color: #000099; font-weight: bold;">\P</span>yApp&quot;</span>, <span style="color: #483d8b;">&quot;dump&quot;</span>, unpickler<span style="color: black;">&#41;</span>,
<span style="color: black;">&#93;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">for</span> keypath, value_name, factory <span style="color: #ff7700;font-weight:bold;">in</span> key_values:
  hKey = <span style="color: #dc143c;">_winreg</span>.<span style="color: black;">OpenKey</span> <span style="color: black;">&#40;</span>root, keypath, <span style="color: #ff4500;">0</span>, <span style="color: #dc143c;">_winreg</span>.<span style="color: black;">KEY_READ</span><span style="color: black;">&#41;</span>
  value, <span style="color: #008000;">type</span> = <span style="color: #dc143c;">_winreg</span>.<span style="color: black;">QueryValueEx</span> <span style="color: black;">&#40;</span>hKey, value_name<span style="color: black;">&#41;</span>
  <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;%s:%s&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>keypath, value_name<span style="color: black;">&#41;</span>, <span style="color: #483d8b;">&quot;=&gt;&quot;</span>, factory <span style="color: black;">&#40;</span>value<span style="color: black;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.drawcode.com/2009/05/22/reading-from-the-windows-registry-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running a Command From Python, Such as Launching an Application from Python</title>
		<link>http://blog.drawcode.com/2009/05/22/running-a-command-from-python-such-as-launching-an-application-from-python/</link>
		<comments>http://blog.drawcode.com/2009/05/22/running-a-command-from-python-such-as-launching-an-application-from-python/#comments</comments>
		<pubDate>Sat, 23 May 2009 01:31:55 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[engineering]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[popen2]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[running]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.drawcode.com/?p=21</guid>
		<description><![CDATA[You can call the command to launch applications or run commands in Python two ways.
With os.system(my_command)

import os
os.system&#40;&#34;c:\\windows\\notepad.exe&#34;&#41;

Or with popen2.popen3(my_command)

import popen2
popen2.popen3&#40;&#34;c:\\windows\\notepad.exe&#34;&#41;

]]></description>
			<content:encoded><![CDATA[<p>You can call the command to launch applications or run commands in Python two ways.</p>
<p>With os.system(my_command)</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>
<span style="color: #dc143c;">os</span>.<span style="color: black;">system</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>windows<span style="color: #000099; font-weight: bold;">\\</span>notepad.exe&quot;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Or with popen2.popen3(my_command)</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">popen2</span>
<span style="color: #dc143c;">popen2</span>.<span style="color: black;">popen3</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;c:<span style="color: #000099; font-weight: bold;">\\</span>windows<span style="color: #000099; font-weight: bold;">\\</span>notepad.exe&quot;</span><span style="color: black;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.drawcode.com/2009/05/22/running-a-command-from-python-such-as-launching-an-application-from-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>amfast Python Remoting and Services Library for Flash, Flex and other AMF</title>
		<link>http://blog.drawcode.com/2009/05/18/amfast-python-remoting-and-services-library-for-flash-flex-and-other-amf/</link>
		<comments>http://blog.drawcode.com/2009/05/18/amfast-python-remoting-and-services-library-for-flash-flex-and-other-amf/#comments</comments>
		<pubDate>Mon, 18 May 2009 07:21:44 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[engineering]]></category>
		<category><![CDATA[syndication]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[amf]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[gamedev]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.drawcode.com/?p=19</guid>
		<description><![CDATA[pyamf is pretty sweet for Flash remoting with Pythonic server side, but now we have two nicely done and integrated remoting kits for python on the server side.
amfast is a new remoting library  that looks to be as sweet as pyamf (where sweet == fast and useful).  I am checking out amfast now but the [...]]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://pyamf.org/" target="_blank">pyamf </a></strong>is pretty sweet for Flash remoting with Pythonic server side, but now we have two nicely done and integrated remoting kits for python on the server side.</p>
<p><strong><a href="http://code.google.com/p/amfast/" target="_blank">amfast </a></strong>is a new remoting library  that looks to be as sweet as pyamf (where sweet == fast and useful).  I am checking out <a href="http://code.google.com/p/amfast/" target="_blank">amfast </a>now but the speed boost alone might be worth it.  For instance, working with real-time games, when you need static content you need to grab that quickly sometimes via a content service.  The faster that link the better. It also has <a href="http://twistedmatrix.com/trac/" target="_blank">Twisted</a> integration which is great for networking and <a href="http://www.sqlalchemy.org/" target="_blank">SQLAlchemy </a>integration which is in my opinion the best ORM for python (pyamf has twisted, django, pylons, sqlalchemy as well)</p>
<p><a href="http://code.google.com/p/amfast/" target="_blank">amfast </a>is well documented and has some great examples.  If you have the Python addiction, check it.</p>
<blockquote>
<h3><a name="Description">Description</a></h3>
<ul>
<li><a name="Description">AmFast is a Flash remoting framework for Python. </a></li>
<li><a name="Description">AmFast can use AMF to communicate between Python and Flash, Flex, and any other system that supports AMF. </a></li>
<li><a name="Description">AMF is a binary object serialization protocol used by Actionscript based applications. </a></li>
</ul>
<h3><a name="Server_Features">Server Features</a></h3>
<ul>
<li><a name="Server_Features">Support for NetConnection and RemoteObject RPC. </a></li>
<li><a name="Server_Features">Support for Producer/Consumer ‘push’ messaging with HTTP polling, HTTP long-polling, and real-time HTTP streaming channels. </a></li>
<li><a name="Server_Features">Support for authentication with NetConnection and RemoteObject. </a></li>
<li><a name="Server_Features">Flexible Target mapping system to map message destinations to invokable Target objects. </a></li>
<li><a name="Server_Features">Support for ChannelSets with multiple Channels to expose resources in different ways. </a></li>
<li><a name="Server_Features">Built in Channels for </a><a rel="nofollow" href="http://cherrypy.org/">CherryPy</a>, <a rel="nofollow" href="http://twistedmatrix.com/trac/">Twisted Web</a>, and plain WSGI.</li>
<li>Support for configurable Endpoints. Use AmFast’s built-in AMF encoder/decoder C-extension, or use an external AMF encoder/decoder, such as <a rel="nofollow" href="http://pyamf.org/">PyAmf</a> for a pure-Python implementation.</li>
</ul>
<h3><a name="AMF_Encoder/Decoder_Features">AMF Encoder/Decoder Features</a></h3>
<ul>
<li><a name="AMF_Encoder/Decoder_Features">AMF0/AMF3 encoder/decoder written in C as a Python extension for speed. </a></li>
<li><a name="AMF_Encoder/Decoder_Features">More than 10x faster than the </a><a rel="nofollow" href="http://pyamf.org/">PyAmf</a> encoder/decoder (even when using <a rel="nofollow" href="http://pyamf.org/">PyAmf’s</a> optional C-extension).</li>
<li>Map custom classes with ClassDef objects for complete control over serialization/de-serialization.</li>
<li>Full support for IExternalizable objects.</li>
<li>Data persistence with <a rel="nofollow" href="http://www.sqlalchemy.org/">SqlAlchemy</a> including remotely-loadable lazy-loaded attributes.</li>
<li>Actionscript code generation from ClassDef objects.</li>
</ul>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawcode.com/2009/05/18/amfast-python-remoting-and-services-library-for-flash-flex-and-other-amf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamically Loading Classes in Python using Reflection/Inspection w/ Inspect Module</title>
		<link>http://blog.drawcode.com/2009/03/03/dynamically-loading-classes-in-python-using-reflectioninspection-w-inspect-module/</link>
		<comments>http://blog.drawcode.com/2009/03/03/dynamically-loading-classes-in-python-using-reflectioninspection-w-inspect-module/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 21:31:58 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[engineering]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[introspection]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.drawcode.com/?p=15</guid>
		<description><![CDATA[Python is a dynamic language that you can pretty much use for anything.  One area that is pretty common is loading up a dynamic class.  Let&#8217;s say you get back a list of classes and you want to initialize one into an object and use it.  You can use the script below [...]]]></description>
			<content:encoded><![CDATA[<p>Python is a dynamic language that you can pretty much use for anything.  One area that is pretty common is loading up a dynamic class.  Let&#8217;s say you get back a list of classes and you want to initialize one into an object and use it.  You can use the script below to load in a python class from introspection.</p>
<pre>    classname = "ClassToLookFor"
    the_module = __import__("my.module", globals(), locals(), [classname])
    the_class = getattr(the_module, classname)
    obj = the_class()</pre>
<p>More on introspection in Python (sometimes called Reflection in other languages like C# and Java):</p>
<ul>
<li><a href="http://docs.python.org/library/inspect.html" target="_blank">Python docs on introspection using the inspect module</a></li>
<li><a href="http://www.ibm.com/developerworks/library/l-pyint.html" target="_blank">IBM page on a tour of Python introspection</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawcode.com/2009/03/03/dynamically-loading-classes-in-python-using-reflectioninspection-w-inspect-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Script to Backup MySql Databases (Wordpress or other databases)</title>
		<link>http://blog.drawcode.com/2009/02/10/python-script-to-backup-mysql-databases-wordpress-or-other-databases/</link>
		<comments>http://blog.drawcode.com/2009/02/10/python-script-to-backup-mysql-databases-wordpress-or-other-databases/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 06:38:51 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[syndication]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.drawcode.com/?p=11</guid>
		<description><![CDATA[We have lots of blogs to manage and keep backed up so we employ Python scripts that are scheduled to run every day and backup the full database sets. Python is a great language because you can use it for web development (WSGI/Django/etc), game development, automation, systems administration, desktop apps and many other things.  We [...]]]></description>
			<content:encoded><![CDATA[<p>We have lots of blogs to manage and keep backed up so we employ Python scripts that are scheduled to run every day and backup the full database sets. Python is a great language because you can use it for web development (WSGI/Django/etc), game development, automation, systems administration, desktop apps and many other things.  We will have more python scripts here on how we use it to run things.  Keep in mind these are cross platform because we manage applications on all types of environments from Windows, to UNIX/Linux to OSX (same as *nix really).</p>
<h2>How to Use</h2>
<p>Use this script by scheduling it to run nightly or when you choose.  Then make a folder under it called target or change the location in the script.</p>
<p>The file that will export will be a complete sql dump and stamped like the following filename, it contains the zipped up database.sql file that is your backup:<br />
export-2009-02-03-Tuesday.zip</p>
<p>If you need to change settings to get flat files or other read on mysqldump utility to pass the options you need, currently it backs up in SQL format.</p>
<h2>The Script</h2>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">os</span>, <span style="color: #dc143c;">time</span>, <span style="color: #dc143c;">sys</span>, <span style="color: #dc143c;">zipfile</span>, <span style="color: #dc143c;">datetime</span>,<span style="color: #dc143c;">calendar</span>
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">os</span> <span style="color: #ff7700;font-weight:bold;">import</span> sep
&nbsp;
<span style="color: #808080; font-style: italic;"># Script Parameters</span>
<span style="color: #808080; font-style: italic;"># Target Directory for final Zip files</span>
target_dir = r<span style="color: #483d8b;">'target'</span>
copy_dir = r<span style="color: #483d8b;">'copy'</span>
<span style="color: #808080; font-style: italic;"># The name of the sql file (this will be the same for all backups)</span>
file_name = <span style="color: #483d8b;">'databases.sql'</span>
<span style="color: #808080; font-style: italic;"># Authentication</span>
<span style="color: #dc143c;">user</span> = <span style="color: #483d8b;">'[YOUR USER]'</span>
password = <span style="color: #483d8b;">'[YOUR PASSWORD]'</span>
<span style="color: #808080; font-style: italic;"># The command for the mysql dump. This could include the entire path to the executable if mysqldump is not on the path environment variable</span>
dumpcmd = r<span style="color: #483d8b;">'mysqldump'</span>
<span style="color: #808080; font-style: italic;"># The host you want to connect to</span>
host = <span style="color: #483d8b;">'localhost'</span> 
&nbsp;
args = <span style="color: black;">&#91;</span>dumpcmd, <span style="color: #483d8b;">'-C'</span>, <span style="color: #483d8b;">'-f'</span>, <span style="color: #483d8b;">'--host=%s'</span> <span style="color: #66cc66;">%</span>host, <span style="color: #483d8b;">'--user=%s'</span> <span style="color: #66cc66;">%</span><span style="color: #dc143c;">user</span>, <span style="color: #483d8b;">'--password=%s'</span> <span style="color: #66cc66;">%</span>password, <span style="color: #483d8b;">'--result-file=%s'</span> <span style="color: #66cc66;">%</span>file_name, <span style="color: #483d8b;">'--all-databases'</span><span style="color: black;">&#93;</span>
&nbsp;
<span style="color: #dc143c;">os</span>.<span style="color: black;">chdir</span><span style="color: black;">&#40;</span>target_dir<span style="color: black;">&#41;</span>
<span style="color: #dc143c;">cmd</span> = <span style="color: #483d8b;">' '</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>args<span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'Running Command: %s'</span> <span style="color: #66cc66;">%</span><span style="color: #dc143c;">cmd</span>.<span style="color: black;">replace</span><span style="color: black;">&#40;</span>password, <span style="color: #483d8b;">'*'</span><span style="color: #66cc66;">*</span><span style="color: #008000;">len</span><span style="color: black;">&#40;</span>password<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
<span style="color: #dc143c;">os</span>.<span style="color: black;">system</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">cmd</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Below is for zipping the files and creating a redundant  backup</span>
<span style="color: #ff7700;font-weight:bold;">def</span> getZipFileName<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
	<span style="color: #808080; font-style: italic;"># Set time variables (</span>
	<span style="color: #808080; font-style: italic;"># Note: you don't have to use some of them,</span>
	<span style="color: #808080; font-style: italic;"># but they make the script easier to understand</span>
	t = <span style="color: #dc143c;">time</span>.<span style="color: #dc143c;">time</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: #66cc66;">;</span> g = <span style="color: #dc143c;">time</span>.<span style="color: black;">gmtime</span><span style="color: black;">&#40;</span>t<span style="color: black;">&#41;</span>
	year = g<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">;</span> month = g<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">;</span> day = g<span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span>
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">try</span>:
		<span style="color: #dc143c;">datetime</span>.<span style="color: black;">date</span><span style="color: black;">&#40;</span>year, month, day+<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">except</span>:
		<span style="color: #808080; font-style: italic;"># Last day of the month, return month name</span>
		root = <span style="color: #dc143c;">time</span>.<span style="color: black;">strftime</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'%Y'</span>, g<span style="color: black;">&#41;</span>
		<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">access</span><span style="color: black;">&#40;</span>root, <span style="color: #dc143c;">os</span>.<span style="color: black;">F_OK</span><span style="color: black;">&#41;</span>:
			<span style="color: #dc143c;">os</span>.<span style="color: black;">mkdir</span><span style="color: black;">&#40;</span>root<span style="color: black;">&#41;</span>
		<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>root, <span style="color: #483d8b;">'%s.zip'</span> <span style="color: #66cc66;">%</span><span style="color: #dc143c;">time</span>.<span style="color: black;">strftime</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'%b'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">int</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">time</span>.<span style="color: black;">strftime</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'%w'</span>, g<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> == <span style="color: #ff4500;">0</span>:
		<span style="color: #808080; font-style: italic;"># Last day of week, return week number</span>
		cal_month = <span style="color: #dc143c;">calendar</span>.<span style="color: black;">monthcalendar</span><span style="color: black;">&#40;</span>year, month<span style="color: black;">&#41;</span>
		<span style="color: #ff7700;font-weight:bold;">for</span> week <span style="color: #ff7700;font-weight:bold;">in</span> cal_month:
			<span style="color: #ff7700;font-weight:bold;">if</span> day <span style="color: #ff7700;font-weight:bold;">in</span> week:
				<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #483d8b;">'Week%i.zip'</span> <span style="color: #66cc66;">%</span>month.<span style="color: black;">index</span><span style="color: black;">&#40;</span>week<span style="color: black;">&#41;</span>
	<span style="color: #808080; font-style: italic;"># Just a regular weekday...</span>
	<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #483d8b;">'%s.zip'</span> <span style="color: #66cc66;">%</span><span style="color: #dc143c;">time</span>.<span style="color: black;">strftime</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'%A'</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Write the zip file</span>
zip_name = <span style="color: #483d8b;">'export-'</span> + <span style="color: #008000;">str</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">datetime</span>.<span style="color: black;">date</span>.<span style="color: black;">today</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> + <span style="color: #483d8b;">'-'</span> + getZipFileName<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
zip_file = <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">abspath</span><span style="color: black;">&#40;</span>zip_name<span style="color: black;">&#41;</span>
<span style="color: #008000;">zip</span> = <span style="color: #dc143c;">zipfile</span>.<span style="color: black;">ZipFile</span><span style="color: black;">&#40;</span>zip_file, <span style="color: #483d8b;">'w'</span>, <span style="color: #dc143c;">zipfile</span>.<span style="color: black;">ZIP_DEFLATED</span><span style="color: black;">&#41;</span>
<span style="color: #008000;">zip</span>.<span style="color: black;">write</span><span style="color: black;">&#40;</span>file_name<span style="color: black;">&#41;</span>
<span style="color: #008000;">zip</span>.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Remove uncompressed sql file</span>
<span style="color: #dc143c;">os</span>.<span style="color: black;">remove</span><span style="color: black;">&#40;</span>file_name<span style="color: black;">&#41;</span>
to_path = <span style="color: #dc143c;">os</span>.<span style="color: black;">path</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>copy_dir, zip_name<span style="color: black;">&#41;</span>
to_dir = sep.<span style="color: black;">join</span><span style="color: black;">&#40;</span>to_path.<span style="color: black;">split</span><span style="color: black;">&#40;</span>sep<span style="color: black;">&#41;</span><span style="color: black;">&#91;</span>:-<span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">access</span><span style="color: black;">&#40;</span>to_dir, <span style="color: #dc143c;">os</span>.<span style="color: black;">F_OK</span><span style="color: black;">&#41;</span>:
	<span style="color: #dc143c;">os</span>.<span style="color: black;">makedirs</span><span style="color: black;">&#40;</span>to_dir<span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #dc143c;">os</span>.<span style="color: black;">access</span><span style="color: black;">&#40;</span>to_path, <span style="color: #dc143c;">os</span>.<span style="color: black;">F_OK</span><span style="color: black;">&#41;</span>:
	<span style="color: #dc143c;">os</span>.<span style="color: black;">remove</span><span style="color: black;">&#40;</span>to_path<span style="color: black;">&#41;</span>
<span style="color: #dc143c;">shutil</span>.<span style="color: #dc143c;">copy</span><span style="color: black;">&#40;</span>zip_file, to_path<span style="color: black;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.drawcode.com/2009/02/10/python-script-to-backup-mysql-databases-wordpress-or-other-databases/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Common Social Network Functionality</title>
		<link>http://blog.drawcode.com/2009/01/06/common-social-network-functionality/</link>
		<comments>http://blog.drawcode.com/2009/01/06/common-social-network-functionality/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 21:21:31 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.drawcode.com/?p=9</guid>
		<description><![CDATA[
User

Auth
Personal

Name
Location
Attributes


State

IsLoggedIn




Friends
Stats

GamesPlayed
AppsUsed
GameStats
GameAchievements


Relations

User

Groups
Friends
Status
etc.


Friends

IsFriends
IsFriendUsingGame
IsFriendUsingApp


Apps

SignedUpForApps


Stats

stats for apps
stat for games




Feed
Market

Items

Purchased
Wishlist
Own




Apps

SignedUp


Games

GameList
GamesPlayed


Status

CurrentStatus
PreviousStatus
Emotion




Friends

getFriends
setFriends ?
getFriend
setFriend ?


Groups

getGroups
setGroups ?
getGroup
setGroup ?



List of API actions in OpenSocial and Facebook,
You can see they vary, having a common library for social networks and widgets are needed these days as the frameworks grow
OPEN SOCIAL API DOCS: http://code.google.com/apis/opensocial/docs/0.8/reference/
OpenSocial API Reference (v0.8)
The OpenSocial JavaScript API includes two namespaces: opensocial.* and gadgets.*. This page [...]]]></description>
			<content:encoded><![CDATA[<ul id="gyom1" style="font-family: Trebuchet MS;">
<li id="gyom2"><strong>User</strong>
<ul id="dii-">
<li id="gyom2">Auth</li>
<li id="gyom2">Personal
<ul>
<li id="gyom2">Name</li>
<li id="gyom2">Location</li>
<li id="gyom2">Attributes</li>
</ul>
</li>
<li id="gyom2">State
<ul id="vouh">
<li id="gyom2">IsLoggedIn</li>
</ul>
</li>
</ul>
</li>
<li id="gyom2"><strong>Friends</strong></li>
<li id="gyom2"><strong>Stats</strong>
<ul id="gozb">
<li id="gyom2">GamesPlayed</li>
<li id="gyom2">AppsUsed</li>
<li id="gyom2">GameStats</li>
<li id="gyom2">GameAchievements</li>
</ul>
</li>
<li id="gyom2"><strong>Relations</strong>
<ul id="vouh2">
<li id="gyom2">User
<ul>
<li id="gyom2">Groups</li>
<li id="gyom2">Friends</li>
<li id="gyom2">Status</li>
<li id="gyom2">etc.</li>
</ul>
</li>
<li id="gyom2">Friends
<ul id="u9h2">
<li id="gyom2">IsFriends</li>
<li id="gyom2">IsFriendUsingGame</li>
<li id="gyom2">IsFriendUsingApp<br id="u9h20" /></li>
</ul>
</li>
<li id="gyom2">Apps
<ul id="u9h21">
<li id="gyom2">SignedUpForApps</li>
</ul>
</li>
<li id="gyom2">Stats
<ul id="eu-y">
<li id="gyom2">stats for apps</li>
<li id="gyom2">stat for games<br id="eu-y0" /></li>
</ul>
</li>
</ul>
</li>
<li id="gyom2"><strong>Feed</strong></li>
<li id="gyom2"><strong>Market</strong>
<ul id="wflr">
<li id="gyom2">Items
<ul id="wflr0">
<li id="gyom2">Purchased</li>
<li id="gyom2">Wishlist</li>
<li id="gyom2">Own<br id="wflr1" /></li>
</ul>
</li>
</ul>
</li>
<li id="gyom2"><strong>Apps</strong>
<ul id="wflr2">
<li id="gyom2">SignedUp<br id="wflr3" /></li>
</ul>
</li>
<li id="gyom2"><strong>Games</strong>
<ul id="eu-y1">
<li id="gyom2">GameList</li>
<li id="gyom2">GamesPlayed<br id="eu-y2" /></li>
</ul>
</li>
<li id="gyom2"><strong>Status</strong>
<ul id="eu-y3">
<li id="gyom2">CurrentStatus</li>
<li id="gyom2">PreviousStatus</li>
<li id="gyom2">Emotion</li>
</ul>
</li>
</ul>
<ul id="gyom1" style="font-family: Trebuchet MS;">
<li id="gyom2"><strong>Friends</strong>
<ul id="gyom3">
<li id="gyom4">getFriends</li>
<li id="gyom5">setFriends ?</li>
<li id="gyom6">getFriend</li>
<li id="gyom7">setFriend ?</li>
</ul>
</li>
<li id="gyom8"><strong>Groups</strong>
<ul id="gyom9">
<li id="gyom10">getGroups</li>
<li id="gyom11">setGroups ?</li>
<li id="gyom12">getGroup</li>
<li id="gyom13">setGroup ?</li>
</ul>
</li>
</ul>
<h5>List of API actions in OpenSocial and Facebook,</h5>
<p>You can see they vary, having a common library for social networks and widgets are needed these days as the frameworks grow</p>
<p><br id="u4m4" style="font-family: Trebuchet MS;" />OPEN SOCIAL API DOCS: <a href="http://code.google.com/apis/opensocial/docs/0.8/reference/" target="_blank">http://code.google.com/apis/opensocial/docs/0.8/reference/</a><br id="u4m40" style="font-family: Trebuchet MS;" /></p>
<h5>OpenSocial API Reference (v0.8)</h5>
<p id="u4m42" style="font-family: Trebuchet MS;">The OpenSocial JavaScript API includes two namespaces: opensocial.* and gadgets.*. This page covers the opensocial.* namespace. The gadgets.* namespace is covered in the <a id="u4m47" href="http://code.google.com/apis/opensocial/docs/0.8/reference/gadgets/">Gadgets API Reference</a>.</p>
<h4 id="u4m48" style="font-family: Trebuchet MS;">Contents</h4>
<ul id="u4m49" style="font-family: Trebuchet MS;">
<li id="u4m410"><a id="u4m412" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#types">Type Conventions</a></li>
</ul>
<ul id="u4m413" style="font-family: Trebuchet MS;">
<li id="u4m414"><a id="u4m415" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial">opensocial</a>
<ul id="u4m416">
<li id="u4m417"><a id="u4m418" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Activity">Activity</a>
<ul id="u4m419">
<li id="u4m420"><a id="u4m421" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Activity.Field">Field</a></li>
</ul>
</li>
<li id="u4m422"><a id="u4m423" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Address">Address</a>
<ul id="u4m424">
<li id="u4m425"><a id="u4m426" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Address.Field">Field</a></li>
</ul>
</li>
<li id="u4m427"><a id="u4m428" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.BodyType">BodyType</a>
<ul id="u4m429">
<li id="u4m430"><a id="u4m431" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.BodyType.Field">Field</a></li>
</ul>
</li>
<li id="u4m432"><a id="u4m433" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Collection">Collection</a></li>
<li id="u4m434"><a id="u4m435" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.CreateActivityPriority">CreateActivityPriority</a></li>
<li id="u4m436"><a id="u4m437" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.DataRequest">DataRequest</a>
<ul id="u4m438">
<li id="u4m439"><a id="u4m440" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.DataRequest.DataRequestFields">DataRequestFields</a></li>
<li id="u4m441"><a id="u4m442" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.DataRequest.FilterType">FilterType</a></li>
<li id="u4m443"><a id="u4m444" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.DataRequest.PeopleRequestFields">PeopleRequestFields</a></li>
<li id="u4m445"><a id="u4m446" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.DataRequest.SortOrder">SortOrder</a></li>
</ul>
</li>
<li id="u4m447"><a id="u4m448" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.DataResponse">DataResponse</a></li>
<li id="u4m449"><a id="u4m450" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Email">Email</a>
<ul id="u4m451">
<li id="u4m452"><a id="u4m453" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Email.Field">Field</a></li>
</ul>
</li>
<li id="u4m454"><a id="u4m455" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Enum">Enum</a>
<ul id="u4m456">
<li id="u4m457"><a id="u4m458" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Enum.Drinker">Drinker</a></li>
<li id="u4m459"><a id="u4m460" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Enum.Gender">Gender</a></li>
<li id="u4m461"><a id="u4m462" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Enum.LookingFor">LookingFor</a></li>
<li id="u4m463"><a id="u4m464" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Enum.Presence">Presence</a></li>
<li id="u4m465"><a id="u4m466" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Enum.Smoker">Smoker</a></li>
</ul>
</li>
<li id="u4m467"><a id="u4m468" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Environment">Environment</a>
<ul id="u4m469">
<li id="u4m470"><a id="u4m471" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Environment.ObjectType">ObjectType</a></li>
</ul>
</li>
<li id="u4m472"><a id="u4m473" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.EscapeType">EscapeType</a></li>
<li id="u4m474"><a id="u4m475" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.IdSpec">IdSpec</a>
<ul id="u4m476">
<li id="u4m477"><a id="u4m478" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.IdSpec.Field">Field</a></li>
<li id="u4m479"><a id="u4m480" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.IdSpec.PersonId">PersonId</a></li>
</ul>
</li>
<li id="u4m481"><a id="u4m482" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.MediaItem">MediaItem</a>
<ul id="u4m483">
<li id="u4m484"><a id="u4m485" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.MediaItem.Field">Field</a></li>
<li id="u4m486"><a id="u4m487" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.MediaItem.Type">Type</a></li>
</ul>
</li>
<li id="u4m488"><a id="u4m489" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Message">Message</a>
<ul id="u4m490">
<li id="u4m491"><a id="u4m492" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Message.Field">Field</a></li>
<li id="u4m493"><a id="u4m494" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Message.Type">Type</a></li>
</ul>
</li>
<li id="u4m495"><a id="u4m496" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Name">Name</a>
<ul id="u4m497">
<li id="u4m498"><a id="u4m499" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Name.Field">Field</a></li>
</ul>
</li>
<li id="u4m4100"><a id="u4m4101" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.NavigationParameters">NavigationParameters</a>
<ul id="u4m4102">
<li id="u4m4103"><a id="u4m4104" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.NavigationParameters.DestinationType">DestinationType</a></li>
<li id="u4m4105"><a id="u4m4106" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.NavigationParameters.Field">Field</a></li>
</ul>
</li>
<li id="u4m4107"><a id="u4m4108" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Organization">Organization</a>
<ul id="u4m4109">
<li id="u4m4110"><a id="u4m4111" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Organization.Field">Field</a></li>
</ul>
</li>
<li id="u4m4112"><a id="u4m4113" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Permission">Permission</a></li>
<li id="u4m4114"><a id="u4m4115" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Person">Person</a>
<ul id="u4m4116">
<li id="u4m4117"><a id="u4m4118" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Person.Field">Field</a></li>
</ul>
</li>
<li id="u4m4119"><a id="u4m4120" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Phone">Phone</a>
<ul id="u4m4121">
<li id="u4m4122"><a id="u4m4123" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Phone.Field">Field</a></li>
</ul>
</li>
<li id="u4m4124"><a id="u4m4125" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.ResponseItem">ResponseItem</a>
<ul id="u4m4126">
<li id="u4m4127"><a id="u4m4128" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.ResponseItem.Error">Error</a></li>
</ul>
</li>
<li id="u4m4129"><a id="u4m4130" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Url">Url</a>
<ul id="u4m4131">
<li id="u4m4132"><a id="u4m4133" href="http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Url.Field">Field</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<p><br id="u4m4134" style="font-family: Trebuchet MS;" /><br id="dnic" />FACEBOOK WIKI API DOCS &#8211; http://wiki.developers.facebook.com/index.php/API <br id="dnic0" style="font-family: Trebuchet MS;" /><br id="dnic1" style="font-family: Trebuchet MS;" /></p>
<h5>Facebook REST Interface</h5>
<p id="dnic4" style="font-family: Trebuchet MS;">The API uses a <a id="dnic5" class="extiw" title="wikipedia:Representational_State_Transfer" href="http://en.wikipedia.org/wiki/Representational_State_Transfer">REST</a>-like interface. This means that our Facebook method calls are made over the internet by sending HTTP GET or POST requests to the <a id="dnic6" class="external text" title="http://api.facebook.com/restserver.php" rel="nofollow" href="http://api.facebook.com/restserver.php">Facebook API REST server</a> . Nearly any computer language can be used to communicate over HTTP with the REST server.</p>
<p><a id="dnic7" style="font-family: Trebuchet MS;" name="API_Methods"></a></p>
<h5>API Methods</h5>
<dl id="dnic10" style="font-family: Trebuchet MS;">
<dt id="dnic11"> <a id="dnic12" title="Admin.getAllocation" href="http://wiki.developers.facebook.com/index.php/Admin.getAllocation">Admin.getAllocation</a> </dt>
<dd id="dnic13"> Returns the current allocation limit for your application for the specified integration point. </dd>
<dt id="dnic14"> <a id="dnic15" title="Admin.getMetrics" href="http://wiki.developers.facebook.com/index.php/Admin.getMetrics">Admin.getMetrics</a> </dt>
<dd id="dnic16"> Returns specified metrics for your application, given a time period. </dd>
<dt id="dnic17"> <a id="dnic18" title="Admin.getDailyMetrics" href="http://wiki.developers.facebook.com/index.php/Admin.getDailyMetrics">Admin.getDailyMetrics</a> </dt>
<dd id="dnic19"> Returns specified daily metrics for your application, given a date range. </dd>
<dt id="dnic20"> <a id="dnic21" title="Admin.getAppProperties" href="http://wiki.developers.facebook.com/index.php/Admin.getAppProperties">admin.getAppProperties</a> (BETA) </dt>
<dd id="dnic23"> Returns values of properties for your applications from the Facebook Developer application. </dd>
<dt id="dnic24"> <a id="dnic25" title="Admin.setAppProperties" href="http://wiki.developers.facebook.com/index.php/Admin.setAppProperties">admin.setAppProperties</a> (BETA) </dt>
<dd id="dnic27"> Sets values for properties for your applications in the Facebook Developer application. </dd>
<dt id="dnic28"> <a id="dnic29" title="Application.getPublicInfo" href="http://wiki.developers.facebook.com/index.php/Application.getPublicInfo">application.getPublicInfo</a> (BETA) </dt>
<dd id="dnic31"> Returns public information about a given application (not necessarily your own). </dd>
<dt id="dnic32"> <a id="dnic33" title="Auth.createToken" href="http://wiki.developers.facebook.com/index.php/Auth.createToken">auth.createToken</a> </dt>
<dd id="dnic34"> Creates an auth_token to be passed in as a parameter to login.php and then to auth.getSession after the user has logged in. </dd>
<dt id="dnic36"> <a id="dnic37" title="Auth.getSession" href="http://wiki.developers.facebook.com/index.php/Auth.getSession">auth.getSession</a> </dt>
<dd id="dnic38"> Returns the session key bound to an auth_token, as returned by <a id="dnic39" title="Auth.createToken" href="http://wiki.developers.facebook.com/index.php/Auth.createToken">auth.createToken</a> or in the callback URL. </dd>
<dt id="dnic40"> <a id="dnic41" title="Auth.promoteSession" href="http://wiki.developers.facebook.com/index.php/Auth.promoteSession">auth.promoteSession</a> </dt>
<dd id="dnic42"> Returns a temporary session secret associated to the current existing session, for use in a client-side component to an application. </dd>
<dt id="dnic43"> <a id="dnic44" title="Auth.expireSession" href="http://wiki.developers.facebook.com/index.php/Auth.expireSession">auth.expireSession</a> </dt>
<dd id="dnic45"> Expires the session indicated in the API call, for your application. </dd>
<dt id="dnic46"> <a id="dnic47" title="Batch.run" href="http://wiki.developers.facebook.com/index.php/Batch.run">batch.run</a> (BETA) </dt>
<dd id="dnic49"> Execute a list of individual API calls in a single batch. </dd>
<dt id="dnic50"> <a id="dnic51" title="Data.getCookies" href="http://wiki.developers.facebook.com/index.php/Data.getCookies">data.getCookies</a> (BETA) </dt>
<dd id="dnic53"> Returns all cookies for a given user and application. </dd>
<dt id="dnic54"> <a id="dnic55" title="Data.setCookie" href="http://wiki.developers.facebook.com/index.php/Data.setCookie">data.setCookie</a> (BETA) </dt>
<dd id="dnic57"> Sets a cookie for a given user and application. </dd>
<dt id="dnic58"> <a id="dnic59" title="Events.get" href="http://wiki.developers.facebook.com/index.php/Events.get">events.get</a> </dt>
<dd id="dnic60"> Returns all visible events according to the filters specified. </dd>
<dt id="dnic61"> <a id="dnic62" title="Events.getMembers" href="http://wiki.developers.facebook.com/index.php/Events.getMembers">events.getMembers</a> </dt>
<dd id="dnic63"> Returns membership list data associated with an event. </dd>
<dt id="dnic64"> <a id="dnic65" title="Fbml.refreshImgSrc" href="http://wiki.developers.facebook.com/index.php/Fbml.refreshImgSrc">fbml.refreshImgSrc</a> </dt>
<dd id="dnic66"> Fetches and re-caches the image stored at the given URL. </dd>
<dt id="dnic67"> <a id="dnic68" title="Fbml.refreshRefUrl" href="http://wiki.developers.facebook.com/index.php/Fbml.refreshRefUrl">fbml.refreshRefUrl</a> </dt>
<dd id="dnic69"> Fetches and re-caches the content stored at the given URL. </dd>
<dt id="dnic70"> <a id="dnic71" title="Fbml.setRefHandle" href="http://wiki.developers.facebook.com/index.php/Fbml.setRefHandle">fbml.setRefHandle</a> </dt>
<dd id="dnic72"> Associates a given “handle” with FBML markup so that the handle can be used within the <a id="dnic73" title="Fb:ref" href="http://wiki.developers.facebook.com/index.php/Fb:ref">fb:ref</a> FBML tag. </dd>
<dt id="dnic74"> <a id="dnic75" title="Feed.publishStoryToUser" href="http://wiki.developers.facebook.com/index.php/Feed.publishStoryToUser">feed.publishStoryToUser</a> </dt>
<dd id="dnic76"> Publishes a News Feed story to the user corresponding to the session_key parameter. </dd>
<dt id="dnic78"> <a id="dnic79" title="Feed.publishActionOfUser" href="http://wiki.developers.facebook.com/index.php/Feed.publishActionOfUser">feed.publishActionOfUser</a> </dt>
<dd id="dnic80"> Publishes a Mini-Feed story to the user corresponding to the session_key parameter, and publishes News Feed stories to the friends of that user. </dd>
<dt id="dnic82"> <a id="dnic83" title="Feed.publishTemplatizedAction" href="http://wiki.developers.facebook.com/index.php/Feed.publishTemplatizedAction">feed.publishTemplatizedAction</a> </dt>
<dd id="dnic84"> Publishes a Mini-Feed story to the user or Page corresponding to the session_key or page_actor_id parameter. </dd>
<dt id="dnic87"> <a id="dnic88" title="Fql.query" href="http://wiki.developers.facebook.com/index.php/Fql.query">fql.query</a> </dt>
<dd id="dnic89"> Evaluates an FQL (Facebook Query Language) query. </dd>
<dt id="dnic90"> <a id="dnic91" title="Friends.areFriends" href="http://wiki.developers.facebook.com/index.php/Friends.areFriends">friends.areFriends</a> </dt>
<dd id="dnic92"> Returns whether or not each pair of specified users is friends with each other. </dd>
<dt id="dnic93"> <a id="dnic94" title="Friends.get" href="http://wiki.developers.facebook.com/index.php/Friends.get">friends.get</a> </dt>
<dd id="dnic95"> Returns the identifiers for the current user’s Facebook friends. </dd>
<dt id="dnic96"> <a id="dnic97" title="Friends.getAppUsers" href="http://wiki.developers.facebook.com/index.php/Friends.getAppUsers">friends.getAppUsers</a> </dt>
<dd id="dnic98"> Returns the identifiers for the current user’s Facebook friends who are signed up for the specific calling application. </dd>
<dt id="dnic99"> <a id="dnic100" title="Friends.getLists" href="http://wiki.developers.facebook.com/index.php/Friends.getLists">friends.getLists</a> </dt>
<dd id="dnic101"> Returns the identifiers for the current user’s Facebook friend lists. </dd>
<dt id="dnic102"> <a id="dnic103" title="Groups.get" href="http://wiki.developers.facebook.com/index.php/Groups.get">groups.get</a> </dt>
<dd id="dnic104"> Returns all visible groups according to the filters specified. </dd>
<dt id="dnic105"> <a id="dnic106" title="Groups.getMembers" href="http://wiki.developers.facebook.com/index.php/Groups.getMembers">groups.getMembers</a> </dt>
<dd id="dnic107"> Returns membership list data associated with a group. </dd>
<dt id="dnic108"> <a id="dnic109" title="LiveMessage.send" href="http://wiki.developers.facebook.com/index.php/LiveMessage.send">liveMessage.send</a> (BETA) </dt>
<dd id="dnic111"> Sends a “message” directly to a user’s browser, which can be handled in FBJS. </dd>
<dt id="dnic112"> <a id="dnic113" title="Marketplace.createListing" href="http://wiki.developers.facebook.com/index.php/Marketplace.createListing">marketplace.createListing</a> </dt>
<dd id="dnic114"> Create or modify a listing in Marketplace. </dd>
<dt id="dnic115"> <a id="dnic116" title="Marketplace.getCategories" href="http://wiki.developers.facebook.com/index.php/Marketplace.getCategories">marketplace.getCategories</a> </dt>
<dd id="dnic117"> Returns all the Marketplace categories. </dd>
<dt id="dnic118"> <a id="dnic119" title="Marketplace.getListings" href="http://wiki.developers.facebook.com/index.php/Marketplace.getListings">marketplace.getListings</a> </dt>
<dd id="dnic120"> Return all Marketplace listings either by listing ID or by user. </dd>
<dt id="dnic121"> <a id="dnic122" title="Marketplace.getSubCategories" href="http://wiki.developers.facebook.com/index.php/Marketplace.getSubCategories">marketplace.getSubCategories</a> </dt>
<dd id="dnic123"> Returns the Marketplace subcategories for a particular category. </dd>
<dt id="dnic124"> <a id="dnic125" title="Marketplace.removeListing" href="http://wiki.developers.facebook.com/index.php/Marketplace.removeListing">marketplace.removeListing</a> </dt>
<dd id="dnic126"> Remove a listing from Marketplace. </dd>
<dt id="dnic127"> <a id="dnic128" title="Marketplace.search" href="http://wiki.developers.facebook.com/index.php/Marketplace.search">marketplace.search</a> </dt>
<dd id="dnic129"> Search Marketplace for listings filtering by category, subcategory and a query string. </dd>
<dt id="dnic130"> <a id="dnic131" title="Notifications.get" href="http://wiki.developers.facebook.com/index.php/Notifications.get">notifications.get</a> </dt>
<dd id="dnic132"> Returns information on outstanding Facebook notifications for current session user. </dd>
<dt id="dnic133"> <a id="dnic134" title="Notifications.send" href="http://wiki.developers.facebook.com/index.php/Notifications.send">notifications.send</a> </dt>
<dd id="dnic135"> Sends a notification to a set of users. </dd>
<dt id="dnic136"> <a id="dnic137" title="Notifications.sendRequest" href="http://wiki.developers.facebook.com/index.php/Notifications.sendRequest">notifications.sendRequest</a> </dt>
<dd id="dnic138"> This method is disabled. </dd>
<dt id="dnic140"> <a id="dnic141" title="Notifications.sendEmail" href="http://wiki.developers.facebook.com/index.php/Notifications.sendEmail">notifications.sendEmail</a> </dt>
<dd id="dnic142"> Sends an email to the specified users who have the application. </dd>
<dt id="dnic143"> <a id="dnic144" title="Pages.getInfo" href="http://wiki.developers.facebook.com/index.php/Pages.getInfo">pages.getInfo</a> </dt>
<dd id="dnic145"> Returns all visible pages to the filters specified. </dd>
<dt id="dnic146"> <a id="dnic147" title="Pages.isAdmin" href="http://wiki.developers.facebook.com/index.php/Pages.isAdmin">pages.isAdmin</a> </dt>
<dd id="dnic148"> Checks whether the logged-in user is the admin for a given Page. </dd>
<dt id="dnic149"> <a id="dnic150" title="Pages.isAppAdded" href="http://wiki.developers.facebook.com/index.php/Pages.isAppAdded">pages.isAppAdded</a> </dt>
<dd id="dnic151"> Checks whether the Page has added the application. </dd>
<dt id="dnic152"> <a id="dnic153" title="Pages.isFan" href="http://wiki.developers.facebook.com/index.php/Pages.isFan">pages.isFan</a> </dt>
<dd id="dnic154"> Checks whether a user is a fan of a given Page. </dd>
<dt id="dnic155"> <a id="dnic156" title="Photos.addTag" href="http://wiki.developers.facebook.com/index.php/Photos.addTag">photos.addTag</a> </dt>
<dd id="dnic157"> Adds a tag with the given information to a photo. </dd>
<dt id="dnic158"> <a id="dnic159" title="Photos.createAlbum" href="http://wiki.developers.facebook.com/index.php/Photos.createAlbum">photos.createAlbum</a> </dt>
<dd id="dnic160"> Creates and returns a new album owned by the current session user. </dd>
<dt id="dnic161"> <a id="dnic162" title="Photos.get" href="http://wiki.developers.facebook.com/index.php/Photos.get">photos.get</a> </dt>
<dd id="dnic163"> Returns all visible photos according to the filters specified. </dd>
<dt id="dnic164"> <a id="dnic165" title="Photos.getAlbums" href="http://wiki.developers.facebook.com/index.php/Photos.getAlbums">photos.getAlbums</a> </dt>
<dd id="dnic166"> Returns metadata about all of the photo albums uploaded by the specified user. </dd>
<dt id="dnic167"> <a id="dnic168" title="Photos.getTags" href="http://wiki.developers.facebook.com/index.php/Photos.getTags">photos.getTags</a> </dt>
<dd id="dnic169"> Returns the set of user tags on all photos specified. </dd>
<dt id="dnic170"> <a id="dnic171" title="Photos.upload" href="http://wiki.developers.facebook.com/index.php/Photos.upload">photos.upload</a> </dt>
<dd id="dnic172"> Uploads a photo owned by the current session user and returns the new photo. </dd>
<dt id="dnic173"> <a id="dnic174" title="Profile.setFBML" href="http://wiki.developers.facebook.com/index.php/Profile.setFBML">profile.setFBML</a> </dt>
<dd id="dnic175"> Sets the FBML for a user’s profile, including the content for both the profile box and the profile actions. </dd>
<dt id="dnic176"> <a id="dnic177" title="Profile.getFBML" href="http://wiki.developers.facebook.com/index.php/Profile.getFBML">profile.getFBML</a> </dt>
<dd id="dnic178"> Gets the FBML that is currently set for a user’s profile. </dd>
<dt id="dnic179"> <a id="dnic180" title="Users.getInfo" href="http://wiki.developers.facebook.com/index.php/Users.getInfo">users.getInfo</a> </dt>
<dd id="dnic181"> Returns a wide array of user-specific information for each user identifier passed, limited by the view of the current user. </dd>
<dt id="dnic182"> <a id="dnic183" title="Users.getLoggedInUser" href="http://wiki.developers.facebook.com/index.php/Users.getLoggedInUser">users.getLoggedInUser</a> </dt>
<dd id="dnic184"> Gets the user ID (uid) associated with the current session. </dd>
<dt id="dnic186"> <a id="dnic187" title="Users.hasAppPermission" href="http://wiki.developers.facebook.com/index.php/Users.hasAppPermission">users.hasAppPermission</a> </dt>
<dd id="dnic188"> Checks whether the user has opted in to an extended application permission. </dd>
<dt id="dnic189"> <a id="dnic190" title="Users.isAppAdded" href="http://wiki.developers.facebook.com/index.php/Users.isAppAdded">users.isAppAdded</a> </dt>
<dd id="dnic191"> Returns whether the logged-in user has added the calling application. </dd>
<dt id="dnic192"> <a id="dnic193" title="Users.setStatus" href="http://wiki.developers.facebook.com/index.php/Users.setStatus">users.setStatus</a> </dt>
<dd id="dnic194"> Updates a user’s Facebook status. </dd>
</dl>
<p><a id="dnic195" style="font-family: Trebuchet MS;" name="Batching_API_BETA"></a></p>
<h5>Batching API BETA</h5>
<ul id="dnic199" style="font-family: Trebuchet MS;">
<li id="dnic200"> <a id="dnic201" title="Using batching API" href="http://wiki.developers.facebook.com/index.php/Using_batching_API">Batching API documentation</a></li>
</ul>
<p><a id="dnic204" style="font-family: Trebuchet MS;" name="Data_Store_API_BETA"></a></p>
<h5>Data Store API BETA</h5>
<ul id="dnic208" style="font-family: Trebuchet MS;">
<li id="dnic209"> <a id="dnic210" title="Data Store API documentation" href="http://wiki.developers.facebook.com/index.php/Data_Store_API_documentation">Data Store API documentation</a></li>
</ul>
<p><a id="dnic213" style="font-family: Trebuchet MS;" name="Permissions_API_BETA"></a></p>
<h5>Permissions API BETA</h5>
<ul id="dnic217" style="font-family: Trebuchet MS;">
<li id="dnic218"> <a id="dnic219" title="Permissions API" href="http://wiki.developers.facebook.com/index.php/Permissions_API">Permissions API</a></li>
</ul>
<p><a id="dnic222" style="font-family: Trebuchet MS;" name="Additional_documentation"></a></p>
<h5>Additional documentation</h5>
<ul id="dnic225" style="font-family: Trebuchet MS;">
<li id="dnic226"><a id="dnic227" title="Authentication guide" href="http://wiki.developers.facebook.com/index.php/Authentication_guide">Authentication guide</a></li>
<li id="dnic228"><a id="dnic229" title="Error codes" href="http://wiki.developers.facebook.com/index.php/Error_codes">Error codes</a></li>
<li id="dnic230"><a id="dnic231" title="Extended permissions" href="http://wiki.developers.facebook.com/index.php/Extended_permissions">Extended permissions</a></li>
<li id="dnic232"><a id="dnic233" title="Photo uploads" href="http://wiki.developers.facebook.com/index.php/Photo_uploads">Photo uploads</a></li>
<li id="dnic234"><a id="dnic235" title="Marketplace Listing Attributes" href="http://wiki.developers.facebook.com/index.php/Marketplace_Listing_Attributes">Marketplace Listing Attributes</a></li>
<li id="dnic236"><a id="dnic237" title="Post-Remove URL" href="http://wiki.developers.facebook.com/index.php/Post-Remove_URL">Post-Remove URL</a></li>
<li id="dnic238"><a id="dnic239" title="Storable Information" href="http://wiki.developers.facebook.com/index.php/Storable_Information">Storable Information</a></li>
</ul>
<p><a id="dnic240" style="font-family: Trebuchet MS;" name="External_links"></a></p>
<h5>External links</h5>
<ul id="dnic243" style="font-family: Trebuchet MS;">
<li id="dnic244"> <a id="dnic245" class="external text" title="http://developers.facebook.com/tools.php?api" rel="nofollow" href="http://developers.facebook.com/tools.php?api">API Test Console</a></li>
<li id="dnic246"> <a id="dnic247" class="external text" title="http://www.davidjarvis.ca/facebook" rel="nofollow" href="http://www.davidjarvis.ca/facebook">Object-Oriented Framework for Facebook Applications</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawcode.com/2009/01/06/common-social-network-functionality/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tips for Parsing RSS and ATOM Feeds</title>
		<link>http://blog.drawcode.com/2008/06/22/tips-for-parsing-rss-and-atom-feeds/</link>
		<comments>http://blog.drawcode.com/2008/06/22/tips-for-parsing-rss-and-atom-feeds/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 02:28:31 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[marketing]]></category>
		<category><![CDATA[syndication]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[atom]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[service]]></category>

		<guid isPermaLink="false">http://blog.drawcode.com/?p=5</guid>
		<description><![CDATA[Syndication has many layers built in it these days, but really when you get down to the formats making your own parsers and writers for your syndication formats is quite easy.  Good knowledge of the formats and some basic tricks can make your feeds highly customized and tailored by your own work.
Tips for Generating [...]]]></description>
			<content:encoded><![CDATA[<p>Syndication has many layers built in it these days, but really when you get down to the formats making your own parsers and writers for your syndication formats is quite easy.  Good knowledge of the formats and some basic tricks can make your feeds highly customized and tailored by your own work.</p>
<h2 id="Tips" style="padding-left: 30px;">Tips for Generating Good Feeds</h2>
<p style="padding-left: 30px;">RSS and Atom are easy to work with, but like any new format, you may encounter some problems in using them. This section attempts to address the most common issues that arise when generating a feed.</p>
<ul style="padding-left: 30px;">
<li><strong>Distinct Entries</strong> — Make sure that aggregators can tell   your entries apart, by using different identifiers in <code>rdf:about</code> (RSS 1.0),    <code>guid</code> (RSS 2.0) and <code>id</code> (Atom). This will save a lot of    headaches down the road.</li>
<li><strong>Meaningful Metadata</strong> — Try to make the metadata useful     on its own; for example, if you only include a short     <code>&lt;title&gt;</code>, people may not know what the link is about.     By the same token, if you shove an entire article into     <code>&lt;description&gt;</code>, it’ll crowd people’s view of the feed,     and they’re less likely to stay interested in what you have to say.     Generally, you want to put enough into the feed to help someone decide     whether they should follow the link.</li>
<li><strong>Encoding HTML</strong> — Although it’s tempting, refrain from     including HTML markup (like <code>&lt;a href="..."&gt;</code>,     <code>&lt;b&gt;</code> or <code>&lt;p&gt;</code>) in your RSS feed;     because you don’t know how it will be presented, doing so can prevent     your feed from being displayed correctly. If you need to include a a tag     in the text of the feed (e.g., the title of an entry is “Ode to     &lt;title&gt;”), make sure you escape ampersands and angle brackets (so     that it would be “Ode to &amp;lt;title&amp;gt;”).</li>
<li><strong>XML Entities</strong> — Remember that XML doesn’t predefine     entities like HTML does; therefore, you won’t have     <code>&amp;nbsp;</code> <code>&amp;copy;</code> and other common entities     available. You can define them in the XML, or alternatively just use an     character encoding that makes what you need available.</li>
<li><strong>Character Encoding</strong> — Some software generates feeds     using Windows character sets, and sometimes mislabels them. The safest     thing to do is to encode your feed as UTF-8 and check it by parsing it     with an XML parser.</li>
<li><strong>Communicating with Viewers</strong> — Don’t use entries in your     feed to communicate to your users; for example, some feeds have been     known to use the <code>&lt;description&gt;</code> to dictate copyright     terms. Use the appropriate element or module.</li>
<li><strong>Communicating with Machines</strong> — Likewise, use the     appropriate HTTP status codes if your feed has relocated (usually,     <code>301 Moved Permanently</code>) or is no longer available (<code>410     Gone</code> or <code>404 Not Found</code>).</li>
<li><strong>Making your Feed Cache-Friendly</strong> — Successful feeds     see a fair amount of traffic because clients poll them often to see if     they’ve changed. To support the load, Web Caching can help; see the <a href="http://www.mnot.net/cache_docs/">caching tutorial</a>.</li>
<li><strong>Validate</strong> — use the <a class="offsite" href="http://www.feedvalidator.org/">Feed Validator</a> to catch any problems in your feed; it works     with RSS and Atom. Also, don’t just run it once; make sure you regularly check     your feed, so that you can catch transient errors.</li>
</ul>
<h2 id="Tools" style="padding-left: 30px;">Feed Tools</h2>
<p style="padding-left: 30px;">This is an incomplete list of tools for creating feeds and checking them to make sure that you’ve done so correctly. Note that there are many more libraries that help parsing feeds; these haven’t been included here because this tutorial focuses on the Webmaster, not consumers of feeds.</p>
<ul style="padding-left: 30px;">
<li><a href="http://www.mnot.net/xpath2rss/"><strong>xpath2rss</strong></a> — Tool for scraping Web sites using XPath expressions (a method of     selecting parts of HTML and XML documents).</li>
<li><strong><a class="offsite" href="http://www.w3.org/2000/08/w3c-synd/#">Site Summaries     in XHTML</a></strong> — Online service (also available as an XSLT     stylesheet) that uses hints in your HTML to generate a feed.</li>
<li><a class="offsite" href="http://myrss.com/"><strong>myRSS</strong></a> — An online,     third-party automated scraping service. Doesn’t require any special     markup.</li>
<li><a href="http://www.mnot.net/python/RSS.py"><strong>RSS.py</strong></a> — Python library for generating and parsing RSS.</li>
<li><strong><a class="offsite" href="https://rome.dev.java.net/">ROME</a></strong> —    Java library for parsing and generating RSS and Atom feeds, as well as translating between formats.</li>
<li><strong><a class="offsite" href="http://search.cpan.org/author/EISEN/XML-RSS/">XML::RSS</a></strong> — Perl module for generating and parsing RSS.</li>
<li style="padding-left: 30px;"><strong><a class="offsite" href="http://www.feedvalidator.org/">Online Validator</a></strong> &#8211;    Check your RSS 1.0, 2.0 and Atom feeds.</li>
</ul>
<p>[<a href="http://www.mnot.net/rss/tutorial/" target="_blank">source</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawcode.com/2008/06/22/tips-for-parsing-rss-and-atom-feeds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retro Wall-E Posters</title>
		<link>http://blog.drawcode.com/2008/06/22/retro-wall-e-posters/</link>
		<comments>http://blog.drawcode.com/2008/06/22/retro-wall-e-posters/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 01:49:45 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[entertainment]]></category>
		<category><![CDATA[marketing]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[advertising]]></category>
		<category><![CDATA[cool]]></category>
		<category><![CDATA[movie]]></category>
		<category><![CDATA[pixar]]></category>
		<category><![CDATA[poster]]></category>
		<category><![CDATA[retro]]></category>
		<category><![CDATA[wall-e]]></category>

		<guid isPermaLink="false">http://blog.drawcode.com/?p=4</guid>
		<description><![CDATA[Retro posters are just so cool.  Check out these Retro posters for Wall-E.
Guess Which Movie has this story up but it is so cool I added it to the drawcode web conscious stream.
Eric Tan, who has done retro poster art for Pixar in the past with THE INCREDIBLES and RATATOUILLE, has finished up work on [...]]]></description>
			<content:encoded><![CDATA[<p>Retro posters are just so cool.  Check out these Retro posters for Wall-E.</p>
<p>Guess Which Movie has this story up but it is so cool I added it to the drawcode web conscious stream.</p>
<p style="padding-left: 30px;">Eric Tan, who has done retro poster art for Pixar in the past with THE INCREDIBLES and RATATOUILLE, has finished up work on his new posters for WALL-E. Be sure to visit Eric&#8217;s blog where you can <a style="font-size: 13px; font-weight: bold;" href="http://erictanart.blogspot.com/" target="_blank">check out more of his work</a>, including his retro poster for INDIANA JONES AND THE TEMPLE OF DOOM.</p>
<p style="padding-left: 30px;">
<p><a href="http://www.flickr.com/photos/27544709@N07/2602866064/" title="3_fitgal_thumbnail by ryan.drawcode, on Flickr"><img src="http://farm4.static.flickr.com/3010/2602866064_bd192f3871_o.jpg" width="400" height="585" alt="3_fitgal_thumbnail" /></a></p>
<p><a href="http://www.flickr.com/photos/27544709@N07/2602036609/" title="2_fitgal_thumbnail by ryan.drawcode, on Flickr"><img src="http://farm4.static.flickr.com/3267/2602036609_3ea527d14d_o.jpg" width="540" height="804" alt="2_fitgal_thumbnail" /></a></p>
<p><a href="http://www.flickr.com/photos/27544709@N07/2602865746/" title="1_fitgal_thumbnail by ryan.drawcode, on Flickr"><img src="http://farm4.static.flickr.com/3096/2602865746_999a85c2b2_o.jpg" width="540" height="804" alt="1_fitgal_thumbnail" /></a></p>
<p><a href="http://www.flickr.com/photos/27544709@N07/2602036415/" title="4_fitgal_thumbnail by ryan.drawcode, on Flickr"><img src="http://farm4.static.flickr.com/3211/2602036415_acd4a643f6_o.jpg" width="540" height="804" alt="4_fitgal_thumbnail" /></a></p>
<p><a href="http://www.flickr.com/photos/27544709@N07/2602865492/" title="6_fitgal_thumbnail by ryan.drawcode, on Flickr"><img src="http://farm4.static.flickr.com/3085/2602865492_8764828a05_o.jpg" width="540" height="804" alt="6_fitgal_thumbnail" /></a></p>
<p><a href="http://www.flickr.com/photos/27544709@N07/2602865356/" title="5_fitgal_thumbnail by ryan.drawcode, on Flickr"><img src="http://farm4.static.flickr.com/3204/2602865356_84482fc2e9_o.jpg" width="540" height="804" alt="5_fitgal_thumbnail" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawcode.com/2008/06/22/retro-wall-e-posters/feed/</wfw:commentRss>
		<slash:comments>1750</slash:comments>
		</item>
		<item>
		<title>*drawcode is working right now</title>
		<link>http://blog.drawcode.com/2008/04/18/drawcode-is-working-right-now/</link>
		<comments>http://blog.drawcode.com/2008/04/18/drawcode-is-working-right-now/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 07:10:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.drawcode.com/?p=3</guid>
		<description><![CDATA[&#8230; on this site .. check back
]]></description>
			<content:encoded><![CDATA[<p>&#8230; on this site .. check back</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.drawcode.com/2008/04/18/drawcode-is-working-right-now/feed/</wfw:commentRss>
		<slash:comments>1382</slash:comments>
		</item>
	</channel>
</rss>
