<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Removing duplicate iCal entries</title>
	<atom:link href="http://johnaugust.com/archives/2005/removing-duplicate-ical-entries/feed" rel="self" type="application/rss+xml" />
	<link>http://johnaugust.com/archives/2005/removing-duplicate-ical-entries</link>
	<description>A ton of useful information about screenwriting.</description>
	<lastBuildDate>Tue, 16 Mar 2010 08:06:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: LinuxBaer</title>
		<link>http://johnaugust.com/archives/2005/removing-duplicate-ical-entries/comment-page-1#comment-53274</link>
		<dc:creator>LinuxBaer</dc:creator>
		<pubDate>Thu, 01 Mar 2007 06:36:21 +0000</pubDate>
		<guid isPermaLink="false">/?p=411#comment-53274</guid>
		<description>&lt;p&gt;thank you for that! it&#039;s also useful with linux and kde. had same probs with palm sync.&lt;/p&gt;

&lt;p&gt;now erverything is fine again. thank you!!!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>thank you for that! it&#8217;s also useful with linux and kde. had same probs with palm sync.</p>

<p>now erverything is fine again. thank you!!!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://johnaugust.com/archives/2005/removing-duplicate-ical-entries/comment-page-1#comment-29996</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Thu, 07 Dec 2006 16:28:39 +0000</pubDate>
		<guid isPermaLink="false">/?p=411#comment-29996</guid>
		<description>&lt;p&gt;Could you re-write this script to remove events with a specific keyword in their title?
I don&#039;t know enough Python to make the appropriate changes to your script and I haven&#039;t been able to find a ready-made program/script for this task.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Could you re-write this script to remove events with a specific keyword in their title?
I don&#8217;t know enough Python to make the appropriate changes to your script and I haven&#8217;t been able to find a ready-made program/script for this task.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: jason</title>
		<link>http://johnaugust.com/archives/2005/removing-duplicate-ical-entries/comment-page-1#comment-1720</link>
		<dc:creator>jason</dc:creator>
		<pubDate>Fri, 06 May 2005 16:34:24 +0000</pubDate>
		<guid isPermaLink="false">/?p=411#comment-1720</guid>
		<description>&lt;p&gt;I have had a similar problem and have used Undupe from Stevens Creek Software - http://www.stevenscreek.com/palm/undupe.html
It finds and can remove duplicates (not just in Datebook) then when you sync, the dupes are taken care of.
$10 well spent for me.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I have had a similar problem and have used Undupe from Stevens Creek Software &#8211; <a href="http://www.stevenscreek.com/palm/undupe.html" rel="nofollow">http://www.stevenscreek.com/palm/undupe.html</a>
It finds and can remove duplicates (not just in Datebook) then when you sync, the dupes are taken care of.
$10 well spent for me.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Emilio</title>
		<link>http://johnaugust.com/archives/2005/removing-duplicate-ical-entries/comment-page-1#comment-1669</link>
		<dc:creator>Emilio</dc:creator>
		<pubDate>Wed, 04 May 2005 03:58:19 +0000</pubDate>
		<guid isPermaLink="false">/?p=411#comment-1669</guid>
		<description>&lt;p&gt;Didn&#039;t give up. The code works fine, except that the output transforms the \n into \r thus resulting in extra blank lines in output. I was able to remove all duplicates efficiently by using TextWrangler. I am not 100% sure about the details of the following steps, but let me report in case others want to tinker:&lt;/p&gt;

&lt;p&gt;Export calendar with dups into file to work on. In TextWrangler (free from BBsoft) open the file that contains py code above (modified as indicated). Run py code form inside TextWrangler (fast!). In output window search/replace all \r\r with \r. Check if your output file has any \r&lt;space&gt; that resulted from \n&#039;s (this may be the result of some calendar events from my Newton -it was 1994!) and replace with &lt;space&gt;. Save as ... output into filename.ics using macintosh line breaks and (this is the part I don&#039;t quite remember-sorry) unicode-8. Import from iCal.
Thanks for the code. I had no idea what python was until I read this thread!&lt;/space&gt;&lt;/space&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Didn&#8217;t give up. The code works fine, except that the output transforms the \n into \r thus resulting in extra blank lines in output. I was able to remove all duplicates efficiently by using TextWrangler. I am not 100% sure about the details of the following steps, but let me report in case others want to tinker:</p>

<p>Export calendar with dups into file to work on. In TextWrangler (free from BBsoft) open the file that contains py code above (modified as indicated). Run py code form inside TextWrangler (fast!). In output window search/replace all \r\r with \r. Check if your output file has any \r<space> that resulted from \n&#8217;s (this may be the result of some calendar events from my Newton -it was 1994!) and replace with </space><space>. Save as &#8230; output into filename.ics using macintosh line breaks and (this is the part I don&#8217;t quite remember-sorry) unicode-8. Import from iCal.
Thanks for the code. I had no idea what python was until I read this thread!</space></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Emilio</title>
		<link>http://johnaugust.com/archives/2005/removing-duplicate-ical-entries/comment-page-1#comment-1660</link>
		<dc:creator>Emilio</dc:creator>
		<pubDate>Tue, 03 May 2005 18:05:16 +0000</pubDate>
		<guid isPermaLink="false">/?p=411#comment-1660</guid>
		<description>&lt;p&gt;I will look into it. I am not py pgrmmr, but if I can figure the new format I might take a swing at it. Grateful for your promt reply. I will let you know when I give up.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I will look into it. I am not py pgrmmr, but if I can figure the new format I might take a swing at it. Grateful for your promt reply. I will let you know when I give up.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://johnaugust.com/archives/2005/removing-duplicate-ical-entries/comment-page-1#comment-1659</link>
		<dc:creator>John</dc:creator>
		<pubDate>Tue, 03 May 2005 17:27:19 +0000</pubDate>
		<guid isPermaLink="false">/?p=411#comment-1659</guid>
		<description>&lt;p&gt;Emilio:&lt;/p&gt;

&lt;p&gt;Tiger (specifically, iCal 2.0) has a different file format/layout. The current script won&#039;t work.  Sorry.&lt;/p&gt;

&lt;p&gt;Given priorities around here, I probably won&#039;t be able to tweak the script myself, but it shouldn&#039;t be too hard for someone with a little ambition and an hour or two.&lt;/p&gt;

&lt;p&gt;Some of the new information in the .ics file includes daylight savings time, &quot;sequence,&quot; &quot;location,&quot; &quot;exdate,&quot; and others.&lt;/p&gt;

&lt;p&gt;If you decide to tackle the Tiger situation, please drop a note to let us know.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Emilio:</p>

<p>Tiger (specifically, iCal 2.0) has a different file format/layout. The current script won&#8217;t work.  Sorry.</p>

<p>Given priorities around here, I probably won&#8217;t be able to tweak the script myself, but it shouldn&#8217;t be too hard for someone with a little ambition and an hour or two.</p>

<p>Some of the new information in the .ics file includes daylight savings time, &#8220;sequence,&#8221; &#8220;location,&#8221; &#8220;exdate,&#8221; and others.</p>

<p>If you decide to tackle the Tiger situation, please drop a note to let us know.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Emilio</title>
		<link>http://johnaugust.com/archives/2005/removing-duplicate-ical-entries/comment-page-1#comment-1658</link>
		<dc:creator>Emilio</dc:creator>
		<pubDate>Tue, 03 May 2005 16:35:58 +0000</pubDate>
		<guid isPermaLink="false">/?p=411#comment-1658</guid>
		<description>&lt;p&gt;I ran the original code posted above in python 2.4 and Tiger. Runs fine, but the output has an extra empty line between all data lines, except between end: and begin: of entries.
I save the output to a file. Upon tryinc to import it, iCal indicates the file is unreadable. Any guesses?
thanks!
EAL&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I ran the original code posted above in python 2.4 and Tiger. Runs fine, but the output has an extra empty line between all data lines, except between end: and begin: of entries.
I save the output to a file. Upon tryinc to import it, iCal indicates the file is unreadable. Any guesses?
thanks!
EAL</p>]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://johnaugust.com/archives/2005/removing-duplicate-ical-entries/comment-page-1#comment-1556</link>
		<dc:creator>John</dc:creator>
		<pubDate>Wed, 20 Apr 2005 20:04:09 +0000</pubDate>
		<guid isPermaLink="false">/?p=411#comment-1556</guid>
		<description>&lt;p&gt;Gary:&lt;/p&gt;

&lt;p&gt;Clarifying/Obfuscating a little more on the &quot;in&quot; issue:&lt;/p&gt;

&lt;blockquote&gt;
For the Unicode and string types, x in y is true if and only if x is a substring of y. An equivalent test is y.find(x) != -1. Note, x and y need not be the same type; consequently, u&#039;ab&#039; in &#039;abc&#039; will return True. Empty strings are always considered to be a substring of any other string, so &quot;&quot; in &quot;abc&quot; will return True. &lt;strong&gt;Changed in version 2.3: Previously, x was required to be a string of length 1.&lt;/strong&gt;

&lt;/blockquote&gt;

&lt;p&gt;(this from http://docs.python.org/ref/comparisons.html#l2h-432)&lt;/p&gt;

&lt;p&gt;So, it seems like the &quot;in&quot; line really does work -- but only in 2.3 and later. It does for me.  And it looks prettier, to boot.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Gary:</p>

<p>Clarifying/Obfuscating a little more on the &#8220;in&#8221; issue:</p>

<blockquote>
For the Unicode and string types, x in y is true if and only if x is a substring of y. An equivalent test is y.find(x) != -1. Note, x and y need not be the same type; consequently, u&#8217;ab&#8217; in &#8216;abc&#8217; will return True. Empty strings are always considered to be a substring of any other string, so &#8220;&#8221; in &#8220;abc&#8221; will return True. <strong>Changed in version 2.3: Previously, x was required to be a string of length 1.</strong>

</blockquote>

<p>(this from <a href="http://docs.python.org/ref/comparisons.html#l2h-432)" rel="nofollow">http://docs.python.org/ref/comparisons.html#l2h-432)</a></p>

<p>So, it seems like the &#8220;in&#8221; line really does work &#8212; but only in 2.3 and later. It does for me.  And it looks prettier, to boot.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://johnaugust.com/archives/2005/removing-duplicate-ical-entries/comment-page-1#comment-1555</link>
		<dc:creator>John</dc:creator>
		<pubDate>Wed, 20 Apr 2005 19:49:00 +0000</pubDate>
		<guid isPermaLink="false">/?p=411#comment-1555</guid>
		<description>&lt;p&gt;Warning:  High Geek Factor!&lt;/p&gt;

&lt;p&gt;Gary:&lt;/p&gt;

&lt;p&gt;Glad you got it to work.  I guess I&#039;m not clear why the original version was tripping up for you.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;if &#039;BEGIN:VEVENT&#039; in line:&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;is pretty Pythonic; the .find() test really shouldn&#039;t be necessary.  Was it a curly-apostophe situation?&lt;/p&gt;

&lt;p&gt;Also, are you using a pretty recent version (I&#039;m on 2.3)?&lt;/p&gt;

&lt;p&gt;Just curious.  Any Python experts out there, feel free to chime in.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Warning:  High Geek Factor!</p>

<p>Gary:</p>

<p>Glad you got it to work.  I guess I&#8217;m not clear why the original version was tripping up for you.</p>

<p><code>if 'BEGIN:VEVENT' in line:</code></p>

<p>is pretty Pythonic; the .find() test really shouldn&#8217;t be necessary.  Was it a curly-apostophe situation?</p>

<p>Also, are you using a pretty recent version (I&#8217;m on 2.3)?</p>

<p>Just curious.  Any Python experts out there, feel free to chime in.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Gary Lee</title>
		<link>http://johnaugust.com/archives/2005/removing-duplicate-ical-entries/comment-page-1#comment-1554</link>
		<dc:creator>Gary Lee</dc:creator>
		<pubDate>Wed, 20 Apr 2005 12:24:28 +0000</pubDate>
		<guid isPermaLink="false">/?p=411#comment-1554</guid>
		<description>&lt;p&gt;My apologies... a bit got lost in my last message.  It should have said:&lt;/p&gt;

&lt;p&gt;I had to change the &quot;in&quot; statements from -
&lt;pre&gt;
    if &amp;lt string &amp;gt in line:
&lt;/pre&gt;
to -
&lt;pre&gt;
    if line.find(&amp;lt string &amp;gt) != -1:
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;for example:
&lt;pre&gt;
    if &#039;BEGIN:VEVENT&#039; in line:
&lt;/pre&gt;
should be changed to:
&lt;pre&gt;
    if line.find(&#039;BEGIN:VEVENT&#039;) != -1:
&lt;/pre&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>My apologies&#8230; a bit got lost in my last message.  It should have said:</p>

<p>I had to change the &#8220;in&#8221; statements from -
<pre>
    if &amp;lt string &amp;gt in line:
</pre>
to -
<pre>
    if line.find(&amp;lt string &amp;gt) != -1:
</pre></p>

<p>for example:
<pre>
    if 'BEGIN:VEVENT' in line:
</pre>
should be changed to:
<pre>
    if line.find('BEGIN:VEVENT') != -1:
</pre></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Gary Lee</title>
		<link>http://johnaugust.com/archives/2005/removing-duplicate-ical-entries/comment-page-1#comment-1553</link>
		<dc:creator>Gary Lee</dc:creator>
		<pubDate>Wed, 20 Apr 2005 11:52:31 +0000</pubDate>
		<guid isPermaLink="false">/?p=411#comment-1553</guid>
		<description>&lt;p&gt;Very cool.  I just used this script to weed out duplicate entries caused by a broken sync with multiple devices (palm, ipod, .mac).  Every single event was duplicated in one of my calendars.  Your script worked a charm, but I did have to make a minor correction.&lt;/p&gt;

&lt;p&gt;I had to change the &quot;in&quot; statements from -
      if &lt;string&gt; in line:
to -
      if line.find(&lt;string&gt;) != -1:&lt;/p&gt;

&lt;p&gt;Python wants a character as left operand to &quot;in&quot;.&lt;/string&gt;&lt;/string&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Very cool.  I just used this script to weed out duplicate entries caused by a broken sync with multiple devices (palm, ipod, .mac).  Every single event was duplicated in one of my calendars.  Your script worked a charm, but I did have to make a minor correction.</p>

<p>I had to change the &#8220;in&#8221; statements from -
      if <string> in line:
to -
      if line.find(</string><string>) != -1:</string></p>

<p>Python wants a character as left operand to &#8220;in&#8221;.</p>]]></content:encoded>
	</item>
</channel>
</rss>
