SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-13-2004, 10:04 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
xml2my Malore xml to Mlbdude my converter (1.1.0 July 14)

Here is a converter that takes the xml file that can be generated from Malore's STV, and creates an info.my that can be imported into mlbdude's STV.

Installation
Extract the xml2my.class and the xml2my.bat file from the attached zip into <some location>

edit the .bat and replace "c:/myjavaclasses" with the full path to the location where you put the xml2my.class file. Make sure this location is quoted to avoid problems with filenames with spaces!

run the tool with
Code:
xml2my.bat file.xml [outputfilename.my]
Specification of the output file name is optional. If is specified, all shows will be put in the same .my file containing multiple numbered elements (as defined in the myhpc metadata file spec)
If not present, the generated .my files will be called "title - subtitle.my" (if subtitle is not present, and if multiple shows are present in the xml, a number will be used instead).
Existing files with the same name will be overwritten without warning!!

You can also drag/drop a single shows.xml files onto the batch file, or onto a short-cut to the batch file, and the .my file(s) will be created in the same location as the .xml file.

The window will stay open when completed showing the generated file name(s) -- to disable this, remove or comment out the 'pause' line in the batch file.

Notes:
  • If you get a 'java is not recognised...' error, edit the batch file to enter the full path to the java interpreter, eg:
    "c:/Program Files/Java/j2re1.4.2_04/bin/java.exe"
  • If you get a NoClassDefFoundError, check that the xml2my.class file is in the directory specified by the -cp argument, and that the name is all in lower case on the command line.
  • to quickly create a shortcut to the batch file, right click it, and select Send To -> Desktop (create shortcut). You can then rename the shortcut and give it a pretty icon!
v 1.0.0 13-July-2004

v 1.1.0 14-July 2004
  • create multiple my files using episode name as filename
  • create output file in same location as source
  • log creation of output file names
  • add batch file to allow drag-and-drop conversion fo single filenames
Attached Files
File Type: zip xml2my.zip (6.7 KB, 508 views)

Last edited by nielm; 07-14-2004 at 04:12 AM.
Reply With Quote
  #2  
Old 07-13-2004, 10:52 AM
mlbdude's Avatar
mlbdude mlbdude is offline
Moderator
 
Join Date: May 2003
Location: Melbourne, Florida
Posts: 4,174
If you can get it to dump out .my files that match the file names for the video files it will work. My STV first looks for that then defaults to info.my.

Ex.

Gundam Seed 1.avi
Gundam Seed 1.my
Reply With Quote
  #3  
Old 07-13-2004, 12:05 PM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Quote:
Originally posted by mlbdude
If you can get it to dump out .my files that match the file names for the video files it will work.
I can't really do this because I don't know what the avi files are going to be called... The xml files are called something like MalcolmintheMiddleHumilithon-6241913-0.xml, and are likely to be renamed, so that doesn't help much either
Reply With Quote
  #4  
Old 07-14-2004, 12:47 AM
justme justme is offline
Moderator
 
Join Date: Mar 2003
Location: Greater Baltimore/Washington Metropolitan area
Posts: 1,481
Copied from nielm's post in the Maldude thread.
Quote:
Re: XML export to .my import?

quote:
--------------------------------------------------------------------------------
Originally posted by justme
Has anybody built a bridge(automated) from the MalDude(Malore code) XML metadata export to the .my metadata import files used by the MalDude(MlbDude code) import library?
--------------------------------------------------------------------------------


You mean like this:
Yep, something like this is what I had in mind. Thanks, that was fast. I really appreciate you doing this. Sorry I took so long to get back to you, it's been a lowsy day. I did get a chance to try out your app though and it's works great. I'm glad to see that you are supporting(untested by me) the multiple show format of the .my files generated. I hope that MlbDude's(and hence MalDude) STV will support that format soon, but if not I'm still happy. Can't thank you enough.

I'll have to look into using the app from Alex0230 to see about running it(xml2my) as a exe. Nothing against Java*, I just like the convience of an exe. It would be great if the combo of the two will allow me to use Window's style drap and drop as well. If not I guess I'll write up some batch to make mass conversions easier.

*I'm guessing this method will you/others to reuse the code more easily, than if you rolled an exe.

Thanks again,
/justme
Reply With Quote
  #5  
Old 07-14-2004, 04:07 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
The multiple show in one my format is not suppored by the current mlbdude/maldude STV's... Hence the following modifications:

Uploaded version 1.1.0 which:
  • supports creating single or multiple .my files
  • creates file names in same location as source (for drag/drop support of single file names)
  • creates filenames of the format "title - episode"
  • includes a batch fle to run it as a single command (for drag/drop support)
See first post for updated installation instructions and how to set up drag/drop...

Example output:
Code:
converting C:\temp\shows.xml

Creating C:\temp\Dalziel and Pascoe - The Unwanted.my
Creating C:\temp\Dalziel and Pascoe - Walls of Silence.my
Creating C:\temp\Dalziel and Pascoe - Truth and Consequences.my
Creating C:\temp\Dalziel and Pascoe - Secrets of the Dead.my
Quote:
I'm guessing this method will you/others to reuse the code more easily, than if you rolled an exe.
it's actually because I don't actually have the tools to create an exe!

Last edited by nielm; 07-14-2004 at 04:11 AM.
Reply With Quote
  #6  
Old 07-14-2004, 12:16 PM
justme justme is offline
Moderator
 
Join Date: Mar 2003
Location: Greater Baltimore/Washington Metropolitan area
Posts: 1,481
1.1.0 update

Thanks for adding drag and drop. I was thinking last night and was going to request the .my file be created in the same location as the source xml, but it seems you're 2 steps ahead of me again.

PS:I love the default naming convention for .my files. I just went thru all my shows in my library this weekend and renamed(using PowerDesk) all the shows to use that exact naming format. So I couldn't be happier to see this. That format does seem to be a defacto standard on the web. The only variation is that many sites use a "_" instead of a " ". But I always group rename them using PowerDesk Pro(best filemanager around) to use a " " instead.

Thanks for the new version,
/justme
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 06:25 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.