<?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>Eric Blue's Blog &#187; JavaScript</title>
	<atom:link href="http://eric-blue.com/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://eric-blue.com</link>
	<description>Technology, Philosophy, and Personal Development</description>
	<lastBuildDate>Mon, 21 May 2012 02:29:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Firefox Scrapbook Hacks &#8211; Viewing and Saving Webpages from Anywhere!</title>
		<link>http://eric-blue.com/2011/04/03/firefox-scrapbook-hacks-viewing-and-saving-webpages-from-anywhere/</link>
		<comments>http://eric-blue.com/2011/04/03/firefox-scrapbook-hacks-viewing-and-saving-webpages-from-anywhere/#comments</comments>
		<pubDate>Sun, 03 Apr 2011 20:12:00 +0000</pubDate>
		<dc:creator>ericblue76</dc:creator>
				<category><![CDATA[Headline]]></category>
		<category><![CDATA[IPhone]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Knowledge]]></category>
		<category><![CDATA[Knowledge Management]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Memex]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://eric-blue.com/?p=1444</guid>
		<description><![CDATA[This weekend I decided to wrap up a couple cool knowledge management &#8220;hacks&#8221; and share some code on GitHub.  I primarily use the Firefox Scrapbook plugin to save all web pages of interest and use ...]]></description>
			<content:encoded><![CDATA[<p>This weekend I decided to wrap up a couple cool knowledge management &#8220;hacks&#8221; and share some code on GitHub.  I primarily use the <a href="http://amb.vis.ne.jp/mozilla/scrapbook/">Firefox Scrapbook plugin </a>to save all web pages of interest and use it as a general &#8220;digital snippet&#8221; repository. Since I started using Scrapbook in 2006 there have been a number of online services that have come along to offer this functionality (namely Evernote, Zotero, and countless others).  Some of these services make it very easy to universally access and save webpages between multiple devices.  As part of my usual DIY philosophy, I&#8217;ve made an effort to stick with Scrapbook and build the missing features myself.  This is in large part due to data ownership (it&#8217;s my data and I don&#8217;t want to be tied to a single service/company), plus it&#8217;s fun to tinker and make these useful &#8220;hacks&#8221;.</p>
<p>In Dec &#8216;09 I shared a blog post about how to <a href="http://eric-blue.com/2009/12/07/how-to-synchronize-your-digital-scrapbook/">synchronize the scrapbook data between multiple computers</a>. This was the first major step to sharing data between multiple devices, but still lacked some of the ubiquity that I desired.  In a nutshell I&#8217;ve made 2 <span style="text-decoration: underline;">major</span> enhancements to Scrapbook:</p>
<ol>
<li>An email &#8216;bridge&#8217; to Scrapbook so I can email links from any device (PC, iPhone, iPad) and have them saved by Scrapbook</li>
<li>A centralized web-interface to browse/search/filter my scrapbook data.</li>
</ol>
<p>I&#8217;ll start off with the less visually-stunning hack (email bridge), but by far the craftier of two.</p>
<p><strong>Hack #1 &#8211; Scrapbook Email Interface</strong></p>
<p>Whenever I began synchronizing my Scrapbook data between the 2-3 computers this solved a huge problem with being able to save webpages from anywhere.  Since 2009 a lot has changed, and devices like iPhone and iPad (yes, Apple fan boy to a degree) have changed the way we consume news.  Recently I&#8217;ve been using apps on the iPad like Zite and Flipboard to consolidate my Twitter, Facebook, and Googler Reader feeds into a single personalized newspaper.  This means that now &gt; 50% of my reading time is spent from a device that has no visibility into my Scrapbook data.  I simply wanted a way to automatically email a link (built nativily into these apps) and have it automagically saved into my Scrapbook folder.  I could have simply cut corners and wrote a script to hand-edit the Scrapbook RDF Files and save the web page using something like wget or curl.  But, it just wouldn&#8217;t be the same&#8230;. I want the webpage saved EXACTLY as Firefox would normally render and save it.</p>
<p>This poses a bit of a technical challenge, since Scrapbook runs inside Firefox and there&#8217;s no native way to interface with a plugin running inside a browser.  After researching a number of approaches, I came across 2 Firefox plugins that let you build interfaces inside firefox (http, telent, etc.) that actually let you control the browser and execute Javascript.  Of the 2 plugins; <a href="https://addons.mozilla.org/en-us/firefox/addon/pow-plain-old-webserver/">POW </a>and <a href="https://addons.mozilla.org/en-US/firefox/addon/mozrepl/">MozRepl</a>, I decided to go with POW (Plain Old Webserver).  Both plugins are wicked cool in the sense that they&#8217;re non-traditional and very powerful.  POW runs a webserver inside firefox and let&#8217;s you run your &#8217;server-side&#8217; scripts as Javascript.  I&#8217;ve basically written a server process that runs INSIDE the client and executes XPCOM/Javascript to control the web browser windows and invokes the Scrapbook plugin API directly.</p>
<p>The setup process is simple:</p>
<ol>
<li>Setup and install the POW and Scrapbook plugins in your browser</li>
<li>Configure POW to run a desired port and create a new directory /scrapbook/</li>
<li>Copy the index.sjs (server-side javascript) to this new /scrapbook/ directory</li>
<li>Setup a new email box or alias (e.g. yourusername+scrapbook@gmail.com)</li>
<li>Either run scrapbook2email.pl manually or run as a CRON job every couple minutes</li>
<li>Simply send emails to your new Scrapbook email, run the email script, and watch your pages be saved automatically</li>
</ol>
<p>At a high-level this is accomplished with 2 scripts:</p>
<p><strong>Email Interface script (Perl)</strong></p>
<p>This script uses IMAP to retrieve scrapbook email requests from a designated folder. Along with doing basic sender/recipient validation, the script is also aware of plain text/multipart messages.  Once the email request is parsed, the link of the requested web page to be saved will be extracted.  Given the request URL the script will then contact the POW server and pass the requested URL (e.g. http://127.0.0.1:6670/scrapbook/?url=http://yourwebpagetobesaved.com/?articleID=3q4e3332).  Note that this version of the script requires that Firefox/POW be running and makes no attempt to launch for you.</p>
<p>For a copy of the script click <a href="https://github.com/ericblue/Scrapbook-Email-Interface/blob/master/email2scapbook.pl" target="_blank">here</a> (GitHub).</p>
<p><strong>Scrapbook/POW Bridge (Server-Side Javascript)</strong></p>
<p>This script does the heavy lifting, and is essentially running at the other end of the POW server URL (http://127.0.0.1:6670/scrapbook/). Once the requested URL is detected the browser will spawn a new tab, automatically execute the Scrapbook Capture request, and save the webpage to a new top-level folder (e.g. Unfiled/MM-DD-YYYY). This script was tested with Scrapbook v.1.3.7.</p>
<p>For a copy of the script click <a href="https://github.com/ericblue/Scrapbook-Email-Interface/blob/master/index.sjs" target="_blank">here</a> (GitHub).</p>
<p>It&#8217;s nifty now to email a link to my Scrapbook Bot and wihin a couple minutes a little notify popup shows in Firefox indicating my page was saved.</p>
<p><strong>Hack #2 &#8211; Scrapbook Browser</strong></p>
<p>This code was actually written back in Dec &#8216;09 after I wrote the synchronize blog post (and around the time I wrote the Document Viewer), however I haven&#8217;t shared until now.  What I&#8217;ve done is write a simple Perl/JQuery web app that used Simile&#8217;s Exhibit to view Scrapbook data in a tile, table, or timeline.  This interface also has a file/folder view so you can browse snippets just like you can through the native Scrapbook plugin interface within Firefox.</p>
<p>Here are some screenshots:</p>
<p><strong>Tile View</strong></p>
<p style="text-align: center;"><a title="scrapbook-tile by ericblue76, on Flickr" href="http://www.flickr.com/photos/56683314@N00/5585601153/"><img class="aligncenter" src="http://farm6.static.flickr.com/5190/5585601153_605e15c3fd.jpg" alt="scrapbook-tile" width="500" height="310" /></a></p>
<p><strong>Timeline View</strong></p>
<p style="text-align: center;"><a title="scrapbook-timeline by ericblue76, on Flickr" href="http://www.flickr.com/photos/56683314@N00/5585600779/"><img class="aligncenter" src="http://farm6.static.flickr.com/5067/5585600779_e8533b8361.jpg" alt="scrapbook-timeline" width="500" height="315" /></a></p>
<p><strong>Table View</strong></p>
<p style="text-align: center;"><a title="scrapbook-table by ericblue76, on Flickr" href="http://www.flickr.com/photos/56683314@N00/5585601333/"><img class="aligncenter" src="http://farm6.static.flickr.com/5228/5585601333_7d561d97d9.jpg" alt="scrapbook-table" width="500" height="310" /></a></p>
<p><strong>Folder View</strong></p>
<p style="text-align: center;"><a title="scrapbook-folder by ericblue76, on Flickr" href="http://www.flickr.com/photos/56683314@N00/5585601017/"><img class="aligncenter" src="http://farm6.static.flickr.com/5308/5585601017_c970c25570.jpg" alt="scrapbook-folder" width="500" height="289" /></a></p>
<p style="text-align: left;">To download the code click <a href="https://github.com/ericblue/Scrapbook-Browser" target="_blank">here</a> (GitHub).</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Firefox+Scrapbook+Hacks+%E2%80%93+Viewing+and+Saving+Webpages+from+Anywhere%21+http://eric-blue.com/?p=1444+via+@ericblue" title="Post to Twitter"><img class="nothumb" src="http://eric-blue.com/wp-content/plugins/tweet-this/icons/tt-twitter-big3.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://eric-blue.com/2011/04/03/firefox-scrapbook-hacks-viewing-and-saving-webpages-from-anywhere/&amp;title=Firefox+Scrapbook+Hacks+%E2%80%93+Viewing+and+Saving+Webpages+from+Anywhere%21" title="Post to Delicious"><img class="nothumb" src="http://eric-blue.com/wp-content/plugins/tweet-this/icons/tt-delicious-big3.png" alt="Post to Delicious" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://eric-blue.com/2011/04/03/firefox-scrapbook-hacks-viewing-and-saving-webpages-from-anywhere/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>JavaScript Information Visualization Toolkit (JIT)</title>
		<link>http://eric-blue.com/2008/05/22/javascript-information-visualization-toolkit-jit/</link>
		<comments>http://eric-blue.com/2008/05/22/javascript-information-visualization-toolkit-jit/#comments</comments>
		<pubDate>Thu, 22 May 2008 13:35:00 +0000</pubDate>
		<dc:creator>ericblue76</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Visualization]]></category>

		<guid isPermaLink="false">http://eric-blue.com/blog2/2008/05/22/javascript-information-visualization-toolkit-jit/</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been personally waiting for something like this for a while&#8230;.</p>
<p>What is JIT?</p>
<blockquote>
<p>The JIT is an advanced JavaScript infovis toolkit based on 5 papers about different information visualization techniques.<br />
The JIT implements advanced features of information visualization like Treemaps (with the slice and dice and squarified methods), an adapted visualization of trees based on the Spacetree, a focus+context technique to plot Hyperbolic Trees, and a radial layout of trees with advanced animations (RGraph).</p>
</blockquote>
<p>Read more at <a href="http://blog.thejit.org/javascript-information-visualization-toolkit-jit/">http://blog.thejit.org/javascript-information-visualization-toolkit-jit/</a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=JavaScript+Information+Visualization+Toolkit+%28JIT%29+http://eric-blue.com/?p=414+via+@ericblue" title="Post to Twitter"><img class="nothumb" src="http://eric-blue.com/wp-content/plugins/tweet-this/icons/tt-twitter-big3.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://eric-blue.com/2008/05/22/javascript-information-visualization-toolkit-jit/&amp;title=JavaScript+Information+Visualization+Toolkit+%28JIT%29" title="Post to Delicious"><img class="nothumb" src="http://eric-blue.com/wp-content/plugins/tweet-this/icons/tt-delicious-big3.png" alt="Post to Delicious" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://eric-blue.com/2008/05/22/javascript-information-visualization-toolkit-jit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

