export to CSV/XML and re-import while preserving covers?

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
Kai
Contributor
Contributor
Posts: 9
Joined: Mon Nov 07, 2005 8:14 am

export to CSV/XML and re-import while preserving covers?

Post by Kai »

This is a question about dvdpedia, but I suppose it applies to the other pedias as well:

I would like to work with dvdpedia's list in other applications, alter the data & re-import than to dvdpedia again...e.g. have some program automatically fill out the aspect ratio, add data from an independent spreadsheet list, things like that. Now I carefully handselected all the covers in my list from the web, and there is no way dvdpedia would be able to automatically re-load them from the web.

Altering dvdpedia's XML data file directly to accomplish this appears to be quite difficult; I didn't find any program yet which can put this XML file in easily editable from. By carefully writing elaborate XSLT files one can import parts of the data to filemaker, excel etc., but i have yet to see anyone doing this with the picture information intact.

I was thinking that this shouldn't be such a problem as the covers are named by the collection ID of an entry, thus dvdpedia could export/import a CSV file including the collection IDs and automatically associate the right pictures. But I couldn't find out how this can be done.
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

I would suggest modifying the XML database directly, but as you pointed out in your case of adding data from other programs this can be quite a lot of work.

What you can do in such a specific case is take advantage of the fact that the internal number for marking movies starts at 1. Do a .dvdpedia export of all your movies. Then keeping all the movies in the same order do a second export to the file format of your choice tab delimited.

Work the file in another program.

Now to import it back in, with DVDpedia not running move the DVDpedia data folder from ~/Library/Application Support/DVDpedia to another location. Launch DVDpedia and it will create a brand new empty data folder. Import your worked text file back in and the movies will be imported in the same order they were exported originally starting with an internal number of 1. To add the covers back in go to the exported .dvdpedia file and right click to show package contents inside you will find an image folder with all the images starting at 1.jpg, select all the images and move them to your new data folder at ~/Library/Application Support/DVDpedia/Covers those adding the corresponding images for the imported entries.

Of course playing around with the data be sure to make backups of your original information in case you need to replace it back. Also moving the autofill.xml file from the old data folder might be useful if you use the autofill options.

Another feature of DVDpedia to keep in mind is that by launching while holding down option key will give you the choice to create and switch from several data folders. But sometimes it makes more sense to move the data folder in the finder to keep in mind what is happening.
Post Reply