"PocketPedia" using EverNote

Talk to other Pedia users about the programs, share tricks and tips or ask questions about existing features.
Post Reply
senius
Junior Member
Junior Member
Posts: 4
Joined: Thu Feb 17, 2011 11:55 am
Location: Denmark
Contact:

"PocketPedia" using EverNote

Post by senius »

Hi everyone,

I'm just as annoyed by the Amazon restrictions in regards to PocketPedia as everyone else and have been looking for ways to sync my Pedias with iPhone. I started out creating a simple template, which I printed to PDF and uploaded it to Dropbox. In general this worked okay, but I still found that I needed to be able to search my movies and series (more than 200 entries) on the iPhone.

To start with I was looking to maybe buying a sort of database application for the iPhone and sync this with my Pedias on Mac, but it involved a lot of additional work and tweaking to get even a small sample working.

Because of other needs I installed EverNote, which is free both for iPhone and Mac with a basic member limit of 60 Megs per month. Out of curiosity I started looking for ways to import/export data to/from EverNote and after a short look at the export-format of EverNote I came to the conclusion: "This is a fairly simple XML-format" and I started 'hacking' away to export data from DVDPedia to the EverNote XML-format. After just 30 min. I had a working template, which exports all my movies in a format, which is readable by EverNote.

Below is the template I made. Just create a new XML-file and save it to /User/<your username>/Library/Application Support/DVDPedia/Templates with the name EverNote.xml. The template should now be selectable from Text-tab in the DVDPedia export menu. Hit the export button and name the export file. Once the export has finished, you should locate the XML-file and rename it to *.enex, which is the default file extension for EverNote. Just double-click the file and EverNote will ask if it should start importing the file.

Viola! You now have a fully searchable list of your movie available on your iPhone. Happy syncing... :D

All the best to everyone,
/jacob

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export.dtd">
<en-export export-date="[global:dateUpdated]" application="DVDPedia" version="DVDPedia 4.6.4">
<!--BeginRepeat--><note><title>[key:title]</title><content><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">
<en-note style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div><b>Original Title:</b>[key:originalTitle]</div>
<div><b>Director:</b>[key:director]</div>
<div><b>Producer:</b>[key:producer]</div>
<div><b>Writer:</b>[key:writer]</div>
<div><b>Studio:</b>[key:studio]</div>
<div><b>Summary:</b>[key:summary]</div>
</en-note>
]]></content><created>[global:dateUpdated]</created><updated>[global:dateUpdated]</updated><tag>DVD Collection</tag><note-attributes/></note>
<!--EndRepeat-->
</en-export>
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: "PocketPedia" using EverNote

Post by Conor »

Hi Jacob,

That is a very useful template indeed. Thank you for figuring that out and sharing it. A small tip: DVDpedia is smart enough to recognize XML even without the extension. Naming the template "EverNote.enex", with the EverNote extension, means it still show up for export and the resulting file will be already named with the correct extension. Even more DVDpedia will then launch the exported file in EverNote triggering the import. Means only two click exporting and importing for EverNote.
senius
Junior Member
Junior Member
Posts: 4
Joined: Thu Feb 17, 2011 11:55 am
Location: Denmark
Contact:

Re: "PocketPedia" using EverNote

Post by senius »

Hi Conor,

Thank you for the valuable feedback. I actually tried the thing you mentioned with the extension .enex, but somehow special XML-characters are not escaped in the text export. When this happens, EverNote is not able to import the file correctly and not all movies are uploaded. This is because the XML-file is not valid.

E.g. I have a movie called Amos & Andrews, where the character ampersand needs to be escaped to & in order for the XML to be valid. When I used the template with extension .xml the character was escaped correctly, but when using extension .enex the character was not escaped. I think it's because DVDPedia considers the extension .enex to be plain text and then it should of course not escape the character.

Best regards,
Jacob
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: "PocketPedia" using EverNote

Post by Conor »

Here I was thinking DVDpedia was already smart about these things; in that case the new DVDpedia beta 64 is. It will detect "<?xml" at the beginning of the file and encode characters for XML.
senius
Junior Member
Junior Member
Posts: 4
Joined: Thu Feb 17, 2011 11:55 am
Location: Denmark
Contact:

Re: "PocketPedia" using EverNote

Post by senius »

Thanks mate,

The new beta works like a charm....:) Thanks for your quick fix.

Best regards,
Jacob
adamhh
Addicted to Bruji
Addicted to Bruji
Posts: 60
Joined: Sat Nov 22, 2008 11:09 am
Location: London, England

Re: "PocketPedia" using EverNote

Post by adamhh »

Thanks Senius

I've been very frustrated by not being able to have my collections on the iphone. However my problem with EverNote has been that the size of my collection (4000+ in DVDpedia, 2000+ CDpedia etc) means that the whole collection never completely appears in the resulting pdf, no matter what template I've tried.

When I get a moment I'll try yours...fingers crossed.

Since I'm totally code-illiterate, a question: How might the new code look after Conor's suggestions?

Thanks in advance
senius
Junior Member
Junior Member
Posts: 4
Joined: Thu Feb 17, 2011 11:55 am
Location: Denmark
Contact:

Re: "PocketPedia" using EverNote

Post by senius »

Hi Adam,

Based on the changes done by Conor in DVDPedia beta 64 the only thing that have changed is that the extension of the template itself can be .enex instead of .xml

No change is needed in the template itself. Please be aware that I've not yet created a template for any of the other Pedias. The template I've posted is only for DVDPedia, however, it should be fairly simple to create a template for any of the other Pedias. I would guess that Conor quite easily could implement the same change in the other Pedias to also recognize if a file should be XML-encoded or not.

I will probably update this post with templates for the other Pedias within a few days, so keep looking for the new templates. Also, please let all of us know how the template works out for the 4000+ DVDs. I'm very exited to hear about it.

Best regards,
Jacob
peertimo
Inductee
Inductee
Posts: 1
Joined: Tue Mar 22, 2011 3:11 am

Re: "PocketPedia" using EverNote

Post by peertimo »

I am getting the following error when I try to export to the XML file, with the .enex suffix:


Missing necessary tags "<!--BeginRepeat-->" or "<!--EndRepeat-->" in template file. If you would like the whole file to repeat add them at the beginning and end.

But I can confirm that these tags are in fact present. Any clues as to what is wrong?
User avatar
Nora
Site Admin
Posts: 2155
Joined: Sun Jul 04, 2004 5:03 am
Contact:

Re: "PocketPedia" using EverNote

Post by Nora »

Could you send us the file please so we can take a look at it here? You'll find our email on the support page.
Post Reply