ConvertMyNotes - PhatNotes to Evernote Converter

RUN-TIME SUMMARY:

1) Export from Phatnotes as CSV
2) Run my Python converter - converts .csv to .enex (an XML file)
3) Import into Evernote Windows Client as a .ENEX file

RUN-TIME DETAILS:

1. Manual procedure to be performed by you in PhatNotes on your Windows Desktop:

a) Open PhatNotes - click on each database, and click menus:
File, Import and Export
Select "Export to Comma Separated Values file (CSV)" and click Next button
Enter filename, for example: PhatNotes20110815DatabaseNameXX.csv
NOTE: I have not yet tested with Unicode option.
Click Next.
Select your desired "Export options", i.e. which notes you want to be put
into the Export File.

b) Repeat this step for each database.
It is apparently not possible to export all notes from all database in one export.


2. Run the our converter utility... repeat the following for each database.

a) Either type in the command below from a DOS/Command prompt/window:
c:\python26\python.exe converter.py SampleDatabase Sample.csv N N N

Or edit the MyBatch.cmd file.

Be sure and change the name of the directory to where you have
Python installed:


b) Open a DOS/Command window and enter the following:

convert XXXXXX PhatNotes20110815DatabaseNameXX.csv Y Y Y

where the parms are as follows:
1) Database name from PhatNotes - this will automatically create an
evernote tag called PhatNotesDatabase=XXXXXX.
Purpose: If you have several Phatnote databases, this is one way
you can find/separate the notes in EverNote. Eventually,
you may choose to create an EverNote foler for each PhatNote database.
If you dont' like the name "PhatNotesDatabase=XXXXX", you can edit it
in Evernote after you have uploaded.

DatabaseName Shortcuts:
There are three variables you can specify for the filename:
$BASEFILENAME
$AFTERLAST_
$BEFOREFIRST_
These can be useful if you are uploading several databases,
and you include the database name in your CSV filename when you export it.
It simply saves you from having to specify the database name twice.

Let's suppose you exported your CSV from PhatNotes as MyDatabase1.csv.

Instead of running:
c:\python26\python.exe MyDatabase1 MyDatabase1.csv N N N

you can specify:
c:\python26\python.exe $BASEFILENAME MyDatabase1.csv N N N

Let's suppose you exported your CSV from PhatNotes as Neal_MyDatabase1.csv.

Instead of running:
c:\python26\python.exe MyDatabase1 MyDatabase1.csv N N N

you can specify:
c:\python26\python.exe $AFTERLAST_ Neal_MyDatabase1.csv N N N

As you might guess, this find's the part of the file name after the last
underscore and uses that for the database name.


2) CSV file name that you exported from PhatNotes in Step 1 above.
NOTE: CSV stands for Comma-Separated-Values.
You can open a CSV file with Microsoft Excel and similar spreadsheet programs.

3) Then you specify three Yes/No flags in the format of "Y" or "N" without the quotes.
These indicate if you want to create EverNote tags for the following:
a) Category -> translates to tag: PhatNotesCategory=Meeting
b) Color -> translates to PhatNotesColor=Yellow for example
c) Priority -> translates to PhatNotesPriority=High for example

4) A file will be created, the same as your input file but with the .enex suffix.
FYI (For your information):
The convert above builds .xml files in the .ENEX style import format.
If you rename the file to a .xml suffix, you can open it with a variety
of xml programs available.

3. Import your notes into the EverNotes Windows application.
Repeat the following for each file you converted in the previous step.

a) Make sure you have installed the Evernotes window app.
http://www.evernote.com/about/download/windows.php

b) From the EverNote Windows App, do the following:
(1) From the menus click "File", then "Import" then "Evernote Export Files",
type or pick the desired filename, then click the "open" button.
(2) Evernote should import the file.

If you get errors on the input, sometimes this will be because of
stray Unicode characters. Open the .ENEX file with an editors such
as NotePad++, find the line number in question.
Sometimes the error may be anywhere in the previous note.
Look for non-alpha symbols such as a copyright sign, a trademark sign,
etc... and manually delete them.
I didn't take the time to properly handle Unicode in this initial release,
as my notes had very few of these characters, and they were not really needed.

If you can't find the special characters, you could manually delete the entire
NOTE, and try the import again. You can also copy/paste one or two notes
directly into the Evernote website.


If successful, Evernote will ask you if you want to
put the files in a synchronized directory now?
My suggestion is that you click "NO" and do the following:

a) Evernote will create a series of new notebooks named:
Imported Notes or Imported Notes{[2]}
where the number increments for each import.
b) Click on that notebook, and inspect/browse your notes.
Make sure they are "as expected".
Check the "PhatNotes..." tags as well, delete the tags if you
don't want them.

I have not yet seen how to change an "Imported Notes" Notebook to
be syncable. The icon for non-sync directories is different,
and the right-click properties don't seem to allow a change
of the syncable property.

I suggest you do either of the following:
1) Create a new notebook with the same name as your Phatnotes database,
2) Drag (move) the notes to that directory
3) Click the "sync" button
4) Go to the website and confirm that the notes are there.

Installation Details:

1) There is no MSI, just download the file and unzip to a directory on your hard drive
2) This is just a python script. You will need Python to run it.

Notes about Python: This was tested on Python 2.6.
You can download a Windows MSI for Python 2.7.1 here: http://www.python.org/download/releases/2.7.1/
Python 3 has major changes, I would not suggest trying this code with Python 3.

NOTE: When you install Python, right-click and run-as Administrator.
See a past issue I had with installation:
http://superuser.com/questions/84861/python-install-puts-all-files-libs-in-c-root-directory-windows-7-64-bit

Neal Walters
http://ConvertMyNotes.codeplex.com

Other sites:

http://VBScript-Training.com
http://BizTalk-Training.com
http://SharePoint-Training.com
http://HebrewResources.com
http://HebrewVideos.com
http://NealWalters.com






Last edited Jan 17, 2011 at 11:03 PM by NealWalters, version 5

Comments

No comments yet.