<?xml version="1.0" encoding="utf-8" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns="http://purl.org/rss/1.0/">




    



<channel rdf:about="http://noandwhere.com/weblog/RSS">
  <title>Weblog</title>
  <link>http://noandwhere.com</link>

  <description>
    
      
    
  </description>

  

  
            <syn:updatePeriod>daily</syn:updatePeriod>
            <syn:updateFrequency>1</syn:updateFrequency>
            <syn:updateBase>2008-05-25T23:56:47Z</syn:updateBase>
        

  <image rdf:resource="http://noandwhere.com/logo.png"/>

  <items>
    <rdf:Seq>
      
        <rdf:li rdf:resource="http://noandwhere.com/archive/archive-your-gmail-inbox-from-python"/>
      
      
        <rdf:li rdf:resource="http://noandwhere.com/archive/microblogs-status-update-services-listen-up"/>
      
      
        <rdf:li rdf:resource="http://noandwhere.com/archive/scrawld"/>
      
      
        <rdf:li rdf:resource="http://noandwhere.com/archive/finally-on-plone-3"/>
      
      
        <rdf:li rdf:resource="http://noandwhere.com/archive/closing-tabs-in-safari-with-applescript"/>
      
    </rdf:Seq>
  </items>

</channel>


  <item rdf:about="http://noandwhere.com/archive/archive-your-gmail-inbox-from-python">
    <title>Archive your Gmail inbox from Python</title>
    <link>http://noandwhere.com/archive/archive-your-gmail-inbox-from-python</link>
    <description>A quickie Python script to clean out your Gmail inbox... I run this whenever my Gmail notifier has notified me of a bunch of mail that I don't really need to read.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<pre>import imaplib

gmail_user = 'your_username'
gmail_pass = 'your_password'

M = imaplib.IMAP4_SSL('imap.gmail.com')

M.login(gmail_user, gmail_pass)

M.select()

typ, data = M.search(None, 'ALL')

for num in data[0].split():
    M.store(num, '+FLAGS', '\\Seen')
    M.store(num, '+FLAGS', '\\Deleted')

M.expunge()</pre>
<p>A couple of points:</p>
<ul>
<li>When I mention 'archive' in the title, I mean the Gmail 'Archive' feature - ie, remove the message from the inbox but keep it in 'All Mail'.</li>
<li>You need to have IMAP enabled on your Gmail account.</li>
<li>Don't let that '\\Deleted' stuff scare you - in Gmail's IMAP implementation, that removes the message from the inbox, but it doesn't actually delete it.</li>
</ul>
<p class="discreet">(... he said, ignoring the fact that he hadn't posted anything here in the past seven months.)</p>]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Sean Fulmer</dc:creator>
    <dc:rights></dc:rights>
    <dc:date>2009-03-29T01:15:00Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>


  <item rdf:about="http://noandwhere.com/archive/microblogs-status-update-services-listen-up">
    <title>Microblogs, status update services... please listen up</title>
    <link>http://noandwhere.com/archive/microblogs-status-update-services-listen-up</link>
    <description>You guys all provide services that are easy-to-use, fun, and even occasionally useful. It's time to start working together.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>I recently signed up with <a class="reference external" href="http://rejaw.com">Rejaw</a>, thus bringing the total number of
micro-blogging/status-updating services I use up to something like seven.
For the most part, I update them all simultaneously via <a class="reference external" href="http://ping.fm">Ping.FM</a> - but
Rejaw is brand new, so I had to whip together a <a class="reference external" href="/projects/web-two-point-oh-beta/ping-rejaw.py/view">quick script to allow me to
update Rejaw from Ping.FM</a> along with everything else. It's great that all
of these services have APIs and tools that allow me to do stuff like that,
but I wish it wasn't necessary.</p>
<p>All of these services have a very similar feature set:</p>
<ul class="simple">
<li>A means to post a short entry, usually a textarea and a button</li>
<li>A means to reply to an entry, again just a textarea and a button</li>
<li>A list of entries and replies</li>
<li>A means to &quot;follow&quot; other users, eg subscribe to their entries</li>
</ul>
<p>I think that about covers the basics. Now, if you look around at <a class="reference external" href="http://twitter.com">Twitter</a>,
<a class="reference external" href="http://pownce.com">Pownce</a>, <a class="reference external" href="http://plurk.com">Plurk</a>, <a class="reference external" href="http://rejaw.com">Rejaw</a> etc, you might wonder why the textarea, button, and
list provided by any one of these services is any more compelling than the
same features on the other services. The answer is - it isn't.</p>
<p><a class="reference external" href="http://ping.fm">Ping.FM</a> addresses the box+button aspect of this by allowing you to update
all of your services from a single location, and you can use RSS to
aggregate timelines from the services in a single location, but you still
need to jump around from one service to another to properly manage replies
and subscriptions.</p>
<p>So - to the point... all of you microstatusblogamathings need to get
together and come up with a way to do the following:</p>
<ul class="simple">
<li>Use some other service as a source for updates, and allow your service
to be used in the same way. The textarea+button on
your site is no better than the one on the other guy's site, so why should
I be forced to use yours? Having my content on your site is what should
matter to you - it shouldn't matter how it gets there. If you come up
with some awesomely compelling feature that makes your textarea better
than the others, fine... but have some basic standard that all of you
guys can use to work together.</li>
<li>Follow and reply to others, regardless of the service they choose as
their &quot;home&quot; service, for the same reasons. Having this cross-site
conversation visible on your site makes <em>your</em> site better, and it makes
<em>my</em> life easier.</li>
</ul>
<p>Now, do I think any of this will actually happen? Of course not. People
have been making the same argument for interoperability in the context of instant messaging services for over a decade,
and it still hasn't happened. But these new services are being built by a
new generation of developers, so maybe they're a bit more open to this sort
of suggestion than the giant corporations who control the IM services.
Maybe it could happen.</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Sean Fulmer</dc:creator>
    <dc:rights></dc:rights>
    <dc:date>2008-08-10T00:45:00Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>


  <item rdf:about="http://noandwhere.com/archive/scrawld">
    <title>Scrawld</title>
    <link>http://noandwhere.com/archive/scrawld</link>
    <description>How I migrated my old blog entries over to Scrawl, a lightweight blogging solution for Plone</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>I've been doing the &quot;news-items-as-blog&quot; thing in Plone here for a while. It fits well in a plain-vanilla Plone environment, but the presentation never felt very &quot;bloggy&quot; to me. I wanted to try something new, but I didn't want to stray too far from the &quot;pure Plone&quot; approach to blogging, so when I noticed <a class="reference external" href="http://plone.org/products/scrawl">Scrawl</a> in the Plone products index, I thought I'd give it a try.</p>
<p>Installation of Scrawl was straightforward, and after creating a few test entries with it, I was ready to migrate my news items over to Scrawl's &quot;blog entry&quot; content type. This was pretty easy, since Scrawl simply repurposes the News Item content type. First, I re-named the folder that contained my existing news items. Then, I created a new folder with the same ID as the old folder.  Finally, I ran the following script (from my custom skin folder) to create Blog Entries with the same content and ID's as my old News Items:</p>
<pre class="literal-block">
from Products.CMFCore.utils import getToolByName

# get the catalog &amp; workflow tools
pc = getToolByName(context, &quot;portal_catalog&quot;)
wf = getToolByName(context, &quot;portal_workflow&quot;)

# folder where the new Scrawl items will go
# change this for your own needs
nblog = context.nowhere.archive

# get News Items and create Blog Entries
entries = [e.getObject() for e in
            pc.searchResults(portal_type=&quot;News Item&quot;)]
for e in entries:

    # get info from the old object
    nid = e.id
    nkws = e.Subject()
    cdate = e.CreationDate()
    edate = e.getEffectiveDate()
    mdate = e.ModificationDate()
    ntitle = e.Title()
    ndescr = e.Description()
    ntext =  e.getText()
    ntype = e.Schema()['text'].getContentType(e)

    # create the new object
    nblog.invokeFactory(type_name = &quot;Blog Entry&quot;, id=nid)
    item = nblog[nid]
    item.editMetadata(subject=nkws)
    item.setFormat(ntype)
    item.update(title=ntitle,
                text=ntext,
                description=ndescr,
                creation_date=cdate,
                effective_date=edate,
                )

    # my items are initially private, so two steps to publish
    wf.doActionFor(item, &quot;show&quot;)
    wf.doActionFor(item, &quot;publish&quot;)

    # set the dates on the new object to match the old object
    item.setCreationDate(cdate)
    item.setEffectiveDate(edate)
    item.setModificationDate(mdate)
    item.indexObject()
    print &quot;created &quot;+ nid

return printed
</pre>
<p>After running that, I had published blog entries that were copies of my old new items, with the same id's and in the same location as the old items, completely migrated with old URLs intact.</p>
<p>Feel free to copy and modify that script for your own needs - it's a simple example of how to migrate one content type over to another.</p>
<p>Edit: It just occurred to me that my script up there does not migrate comments. I only had a couple of comments on my old entries, so it's not a big deal for me, but it might be for you.</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Sean Fulmer</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>howto</dc:subject>
    
    
      <dc:subject>plone</dc:subject>
    
    <dc:date>2008-05-26T02:25:00Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>


  <item rdf:about="http://noandwhere.com/archive/finally-on-plone-3">
    <title>Finally on Plone 3!</title>
    <link>http://noandwhere.com/archive/finally-on-plone-3</link>
    <description>now all I need is something to blog about :/</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Migrated this site to Plone 3 this evening, after many months of putting it off. the only thing that bit me was CacheFu, but that was easily solved by, y'know, <em>installing</em> it.</p>
<p>Not too crazy about this NuPlone theme, but it'll have to do for now.. stay tuned :)</p>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Sean Fulmer</dc:creator>
    <dc:rights></dc:rights>
    <dc:date>2008-05-02T04:56:33Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>


  <item rdf:about="http://noandwhere.com/archive/closing-tabs-in-safari-with-applescript">
    <title>Closing Tabs in Safari with AppleScript</title>
    <link>http://noandwhere.com/archive/closing-tabs-in-safari-with-applescript</link>
    <description>More adventures in browser tab manipulation</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>A lot of stuff has happened in the past couple of months, mostly because of the fact that I got a new job. This is the first time in the last three years that I've had a steady income - and it feels great. I had no idea how much stress I was putting on myself as a freelancer!</p>
<p>Anyway - the point: steady income =&gt; more money =&gt; shiny new iMac =&gt; I'm no longer using <a class="reference" href="http://www.gnome.org/projects/epiphany/">Epiphany</a> as my main browser, so I needed to cook up a way to quickly close a bunch of tabs in Safari. Safari already has a way to close all tabs except the current tab, so we just need a way to close tabs to the left or to the right of the current tab. <a class="reference" href="http://www.apple.com/applescript/">AppleScript</a> to the rescue!</p>
<p>First, the left tabs:</p>
<pre class="literal-block">
tell application &quot;Safari&quot;
    set cWindow to first item of windows
    set ctIndex to index of current tab of cWindow
    repeat ctIndex - 1 times
            close first item of tabs of cWindow
    end repeat
end tell
open location &quot;x-launchbar:hide&quot;
</pre>
<p>Then, the right:</p>
<pre class="literal-block">
tell application &quot;Safari&quot;
    set cWindow to first item of windows
    set ctIndex to index of current tab of cWindow
    repeat while (count of tabs of cWindow) &gt; ctIndex
            close last item of tabs of cWindow
    end repeat
end tell
open location &quot;x-launchbar:hide&quot;
</pre>
<p>I save those as &quot;Close Left Tabs&quot; and &quot;Close Right Tabs&quot; in ~/Library/Scripts. When I need to use them, I just bang a couple of keys to bring up the very-excellent <a class="reference" href="http://www.obdev.at/products/launchbar/index.html">LaunchBar</a> <a class="footnote-reference" href="#id2" id="id1" name="id1">[1]</a>, then 'CL' or 'CR' to run whichever one I need.</p>
<p>So, this is great for me and Safari, but it doesn't bode well for the <a class="reference" href="http://noandwhere.com/archive/close-other-tabs-extension-for-epiphany/">similar work I did for Epiphany</a>. There's a problem with that one, I think related to the disconnecting of GTK signals. The symptom is that if you're using that extension, Epiphany won't cleanly exit after you've closed all of its windows. And the real problem is that since I'm not in GNOME most of the time these days, I'm really not feeling an urgent need to fix it, which sort of sucks if you happen to be using this extension with Epiphany.</p>
<p>So, if you're one of those two people... feel free to hack on it ;)</p>
<table class="docutils footnote" frame="void" id="id2" rules="none">

<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id1" name="id2">[1]</a></td><td>Hence the &quot;x-launchbar:hide&quot; bit at the end of each script - feel free to omit those :)</td></tr>
</tbody>
</table>
]]></content:encoded>
    <dc:publisher>No publisher</dc:publisher>
    <dc:creator>Sean Fulmer</dc:creator>
    <dc:rights></dc:rights>
    
      <dc:subject>development</dc:subject>
    
    
      <dc:subject>epiphany</dc:subject>
    
    
      <dc:subject>applescript</dc:subject>
    
    
      <dc:subject>safari</dc:subject>
    
    
      <dc:subject>add-ons</dc:subject>
    
    <dc:date>2008-04-11T04:03:31Z</dc:date>
    <dc:type>Blog Entry</dc:type>
  </item>





</rdf:RDF>

