Export One Record

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
lraesly
Contributor
Contributor
Posts: 9
Joined: Sun Nov 25, 2007 12:49 am

Export One Record

Post by lraesly »

I have a large DVD collection that I would like to manage in DVDPedia. I view the movies on a Tivo (using pyTivo). I have created an export template that writes out the movie data in a format that pyTivo can pass to the Tivo. However, the export command wants to send all the records to a common file.

I need to either be able to export the data for a single DVD that is selected. Have I missed something? The current export pulls all of the DVD's in the database.

Thx,

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

Post by Nora »

To export just one record, you can either filter your table view (via the search field) so that only the one entry is showing and then do the export or you have to create a separate collection for the entry (select the entry and press Command-Shift-N) and then export that collection.
If you have a lot of entries then just filtering the table view is probably a quicker way to go.
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

If your looking to export all DVDs each to a separate file add the following to the template:

Code: Select all

<meta name="PageSplit" content="1" />
I am not sure how to create a comments in pyTivo meta data files but I think using the prefix # will do it. Otherwise if you are using XML all you really need is name="PageSplit" content="1" so dropping the greater than and less signs that would confuse the XML will still work.
lraesly
Contributor
Contributor
Posts: 9
Joined: Sun Nov 25, 2007 12:49 am

Post by lraesly »

Thanks for the prompt replies.

I didn't realize that there is an option to create a text file for each DVD. That would be ideal. I have a library of several hundred DVD's. What would be great would be for DVDPedia to export the collection as follows:

1) Create a text file using the movie name and appended with mpg.txt
2) Write the appropriate information (see my export template below).
3) Move to the next DVD, etc.

Is this possible? I didn't have any luck with the PageSplit command. It just appeared in the body of the text file.

Thx,

Lee

Here is my template:

<!--BeginRepeat-->isEpisode : false
description : ([key:theatrical]) [key:summary] Raing: [key:rating]. Rated [key:rated].
title : [key:title]
vExecProducer : [key:studio]
originalAirDate : [key:theatrical]-01-02T01:00:00Z
seriesTitle : [key:title][creditsBegin]
vActor : [credit:name][creditsEnd]
vSeriesGenre : [key:genre]
vDirector : [key:director]
vProgramGenre : [key:genre]
vSeriesGenre : [key:genre]
vWriter : [key:writer]
vGuestStar :
time :
vChoreographer :
episodeNumber :
vHost :
displayMajorNumber :
displayMinorNumber :
callsign :
startTime :
stopTime :
<!--EndRepeat-->
lraesly
Contributor
Contributor
Posts: 9
Joined: Sun Nov 25, 2007 12:49 am

Export splits DVD's into distinct files

Post by lraesly »

Just a clarification of my prior post...

I am hoping to run export and have it automatically create a text file (using my Text export template) for each DVD that it exports. Exporting 100 DVD entries would create 100 files.

I hope this makes sense...

Best,

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

Post by Conor »

By adding #<meta name="PageSplit" content="1" /> as the first line I get one entry per DVD.

DVDpedia uses the collection name and then appends an incremental number to the end for each entry. To change the name you have to do a second export that will contain the titles of the entries that will allow you to change the names.

1. [url=dvdpedia://www.bruji.com/download?temp/pytivo.zip]Click here[/url] to install both templates.

2. Open DVDpedia select the Tivo collection (create a new collection if necessary and drag the movies you want to export); export using the template TivoMetaData.txt under the text section, create a folder named Export on your desktop to hold the files and select that as the destination for the export.

3. Look at the name of the first movie in the collection and by hand change the name of ~/Desktop/Export/Tivo.txt file to ~/Desktop/Export/the Movie Titlempg.txt (Because the first entry is different it can't be automated).

4. Delete the first movie from the Tivo collection (the one you just changed the file name for) and do a second export using the ChangeFileNameCommand text template.

5. Copy the text from the exported file and paste into the Terminal program (This will change the rest of the file names to [MovieTitle]mpg.txt).

As long as you don't have any forward slashes in your movie titles things should go well. Otherwise you will be able to tell where a command failed as the rest of the entries will not have their names changed and the numbering is sequential. You can even go further and modify the second template to move the files directly into the appropriate movie folder if the naming of the folder is standardized. I hope these templates helps setting up your pyTivo.
lraesly
Contributor
Contributor
Posts: 9
Joined: Sun Nov 25, 2007 12:49 am

Works great!

Post by lraesly »

Conor,

Thanks! I got everything working and the results are amazing. My video files now have a complete set of content (description, title, actors and more) that display when paging through the movies on my Tivo. The movie information (and the video files) are hosted by pyTIvo, a multi-platform video server for the Tivo (works with Mac, Windows and Linux).

Here's what I did (and a couple of changes to your linked files), just in case someone browses this thread:

1) I renamed all of my movie file names on the server to equal the movie titles in DVDPedia. And the movies are in mpg format. Obviously any slashes or other special characters must be removed (:,/,\,?,* and more).
2) I entered all of movies into DVDPedia, using the automatic search (which worked great).
3) I updated the fields in the TivoMetaData.txt file (had issues with my initial selection).
4) Updated the TivoMetaData.txt file to use unix line feeds only. The Tivo is a Unix system and was choking on the (I think) carriage returns in the original linked file. (Weird but true...)
5) I had trouble pasting the ChangeFileNameCommand.txt output onto the terminal prompt (kept dropping characters). Instead, I would change directory to the Export directory in terminal and then change the text file to an executable (sudo chown +x Tivo.txt ). Then type ./Tivo.txt to execute.
6) Finally, copy the metadata files to the server directory where the movies are stored.

For anyone reading this, you must use the Collection name of Tivo and the export folder must be named Export and be on your desktop. Case counts!

And although this may sound a little complicated, it's not. You get the full power of DVDPedia to manage your collection and all of the metadata (well most) displayed on your Tivo.

Thank again for your help in this.

Best,

Lee

PS I'm posting this over at the Tivo Community forums so others may benefit.
lraesly
Contributor
Contributor
Posts: 9
Joined: Sun Nov 25, 2007 12:49 am

TivoMetaData Output File

Post by lraesly »

#<meta name="PageSplit" content="1" />
<!--BeginRepeat-->title : [key:title]
description : ([key:theatrical]) [key:rating]/10. [key:summary] Rated [key:rated].
episode_title : [key:title]
time : [key:theatrical]-01-02T01:00:00Z
originalAirDate : [key:theatrical]-01-02T01:00:00Z
vProgramGenre : [key:genre]
vSeriesGenre : [key:genre]
vExecProducer : [key:studio]
seriesTitle : [key:title][creditsBegin]
vActor : [credit:name][creditsEnd]
isEpisode : false
vDirector : [key:director]
vWriter : [key:writer]
vGuestStar :
vChoreographer :
vHost :
sourceStation : DVD
vProducer :
<!--EndRepeat-->
lraesly
Contributor
Contributor
Posts: 9
Joined: Sun Nov 25, 2007 12:49 am

Sample Output

Post by lraesly »

#<meta name="PageSplit" content="1" />
title : The Da Vinci Code
description : (2006) 6.5/10. Symbologist Robert Langdon (Hanks) is thrown into a mysterious and bizarre murder. Alongside Langon is the victims granddaughter and cryptologist Sophie Neveu (Tautou), who with Robert discovers clues within Da Vinci's paintings. To further find the truth, Robert and Sophie travel from Paris to London, whilst crossing paths with allies and villains such as Sir Leigh Teabing (McKellen) and Silas (Bettany). Wherever their path takes them, there discovery which is about to be revealed could shake the foundations of mankind. Rated PG-13.
episode_title : The Da Vinci Code
time : 2006-01-02T01:00:00Z
originalAirDate : 2006-01-02T01:00:00Z
vProgramGenre : Drama
vSeriesGenre : Drama
vExecProducer : Sony Pictures
seriesTitle : The Da Vinci Code
vActor : Tom Hanks
vActor : Audrey Tautou
vActor : Ian McKellen
vActor : Jean Reno
vActor : Paul Bettany
vActor : Alfred Molina
vActor : Jürgen Prochnow
vActor : Jean-Yves Berteloot
vActor : Etienne Chicot
vActor : Jean-Pierre Marielle
vActor : Marie-Françoise Audollent
vActor : Rita Davies
vActor : Francesco Carnelutti
vActor : Seth Gabel
vActor : Shane Zaza
isEpisode : false
vDirector : Ron Howard
vWriter : Akiva Goldsman, Dan Brown
vGuestStar :
vChoreographer :
vHost :
sourceStation : DVD
vProducer :
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

Thank you for sharing the setup details with other users.
byrdmanlk
Inductee
Inductee
Posts: 1
Joined: Sun Nov 29, 2009 8:22 pm

Re: Export One Record

Post by byrdmanlk »

Ok I got everything done no Problem but My tivo does not see it I am using PY tivo and I have no Idea why this is not working. Please if you can help please contact me thanks.#<meta name="PageSplit" content="1" />
isEpisode : false
description : (2004) Jennifer Garner glows like a rising star in "13 Going on 30", a girly version of the Tom Hanks classic "Big". Jenna (Garner, "Alias", "Daredevil"), a frustrated teenage girl, just wants to skip past all those annoying adolescent years and arrive at a glamorous adulthood--and thanks to some inexplicable wishing dust, she does. But once she reorients herself to a life as a high-end magazine editor with a sports-star boyfriend, she discovers that in the 17 years she skipped she became a not-so-nice person, including casting aside her best friend Matt (played as an adult by Mark Ruffalo, "Eternal Sunshine of the Spotless Mind"). There's no question that Jenna will rediscover her lost innocence, but Garner rises above the lack of suspense. "13 Going on 30" floats along, buoyed by her goofy sweetness. Her lovely looks are made accessible by her unfettered silliness; it's a winning combination. "--Bret Fetzer" Raing: 4.0 (284 votes). Rated PG-13.
title : 13 Going On 30
vExecProducer : Sony Pictures
originalAirDate : 2004-01-02T01:00:00Z
seriesTitle : 13 Going On 30
vActor : Jennifer Garner
vActor : Mark Ruffalo
vActor : Judy Greer
vActor : Andy Serkis
vActor : Kathy Baker
vSeriesGenre : Comedy
vDirector : Gary Winick
vProgramGenre : Comedy
vSeriesGenre : Comedy
vWriter :
vGuestStar :
time :
vChoreographer :
episodeNumber :
vHost :
displayMajorNumber :
displayMinorNumber :
callsign :
startTime :
stopTime :

My tivo sees none of this info
here is what my output looks like
noisyscott
Addicted to Bruji
Addicted to Bruji
Posts: 40
Joined: Mon Feb 12, 2007 10:48 am

Re: Export One Record

Post by noisyscott »

I would check the txt file name. pyTivo expects the txt file to be named exactly the same as the movie file with a .txt extension added, not replaced.

Incorrect
13 Going On 30.avi
13 Going On 30.txt

Correct

13 Going On 30.avi
13 Going On 30.avi.txt
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Export One Record

Post by Conor »

I just wanted to point out that with the latest beta, you can add the following two meta tags to integrate this template further. One for setting date output to a specific format:

Code: Select all

<meta name="date-format" content="YYYY-MM-dd'T'hh:mm:ss'Z'" />


The other setting (still in testing) to name the exported files after the movie title is:

Code: Select all

<meta name="uidNaming" content="title">
For the pyTIvo, as Noisy Scott mentioned, the movie names have to match including the movie file extension. In this case they can be added via a replace script afterwards as DVDpedia can't handle the double extension in a template file name.

The final test template I am using is:

Code: Select all

#<meta name="PageSplit" content="1" />
#<meta name="date-format" content="YYYY-MM-dd'T'hh:mm:ss'Z'" />
#<meta name="uidNaming" content="title">
<!--BeginRepeat-->title : [key:title] 
description : ([key:theatrical]) [key:rating]/10. [key:summary] Rated [key:rated]. 
episode_title : [key:title] 
time : [key:theatrical] 
originalAirDate : [key:theatrical] 
vProgramGenre : [key:genre] 
vSeriesGenre : [key:genre] 
vExecProducer : [key:studio] 
seriesTitle : [key:title][creditsBegin] 
vActor : [credit:name][creditsEnd] 
isEpisode : false 
vDirector : [key:director] 
vWriter : [key:writer] 
vGuestStar : 
vChoreographer : 
vHost : 
sourceStation : DVD 
vProducer : 
<!--EndRepeat-->
Post Reply