Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: XML Creation Script For Tivoserver

  1. #1
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    427

    XML Creation Script For Tivoserver

    Here is a Cygwin script that generates XML files for all shows in a given folder on your PC. This is especially useful if you have a folder on your PC filled with 100 movies, and you want them to appear in a "movies" folder when you transfer them with Tivoserver.

    The script generates a unique XML file for every show in the folder, and then edits the file, giving it a unique TMSID and setting the episode title equal to the name of the show with the extension stripped off. Since Tivo doesn't like you creating TMSIDs from scratch, you need to extract a template XML file from the target folder you plan to transfer the shows to. The script is based on my observations here.

    Usage:
    1. Extract a template xml file: Record a few seconds of an episodic show you wouldn't normally watch, stop the recording, then record a few more seconds of it to create a folder. Extract the xml file from one of the shows using mfs_ftp.
    2. Rename the folder to anything you like using folders.tcl.
    3. Edit the first few lines of the attached script to point to the directory containing your shows and the xml template you extracted in step one.
    4. Run the script on Cygwin without arguments. Should also run on any Linux distro as long as you have sed, awk, and grep.
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2005
    Posts
    59
    I've been trying to figure out the xml / cache myself over the past few days. I'm in a windoze environment and linuxly challenged.

    I'm messing with about a dozen movies on my PC.

    I've followed your suggestions to make a folder on the tivo and I'm ready to pull an xml file off the tivo.

    I'll edit it manually with notepad++. Am I correct in the following assumptions:

    1. Need to change the last two digits of the episode tmsid to whatever.
    2. Change the titles, episode titles, descriptions if desired.
    3. rename the xml to have the same name as the video file.
    4. locate the xml in the same PC folder as the video file.

    Does this work for any video format that can be transferred via tivoserver? Will this work on a second tivo if the original folder was not created on that unit?
    Last edited by fredfillis; 12-31-2006 at 07:02 PM.
    DSR7000 6.2 x 2

  3. #3
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    427
    Quote Originally Posted by fredfillis View Post
    I've been trying to figure out the xml / cache myself over the past few days. I'm in a windoze environment and linuxly challenged.

    I'm messing with about a dozen movies on my PC.

    I've followed your suggestions to make a folder on the tivo and I'm ready to pull an xml file off the tivo.

    I'll edit it manually with notepad++. Am I correct in the following assumptions:

    1. Need to change the last two digits of the episode tmsid to whatever.
    2. Change the titles, episode titles, descriptions if desired.
    3. rename the xml to have the same name as the video file.
    4. locate the xml in the same PC folder as the video file.

    Does this work for any video format that can be transferred via tivoserver? Will this work on a second tivo if the original folder was not created on that unit?
    1. No. The script does that automatically.
    2. Not exactly. The title will be set to the filename of the show (by the script). The episode title will be set to whatever is in template, or whatever you put in the user input area of the script.
    3. No. You just need one XML template file called template.xml. The script will generate a new XML file for every show in the folder, and will name the XML file the same as the show's filename, but with an .xml extension.
    4. Only the template xml file.

  4. #4
    Join Date
    Jan 2004
    Location
    Chico
    Posts
    51
    Help
    When I run xml.sh with cygwin I get this error

    ./xml.sh: line 9: $'r\' : command not found
    ': not a valid identifier: '
    etc...
    what am I doing wrong.

  5. #5
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    427
    Lines 1 through 10 of the script are comments, and there's no '$r' variable anywhere in the script. Try downloading the script again, and make sure you're not using any directories with spaces. Also make sure you fill in the 'user input' fields of the script with your directories.

  6. #6
    Join Date
    Jan 2004
    Location
    Chico
    Posts
    51

    I am dumb

    Thanks for the quick reply.
    I realize I was using notepad instead of notepad++
    I am in windows hell.
    I am using cygwin which is new to me, and this is my new error.

    mkdir: cannot create directory 'tmp' : No such file or directory
    mv: cannot stat 'C:/cygwin/cygdrive/tmp/template/xml': Not a directory

    Creatin test5.ty+.xml
    cp: cannot stat etc..............................

  7. #7
    Join Date
    Jan 2004
    Location
    Chico
    Posts
    51
    Also, will these files be able to be transfered with moviloader, with the same results.

  8. #8
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    427
    You named the directory incorrectly. See your original copy of the script to see how to reference your c drive in Cygwin.

  9. #9
    Join Date
    Jan 2004
    Location
    Chico
    Posts
    51
    I think I may know what I am doing wrong. Again, this is my first time using cygwin. I can't find an *****s guide to using this program. My problem is that I think I am supposed to transfer the files using cygwin to the cygdrive then I may access them. I have just been dropping them into cygdrive using windows. I only say this because when I "ls", using cygwin, the directory where my files are I get nothing but.
    c d e i j k l

    I dont know how to transfer the file from a windows environment to linux.

    Am i right.

    By the way your scripts have been a lifesaver to for me. I have the enhancement script running flawlessly on my hr10-250

    THank you.

  10. #10
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    427
    Quote Originally Posted by studog86 View Post
    I only say this because when I "ls", using cygwin, the directory where my files are I get nothing but.
    c d e i j k l
    If you navigate to the "c" directory at this point, it will actually point to c directory in your Windows installation. No need to put your files into the cygwin directory structure, just leave them on your c drive or wherever. The /cygdrive in the root of the Cygwin filesystem is the portal to the drives in your Windows environment.

  11. #11
    Join Date
    Jan 2004
    Location
    Chico
    Posts
    51
    So my directory in the script for the location of the templateshould look like this
    /cygdrive/C/movies/template.xml

    or

    C:\movies\template.xml

    I told you I am very noobie at the whole cygwin, but I understand some of the linux commands. Just enought to be dangerous.

    Again thanks for your help.
    I know how frustrating it is to help the noobs.

  12. #12
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    427
    /cygdrive/C/movies/template.xml

  13. #13
    Join Date
    Jan 2004
    Location
    Chico
    Posts
    51
    Wow
    figured it out finally.
    Thanky you for your help
    I realized that your d was just like my c drive.

    thanks again.

    Hey do you know if there is an autospace for the series 2 tivo.

  14. #14
    Join Date
    Jan 2004
    Location
    Chico
    Posts
    51
    I'm back

    O.K. I have a .ty file and now I have a new .xml for my .ty file. Now how do I merge the two into one file that can be uploaded to my hd tivo without tivoserver. (can I produce a ty+ or tmf file) I have ftp:3105 and moviloader as my choice of transfering. No tivoserver for me.

  15. #15
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    427
    I've never tried it, but I believe you can create a tmf file that contains your .xml and .ty file using tar:
    Code:
    tar -cvf movie.tmf movie.ty.xml movie.ty
    Run this command in Cygwin, of course.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •