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 06-12-2009, 12:15 AM
TBacker's Avatar
TBacker TBacker is offline
Sage Advanced User
 
Join Date: Nov 2006
Location: North Syracuse, NY
Posts: 124
Arrow Utility: Sage PropImport

PropImport is a tool that I wrote for my personal use, and thought it might be handy for others. It's just a command line app that will take the contents of one properties file and import them into another. It's useful for re-setting custom properties that you've saved to a separate file.

For example, you could manually create a text file called MyCustom.properties, then copy any custom settings lines from your Sage.properties file into it for safe keeping.

At that point, all you have to do to restore those settings is use PropImport. It will replace existing lines with your saved values, and add any lines that don't exist.

The command line syntax is:

/quiet Supress completion message
/d:destination file
/s:source file

Download Sage PropImport

Last edited by TBacker; 06-14-2009 at 11:03 AM.
Reply With Quote
  #2  
Old 06-14-2009, 10:33 AM
TBacker's Avatar
TBacker TBacker is offline
Sage Advanced User
 
Join Date: Nov 2006
Location: North Syracuse, NY
Posts: 124

1.0.1 Update


1.0.1 Uploaded June 14, 2009
  • FIXED - Missing /S: or /D: caused an error & crash
  • ADDED - A message box will pop up upon successful import. Use /Q or /QUIET to supress.
  • ADDED - More informative syntax error messages to aid in seeing mistakes.

The command line syntax is:
/quiet Supress completion message
/d:destination file
/s:source file
Reply With Quote
  #3  
Old 06-14-2009, 11:06 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
TBacker,

I seem to be getting the completion prompt. see my batch below.


PropImport.exe /quiet /d:C:\Program Files\SageTV\SageTV\SageClient.properties /s:S:\SageTVInstall\Sage Propimport\SageClient.properties

PropImport.exe /quiet /d:C:\Program Files\SageTV\SageTV\Sage.properties /s:S:\SageTVInstall\Sage Propimport\Sage.properties
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #4  
Old 06-14-2009, 11:26 AM
TBacker's Avatar
TBacker TBacker is offline
Sage Advanced User
 
Join Date: Nov 2006
Location: North Syracuse, NY
Posts: 124

1.0.2 Update


1.0.2 Uploaded June 14, 2009
  • FIXED - Inverted /quiet toggle issue

Sorry bout that
Reply With Quote
  #5  
Old 06-14-2009, 09:31 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
That did it thanks.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #6  
Old 06-15-2009, 09:52 AM
rmac321 rmac321 is offline
Sage Advanced User
 
Join Date: Dec 2008
Posts: 194
multiple files

TBacker,

What are the chances you could make this do multiple files using a wildcard?

FI, several of us have just discovered we need to add a new Metadata field (MediaTitle=) to our imported TV shows. This tool would be perfect if we could do them in a batch fashion.

I created a new file called newbonesprops.properties which contains the new field:

Code:
MediaTitle=Bones
This worked great to update a single file, but it won't do multiples. If I do the following:

Code:
propimport /d:\\Server\videos\TV\Bones\Season 4\*.properties /s:newbonesprops.properties
I get the error: Unable to open destination file
__________________
SageTV v9.1.10.479 on Ubuntu
(testing v9.1.10.479 on Debian and Win10)
Reply With Quote
  #7  
Old 06-15-2009, 09:59 AM
TBacker's Avatar
TBacker TBacker is offline
Sage Advanced User
 
Join Date: Nov 2006
Location: North Syracuse, NY
Posts: 124
I think this is doable - it may be a while. I've got a full plate with work right now.

I was thinking about a GUI version of this too, but that defeats the purpose of scripting it to run in the background.
Reply With Quote
  #8  
Old 06-15-2009, 10:13 AM
rmac321 rmac321 is offline
Sage Advanced User
 
Join Date: Dec 2008
Posts: 194
Quote:
Originally Posted by TBacker View Post
I think this is doable - it may be a while. I've got a full plate with work right now.

I was thinking about a GUI version of this too, but that defeats the purpose of scripting it to run in the background.
Cool, Thanks!

Another switch that would be cool would be the ability to leave the properties in their current order and append the new field to the end, to the beginning, or even possibly to a specific line. I have no idea how hard that would be to implement. Most of the time I prefer the alphabetical listing like yours does anyway, but for my tv show properties I have gotten used to the order that EP has MediaScraper output them. I'll have to take a look at what BMT order is since it looks like we will all may be switching to that now anyway.

Another possibility would be to also integrate a switch such as /t:<filename> that would touch the associated media files at the same time that the new properties files are made so that on a rescan of imports, the changed properties files will be picked up. Again, I haven't a clue how hard this would be to implement.

Thanks again!
__________________
SageTV v9.1.10.479 on Ubuntu
(testing v9.1.10.479 on Debian and Win10)
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Utility: SageExtCtrl (Sage Extender Power Control) shadeblue.com SageTV Customizations 29 04-07-2011 09:08 AM
Utility: Sage Scripting Framework stuckless SageTV Customizations 6 01-19-2009 01:00 PM
Utility: BTV XML to Sage XML converter nielm SageTV Customizations 4 01-06-2008 04:00 PM
Feature Request: "Copy file" for Sage Conversion utility pawn SageTV Software 5 07-10-2007 05:36 PM
Utility to kill Sage ldavis SageTV Software 5 08-17-2004 03:05 AM


All times are GMT -6. The time now is 01:04 PM.


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