{"id":521,"date":"2013-01-11T00:45:59","date_gmt":"2013-01-11T05:45:59","guid":{"rendered":"http:\/\/otac.isa-geek.net\/blog\/?p=521"},"modified":"2013-01-11T11:30:22","modified_gmt":"2013-01-11T16:30:22","slug":"migrating-memos-from-webos-to-evernote","status":"publish","type":"post","link":"https:\/\/otac.isa-geek.net\/blog\/?p=521","title":{"rendered":"Migrating Memos from WebOS to Evernote"},"content":{"rendered":"<p>I recently took the plunge and decided to setup Android CM9 (ICS 4.0) on my HP Touchpad in a dual-boot config using the instructions found <a href=\"http:\/\/forums.webosnation.com\/android-touchpad\/310720-cm9-touchpad-heres-your-get-started-guide.html\">here<\/a>. I have to say, in the weeks since I started using Android on the tablet, I have spent almost no time in WebOS. I don&#8217;t miss it at all, which makes me a little sad. However, the plethora of apps now available on my tablet quickly cured me of my\u00a0unhappiness!<br \/>\nOne app that I have been using increasingly is <a href=\"http:\/\/evernote.com\">Evernote<\/a>. Although there was a Mojo-based Evernote client, a native WebOS one never got developed for the Touchpad. Now that I am using Ice Cream Sandwich on my tablet, I was able to install the free HD Evernote Android app on my tablet and start sharing my notes across multiple devices like I always wanted. However, one thing was missing &#8211; all my legacy memos and notes that I&#8217;ve carried from my old VisorPhone, through the Treo and Centro years, and on to my Palm Pre. Some of those notes are still useful, and some are just archives. Either way, I wanted them in my new favourite note management tool. Here are the steps I went through to bring my memos across the divide from WebOS to Evernote.<\/p>\n<p>Export memos from WebOS using the following steps:<\/p>\n<p>1. Create a file named memo_extract.sh with the following contents:<\/p>\n<p><strong>luna-send -n 1 -f -a com.palm.app.notes palm:\/\/com.palm.db\/find &#8216;{&#8220;query&#8221;:{&#8220;from<\/strong><br \/>\n<strong>&#8220;:&#8221;com.palm.note:1&#8221;}}&#8217;<\/strong><br \/>\n<strong>exit<\/strong><\/p>\n<p>2. Ensure novaterm is installed and works on your Linux desktop, then run the script:<\/p>\n<p><strong>$ cat memo_extract.sh|novaterm &gt; memos.json<\/strong><br \/>\nThis will create file memos.json on your computer, containing all the WebOS memos in JSON format.<\/p>\n<p>3. Remove the first line from the memos.json file that looks like the following:<br \/>\n<strong>root:# luna-send -n 1 -f -a com.palm.app.notes palm:\/\/com.palm.db\/find &#8216;{&#8220;query&#8221;:{&#8220;from&#8221;:&#8221;com.palm.note:1&#8243;}}&#8217;<\/strong><\/p>\n<p>and save the file.<\/p>\n<p>4. Go the the web site<br \/>\n<strong>http:\/\/www.utilities-online.info\/xmltojson\/#.UOpJ6tHgOdk<\/strong><\/p>\n<p>to convert the JSON to XML. Copy and paste the JSON text into the appropriate box, and hit the button to generate the corresponding XML.<\/p>\n<p>5. Next step is to import this XML into a database for some quick manipulation; I use <a href=\"http:\/\/www.mysql.com\/\">MySQL<\/a>, but <a href=\"http:\/\/www.microsoftstore.com\/store\/msca\/en_CA\/pd\/productID.246627700?tid=sTTAv5EKg&amp;cid=5387&amp;pcrid=25362399948&amp;pkw=microsoft%20access&amp;pmt=e&amp;WT.srch=1&amp;WT.mc_id=pointitsem_Microsoft+CA_google_Access+EN&amp;WT.term=microsoft%20access&amp;WT.campaign=Access+EN&amp;WT.content=TTAv5EKg&amp;WT.source=google&amp;WT.medium=cpc\">Access<\/a> or <a href=\"http:\/\/www.oracle.com\/technetwork\/products\/express-edition\/overview\/index.html\">Oracle<\/a> will probably also work, although the steps will vary.<\/p>\n<p>6. Ensure MySql 5.5 server is installed:<\/p>\n<p><strong>$ sudo apt-get install mysql-server-5.5<\/strong><\/p>\n<p>7. Then connect to the server, and create a table to import the memo.xml file generated above into the database:<\/p>\n<p><strong>$ mysql test &#8211;local-infile<\/strong><\/p>\n<p><strong>mysql&gt; create table webos_memos (id varchar(100),kind varchar(100), rev varchar(100), sync varchar(100), color varchar (20), createDate int, timeStamp int, modDate int, modTime int, position varchar(100), text varchar(2000), title varchar(2000));<\/strong><\/p>\n<p><strong>mysql&gt; LOAD XML LOCAL INFILE &#8216;memo.xml&#8217; into table webos_memos rows identified by &#8216;&lt;results&gt;&#8217;;<\/strong><\/p>\n<p><strong>mysql&gt; select count(*) from webos_memos;<\/strong><br \/>\n<strong>+&#8212;&#8212;&#8212;-+<\/strong><br \/>\n<strong>| count(*) |<\/strong><br \/>\n<strong>+&#8212;&#8212;&#8212;-+<\/strong><br \/>\n<strong>| 105 |<\/strong><br \/>\n<strong>+&#8212;&#8212;&#8212;-+<\/strong><br \/>\n<strong>1 row in set (0.00 sec)<\/strong><\/p>\n<p><strong>mysql&gt;<\/strong><\/p>\n<p>8. Create a sql script file named get_memos.sql with contents:<\/p>\n<p><strong>select text from webos_memos;<\/strong><\/p>\n<p>9. Run the script from the shell command line:<\/p>\n<p><strong>$ mysql -t test &lt; get_memos.sql| sed &#8216;s\/|\/^\/g&#8217; &gt;memos.txt<\/strong><\/p>\n<p>This will put all the memos in a text file memos.txt, separated using the upcaret ^.<\/p>\n<p>10. Create a shell script gen_memfiles.sh and make it executable:<br \/>\n<strong>$ touch gen_memfiles.sh<\/strong><br \/>\n<strong>$ chmod a+x gen_memfiles.sh<\/strong><\/p>\n<p>11. Insert the following contents:<\/p>\n<p><strong>OLDIFS=$IFS<\/strong><br \/>\n<strong>MEMOS=`cat memos.txt`<\/strong><br \/>\n<strong>#field separator is ^<\/strong><br \/>\n<strong>IFS=^<\/strong><\/p>\n<p><strong>#clear everything<\/strong><br \/>\n<strong>rm files\/*<\/strong><\/p>\n<p><strong>i=1<\/strong><br \/>\n<strong>#loop over all memos, put in their own file<\/strong><br \/>\n<strong>for memo in $MEMOS<\/strong><br \/>\n<strong>do<\/strong><br \/>\n<strong> #remove leading newlines<\/strong><br \/>\n<strong> memo=${memo\/\/$&#8217;\\n&#8217;\/} <\/strong><br \/>\n<strong> if [ -z $memo ]<\/strong><br \/>\n<strong> then continue<\/strong><br \/>\n<strong> fi<\/strong><\/p>\n<p><strong>#put first line to use as the title in Evernote<\/strong><br \/>\n<strong> #remove tabs, they cause problems on import<\/strong><br \/>\n<strong> title=`echo $memo|head -1| sed &#8216;s\/\\t\/ \/g&#8217;`<\/strong><br \/>\n<strong> echo $title<\/strong><br \/>\n<strong> echo &#8220;Generating memo file $i&#8230;&#8221;<\/strong><br \/>\n<strong> echo $title &gt; files\/$i.txt<\/strong><br \/>\n<strong> echo $memo &gt;&gt; files\/$i.txt<\/strong><\/p>\n<p><strong>i=`expr $i + 1`<\/strong><br \/>\n<strong>done<\/strong><br \/>\n<strong>#restore IFS<\/strong><br \/>\n<strong>IFS=$OLDIFS<\/strong><br \/>\n12. Make a sub-directory files to hold the notes:<br \/>\n<strong>$ mkdir files<\/strong><\/p>\n<p>13. Run the shell script gen_memfiles.sh:<br \/>\n<strong>$ .\/gen_memfiles.sh<\/strong><\/p>\n<p>This will put each memo in a numbered txt file in the files sub-directory.<\/p>\n<p>14. Copy the files sub-directory to a Windows PC with the Evernote client installed.<\/p>\n<div id=\"attachment_531\" style=\"width: 160px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2013\/01\/PC_memo_folder.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-531\" class=\"size-thumbnail wp-image-531\" title=\"PC Memo Folder\" src=\"http:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2013\/01\/PC_memo_folder-150x150.jpg\" alt=\"PC Memo Folder\" width=\"150\" height=\"150\" \/><\/a><p id=\"caption-attachment-531\" class=\"wp-caption-text\">PC Memo Folder<\/p><\/div>\n<p>15. Start up the Evernote client on the Windows PC, and configure the Tools-&gt;Import Folder option to import from the files directory you copied over.Hit OK.<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p><div id=\"attachment_529\" style=\"width: 160px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2013\/01\/PC_evernote_tools_import.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-529\" class=\"size-thumbnail wp-image-529\" title=\"Evernote Tools Import\" src=\"http:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2013\/01\/PC_evernote_tools_import-150x150.jpg\" alt=\"Evernote Tools Import\" width=\"150\" height=\"150\" \/><\/a><p id=\"caption-attachment-529\" class=\"wp-caption-text\">Evernote Tools Import<\/p><\/div><\/td>\n<td>\n<p><div id=\"attachment_526\" style=\"width: 160px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2013\/01\/PC_evernote_importfolder_dialog.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-526\" class=\"size-thumbnail wp-image-526\" title=\"Evernote Import Folder Dialog\" src=\"http:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2013\/01\/PC_evernote_importfolder_dialog-150x150.jpg\" alt=\"Evernote Import Folder Dialog\" width=\"150\" height=\"150\" \/><\/a><p id=\"caption-attachment-526\" class=\"wp-caption-text\">Evernote Import Folder Dialog<\/p><\/div><\/td>\n<td>\n<p><div id=\"attachment_527\" style=\"width: 160px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2013\/01\/PC_evernote_importfolder_location.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-527\" class=\"size-thumbnail wp-image-527\" title=\"Evernote Import Folder Location\" src=\"http:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2013\/01\/PC_evernote_importfolder_location-150x150.jpg\" alt=\"Evernote Import Folder Location\" width=\"150\" height=\"150\" \/><\/a><p id=\"caption-attachment-527\" class=\"wp-caption-text\">Evernote Import Folder Location<\/p><\/div><\/td>\n<\/tr>\n<tr>\n<td>\n<p><div id=\"attachment_528\" style=\"width: 160px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2013\/01\/PC_evernote_importfolder_updated.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-528\" class=\"size-thumbnail wp-image-528\" title=\"Evernote Import Folder Updated\" src=\"http:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2013\/01\/PC_evernote_importfolder_updated-150x150.jpg\" alt=\"Evernote Import Folder Updated\" width=\"150\" height=\"150\" \/><\/a><p id=\"caption-attachment-528\" class=\"wp-caption-text\">Evernote Import Folder Updated<\/p><\/div><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>16. Your notes should all import, using the first line of the generated memo file as the title. You may have a few extraneous notes with garbage, as well as a few outliers that get rejected, but this method should handled most WebOS memos.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_540\" style=\"width: 160px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2013\/01\/PC_evernote_webos_notes_import_success1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-540\" class=\"size-thumbnail wp-image-540\" title=\"Evernote WebOS Memo Import Success\" src=\"http:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2013\/01\/PC_evernote_webos_notes_import_success1-150x150.jpg\" alt=\"Evernote WebOS Memo Import Success\" width=\"150\" height=\"150\" \/><\/a><p id=\"caption-attachment-540\" class=\"wp-caption-text\">Evernote WebOS Memo Import Success<\/p><\/div>\n<p>Good luck!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently took the plunge and decided to setup Android CM9 (ICS 4.0) on my HP Touchpad in a dual-boot config using the instructions found here. I have to say, in the weeks since I started using Android on the tablet, I have spent almost no time in WebOS. I don&#8217;t miss it at all, [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[56,80,81],"tags":[68],"class_list":["post-521","post","type-post","status-publish","format-standard","hentry","category-android","category-tablet","category-touchpad","tag-evernote-webos-touchpad-android-memos"],"_links":{"self":[{"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=521"}],"version-history":[{"count":12,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/521\/revisions"}],"predecessor-version":[{"id":537,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/521\/revisions\/537"}],"wp:attachment":[{"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}