Export images as DVD Titles?

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
DreamStatic
Addicted to Bruji
Addicted to Bruji
Posts: 71
Joined: Tue May 30, 2006 4:57 pm

Export images as DVD Titles?

Post by DreamStatic »

Hey everyone,

Just a quick question, is it possible to export the DVD Artwork covers as images in a folder with the filename of the image the title of the movie? I know where the image files are, but they are named numbers and I don't want to have to rename over 3000 images by hand. Thanks so much for the info. Also, if that is possible can it also have .tbn as the extension instead of .jpg?

Thanks,
DreamStatic
User avatar
Nora
Site Admin
Posts: 2155
Joined: Sun Jul 04, 2004 5:03 am
Contact:

Re: Export images as DVD Titles?

Post by Nora »

Take a look at this post. Basically, export your collection by creating a text template that will create commands to copy the images in Terminal. (For the second line you have to change the path and [UserName] to your desired path and user name). Create a text file and call it copyImages.txt and save it to ~/Library/Application Support/DVDpedia/Templates. Export your library with that template and then copy paste all the lines from the exported text file into Terminal to run them. Each line will copy the image to folder you specified and change the name to the titles and the suffix to tmb.

Code: Select all

<!--BeginRepeat-->cp -f "/Users/[UserName]/Library/Application Support/DVDpedia/Covers/[key:uid].jpg" "/Users/[UserName]/Desktop/Movies/[key:title].tmb" 
<!--EndRepeat-->
DreamStatic
Addicted to Bruji
Addicted to Bruji
Posts: 71
Joined: Tue May 30, 2006 4:57 pm

Re: Export images as DVD Titles?

Post by DreamStatic »

Great, thank you Nora. I appreciate your assistance as always. :)

One other item, when exporting in text format is it possible to export the links you have attached to each entry? i.e. file:///Volumes/FortySeven/Movies/Trailers/Music And Lyrics.mov? I would just like this path exported, not the files or anything. I have tried this, but it doesn't seem to work:

Code: Select all

<!--IFlinks 
[linksBegin]
        [link:url]
[linksEnd]
ENDlinks-->
Also, how would i go about exporting in text format one movie per text file? Instead of all the movies on one neverending text page?
So the text files would be: Music and Lyrics.txt, Batman.txt, etc.

Thanks so much.
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Export images as DVD Titles?

Post by Conor »

The text templates do not export the links. But I have updated the program to export links for text. You might want to condense the link part into a single line, depending on how you want the final format. Also paths will not be exported with the initial file:// prefix, you will have to add that with find and replace if you need it.

Exporting a single movie per file can't be done with the text template. You would have to rename it .html so that the program thinks it's HTML and then you can export a single movie per file with the HTML export settings. However they will still be named page1.html, page2.html... With a secondary text template export as above the file could be rename to the movie titles, just like it does with the images, instead of [key:uid] you would use [key:incrementalNumber] and instead of cp (copy), use mv (move).

Since it seems you want something very specific it might be easier working the XML file that a .dvdpedia export creates. Control clicking a .dvdpedia export and showing the package contents reveals the XML that you can then use with XSLT transformation to do any kind of data format change.

Another option I just thought of is using the built in echo command in terminal to create the files. For example with the following template export, then copy pasted into terminal, you would end up with a folder on your Desktop called DVDpediaExport that contains files called Music and Lyrics.txt, Batman.txt, etc... with any information you want.

Code: Select all

cd Desktop
mkdir DVDpediaExport
cd DVDpediaExport
<!--BeginRepeat-->echo "\"/Users/[UserName]/Library/Application Support/DVDpedia/Covers/[key:uid].jpg\" \"/Users/[UserName]/Desktop/Movies/[key:title].tmb\" <!--IFlinks[linksBegin][link:url] [linksEnd]ENDlinks-->" > "[key:title].txt"
<!--EndRepeat-->
DreamStatic
Addicted to Bruji
Addicted to Bruji
Posts: 71
Joined: Tue May 30, 2006 4:57 pm

Re: Export images as DVD Titles?

Post by DreamStatic »

Thanks Nora and Conor,

First off, Conor your updated beta exports the links perfectly, thank you for that. :)

Conor/Nora your code is quite smart and it works, sorta. What I mean is the exported text template is perfect. When I paste it into the terminal it fails to complete all the movies that were exported. I only did 20 to keep the number small during testing. It does about 5 then doesn't do anymore. I ran it a few different times and randomly it will complete more or less. I copy/pasted each line from the text template export and it created all 20 perfectly. It seems the Terminal is running too fast and getting ahead of itself. The reason I think this is because, where it fails, the terminal will show a partial line from the copy/paste and then the next line attached to that incomplete line. Here is an example of what I mean:

Code: Select all

cp -f "/Users/dreamstatic/Library/Applicaticp -f "/Users/dreamstatic/Library/Applicaticp -f "/Users/dreamstatic/Library/Applicaticp -f iccp -f "/Users/dreamstatic/Library/Applicaticp -f "/Users/dreamstatic/Library/Applicaticp -f "/Users/dreamstatic/Library/Applicaticp -f "/Users/DVDpedia/Covers/10645.jpg" "/Users/dreamstatic/Desktop/Movies/Snakes on a Plane.tbn"
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-pvX] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-pvX] source_file ... target_directory
dreamstatics-mac-pro:~ dreamstatic$ cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10643.jpg" "/Users/dreamstatic/Desktop/Movies/Timecop.tbn"
dreamstatics-mac-pro:~ dreamstatic$ cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10644.jpg" "/Users/dreamstatic/Desktop/Movies/Turistas.tbn"
Here is what it looks like if I paste it in BBEdit or Textedit:

Code: Select all

cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10635.jpg" "/Users/dreamstatic/Desktop/Movies/Alpha Dog.tbn"
cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10630.jpg" "/Users/dreamstatic/Desktop/Movies/Blood Diamond.tbn"
cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10628.jpg" "/Users/dreamstatic/Desktop/Movies/Casino Royale.tbn"
cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10629.jpg" "/Users/dreamstatic/Desktop/Movies/Crank.tbn"
cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10634.jpg" "/Users/dreamstatic/Desktop/Movies/Diggers.tbn"
cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10633.jpg" "/Users/dreamstatic/Desktop/Movies/Dreamgirls.tbn"
cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10636.jpg" "/Users/dreamstatic/Desktop/Movies/Freedom Writers.tbn"
cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10641.jpg" "/Users/dreamstatic/Desktop/Movies/The Illusionist.tbn"
cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10637.jpg" "/Users/dreamstatic/Desktop/Movies/The Last King of Scotland.tbn"
cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10626.jpg" "/Users/dreamstatic/Desktop/Movies/Music and Lyrics.tbn"
cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10640.jpg" "/Users/dreamstatic/Desktop/Movies/National Lampoon's Pucked.tbn"
cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10639.jpg" "/Users/dreamstatic/Desktop/Movies/Notes on a Scandal.tbn"
cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10631.jpg" "/Users/dreamstatic/Desktop/Movies/Off the Black.tbn"
cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10642.jpg" "/Users/dreamstatic/Desktop/Movies/The Prestige.tbn"
cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10638.jpg" "/Users/dreamstatic/Desktop/Movies/Running With Scissors.tbn"
cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10627.jpg" "/Users/dreamstatic/Desktop/Movies/Saw III.tbn"
cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10645.jpg" "/Users/dreamstatic/Desktop/Movies/Snakes on a Plane.tbn"
cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10643.jpg" "/Users/dreamstatic/Desktop/Movies/Timecop.tbn"
cp -f "/Users/dreamstatic/Library/Application Support/DVDpedia/Covers/10644.jpg" "/Users/dreamstatic/Desktop/Movies/Turistas.tbn"
I also tried your code, Conor, for the "echo" trick. It also works awesomely, but again it does the same thing. It confuses itself by overwriting previous lines.

Any ideas what causes this or how to prevent it? Thanks for taking precious moments of your day to answer my questions. I appreciate it GREATLY!!
DreamStatic
Addicted to Bruji
Addicted to Bruji
Posts: 71
Joined: Tue May 30, 2006 4:57 pm

Re: Export images as DVD Titles?

Post by DreamStatic »

It appears I have fixed it. Seems it was the Terminal app as suspected. I went and downloaded iTerm and tried it in there and it worked PERFECTLY!!!

THANK YOU, both so much. :D :D :D :D :D
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Export images as DVD Titles?

Post by Conor »

I tried it out and can confirm that with to much data in the paste the Terminal gets confused. I have something similar happen to me backwards; if the terminal shows a lot of data in a single command when scrolling backwards there comes a point where it's all gibberish. Glad the echo command worked well.
Post Reply