<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: Lindenb's Code Snippets</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 25 Jul 2008 21:01:31 GMT</pubDate>
    <description>DZone Snippets: Lindenb's Code Snippets</description>
    <item>
      <title>Geni2gedcom</title>
      <link>http://snippets.dzone.com/posts/show/4081</link>
      <description>Tansform gedcom-XML output of geni.com to dot file for graphviz&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;?xml version='1.0' ?&gt;&lt;br /&gt;&lt;xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'&gt;&lt;br /&gt;&lt;xsl:output method='text'/&gt;&lt;br /&gt;&lt;br /&gt;&lt;xsl:template match="GEDCOM"&gt;&lt;br /&gt;        digraph &amp;apos;G&amp;apos; {&lt;br /&gt;        &lt;xsl:apply-templates select="FamilyRec"/&gt;&lt;br /&gt;        &lt;xsl:apply-templates select="IndividualRec"/&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;/xsl:template&gt;&lt;br /&gt;&lt;br /&gt;&lt;xsl:template match="IndividualRec"&gt;&lt;br /&gt;        &lt;xsl:value-of select="@Id"/&gt;[ label=&amp;quot;&lt;xsl:value-of select="IndivNam&lt;br /&gt;e/GivenName"/&gt;&lt;xsl:text&gt; &lt;/xsl:text&gt;&lt;xsl:value-of select="IndivName/SurName"/&gt; &amp;&lt;br /&gt;quot;];&lt;br /&gt;&lt;/xsl:template&gt;&lt;br /&gt;&lt;br /&gt;&lt;xsl:template match="FamilyRec"&gt;&lt;br /&gt;        &lt;xsl:variable name="famId"&gt;&lt;xsl:value-of select="@Id"/&gt;&lt;/xsl:variable&gt;&lt;br /&gt;        &lt;xsl:if test="HusbFath"&gt;&lt;br /&gt;                &lt;xsl:value-of select="HusbFath/Link/@Ref"/&gt;-&amp;gt;&lt;xsl:value-of se&lt;br /&gt;lect="$famId"/&gt;;&lt;br /&gt;        &lt;/xsl:if&gt;&lt;br /&gt;&lt;br /&gt;        &lt;xsl:if test="WifeMoth"&gt;&lt;br /&gt;                &lt;xsl:value-of select="WifeMoth/Link/@Ref"/&gt;-&amp;gt;&lt;xsl:value-of se&lt;br /&gt;lect="$famId"/&gt;;&lt;br /&gt;        &lt;/xsl:if&gt;&lt;br /&gt;&lt;br /&gt;        &lt;xsl:for-each select="Child"&gt;&lt;br /&gt;                &lt;xsl:value-of select="$famId"/&gt;-&amp;gt;&lt;xsl:value-of select="Link/@&lt;br /&gt;Ref"/&gt;;&lt;br /&gt;        &lt;/xsl:for-each&gt;&lt;br /&gt;&lt;br /&gt;&lt;/xsl:template&gt;&lt;br /&gt;&lt;br /&gt;&lt;/xsl:stylesheet&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Thu, 31 May 2007 08:22:10 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/4081</guid>
      <author>lindenb (Pierre)</author>
    </item>
    <item>
      <title>Download  coordinate from maproom</title>
      <link>http://snippets.dzone.com/posts/show/4080</link>
      <description>// description of your code here&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;IFS="&lt;br /&gt;"&lt;br /&gt;for C in Africa Antarctica Asia Australasia Europe North_America South_America&lt;br /&gt;do&lt;br /&gt;	mkdir -p GIS/$C&lt;br /&gt;	wget -O jeter.html -q "http://www.maproom.psu.edu/cgi-bin/dcw/dcwarea.cgi?$C"&lt;br /&gt;	for P in `egrep '^&lt;OPTION' jeter.html | cut -d '&gt;' -f2`&lt;br /&gt;	do&lt;br /&gt;		curl -d "area=$C" -d "country=$P" -o jeter2.html "http://www.maproom.psu.edu/cgi-bin/dcw/dcwcountry0.cgi"&lt;br /&gt;		P2=`grep FORM jeter2.html | grep point10 | tr "&lt;&gt;" "\n\n" | grep count| cut -d ' ' -f4 | cut -d '=' -f2`&lt;br /&gt;		#curl -d "country=$P2" -o jeter3.txt "http://www.maproom.psu.edu/cgi-bin/dcw/point10.cgi"&lt;br /&gt;		wget -O jeter2.html "http://www.maproom.psu.edu/cgi-bin/dcw/point10.cgi?country=$P2"&lt;br /&gt;		P3=`cat  jeter2.html | tr " &gt;" "\n\n" | grep ftp`&lt;br /&gt;		echo "##### $P2 $P3"	&lt;br /&gt;		wget -O jeter3.txt "$P3"&lt;br /&gt;		mv jeter3.txt &gt; GIS/$C/${P2}.js&lt;br /&gt;		sleep 3&lt;br /&gt;	done&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Thu, 31 May 2007 07:29:53 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/4080</guid>
      <author>lindenb (Pierre)</author>
    </item>
  </channel>
</rss>
