Page 1 of 2
					
				Transfer the Indigo Substrate list to SQL-Database
				Posted: Tue Sep 06, 2016 12:46 pm
				by lombert
				In the Indigo you can export the substrate-list as a xml. I want that list in a mySql-database so I can from Switch Client chose the 'correct-substrate' as it's named in the Indigo. And use the list as an Translation from the "real paper name".
It looks like this;
<Substrates>
       <SubstrateDefinitions>
               <SubstrateDefinition>
                      @name = "SubstrateName"
               <SubstrateDefinition>
                      @name = "SubstrateName"
               <SubstrateDefinition>
                      @name = "SubstrateName"
I guess some sort of script can do this. An XSLT-transform may to. Or can I pick the list direct from the Indigo?
Anyone done this?
			 
			
					
				Re: Transfer the Indigo Substrate list to SQL-Database
				Posted: Tue Sep 06, 2016 1:04 pm
				by sander
				I use Notepad++ to do the magic;
CTRL + F
Tab: mark
Find what: <SubstrateDefinition name="
Tick: mark line
Search » Bookmark » Copy Bookmarked lines
Paste in new document.
CTRL + H
Replace "<SubstrateDefinition name=" with nothing
Replace "> with nothing
This leaves only the substrates 

Sort with A-Z or whatever, and copy into Switch Client.
 
			 
			
					
				Re: Transfer the Indigo Substrate list to SQL-Database
				Posted: Tue Sep 06, 2016 1:28 pm
				by lombert
				You do it easy way, not fun! 
I'm om mac, Notepad++ don't exist.. Text wrangler don't do that search. Need to find other program then.. 

 
			 
			
					
				Re: Transfer the Indigo Substrate list to SQL-Database
				Posted: Tue Sep 06, 2016 1:40 pm
				by sander
				Ouch man, you hurt my feelings.
Especially for you, I created this XSL transform 
 
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="//SubstrateDefinition">
<xsl:value-of select="@name[position()]"/><xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
 
			 
			
					
				Re: Transfer the Indigo Substrate list to SQL-Database
				Posted: Tue Sep 06, 2016 1:41 pm
				by sander
				Now find the command line to export the list, and let Switch update it on a nightly base 

 
			 
			
					
				Re: Transfer the Indigo Substrate list to SQL-Database
				Posted: Tue Sep 06, 2016 1:52 pm
				by lombert
				Big thanks Sander! 

 
			 
			
					
				Re: Transfer the Indigo Substrate list to SQL-Database
				Posted: Tue Sep 06, 2016 1:54 pm
				by sander
				You're welcome 

 
			 
			
					
				Re: Transfer the Indigo Substrate list to SQL-Database
				Posted: Tue Sep 06, 2016 1:57 pm
				by lombert
				sander wrote:Now find the command line to export the list, and let Switch update it on a nightly base 

 
We don't change the substrate-list that often.. 

 
			 
			
					
				Re: Transfer the Indigo Substrate list to SQL-Database
				Posted: Tue Sep 06, 2016 2:25 pm
				by sander
				We neither, but it sounds fun 

 
			 
			
					
				Re: Transfer the Indigo Substrate list to SQL-Database
				Posted: Tue Sep 06, 2016 4:30 pm
				by gabrielp
				Man, whoever is setting up your substrate IDs is doing a beautiful job. Ours are super inconsistent, so we have to translate them from a human-readable substrate name to the correct press ID. Dwight's CSVLookup is really nice for this!
			 
			
					
				Re: Transfer the Indigo Substrate list to SQL-Database
				Posted: Tue Sep 06, 2016 5:12 pm
				by sander
				Hm, we also have such a nice list. I just gave operators 2 or 3 rules and once in a while I look at it to correct some things.
Much easier in my opinion, and with 2 DFE's which are going to sync via PrintOS it needs to be 100% good looking.
			 
			
					
				Re: Transfer the Indigo Substrate list to SQL-Database
				Posted: Tue Sep 06, 2016 6:05 pm
				by cstevens
				A more automated method to handle this would be through JMF queries.  On the HP Production Pro product page I uploaded a simple flow that sends various JMF queries and captures the response as metadata using the XML Pickup element.   You can find it here under the title "
Send JMF Query and capture response as Metadata"
https://www.enfocus.com/en/products/swi ... int-server
You can capture the substrate list of an individual press using a Resource query to the Press Device's URL:
where "PressDeviceID" is replaced with the network location value of the press, and the IP address at the beginning of the URL is replaced with your Production Pro System Manager's IP or hostname.
You can also capture the list of all substrates by sending a KnownDevices query (with DeviceDetails set to Full) to the Production Pro's JMF URL:
Again with the IP address at the beginning of the URL replaced with the IP/Hostname of your Production Pro's System Manager server.
You would probably want to set the Timer interval to a much higher interval than every 2 minutes (120 seconds) however.
 
			 
			
					
				Re: Transfer the Indigo Substrate list to SQL-Database
				Posted: Wed Sep 07, 2016 9:57 am
				by lombert
				Thanks 'cstevens'!
I'v got some different xml-files. 

I don't really knew what I'm doing, but the; 
gives me a xml there I can find this string there I can find my media;
Code: Select all
/dn:JMF/dn:Response/dn:DeviceList/dn:DeviceInfo/dn:Device[1]/dn:DeviceCap/dn:DevCaps[5]/dn:DevCap/dn:StringState[1]/dn:Value[1]/@AllowedValue
How can I change 'sanders' XSL transform to pickup this string instead? hum? 

 
			 
			
					
				Re: Transfer the Indigo Substrate list to SQL-Database
				Posted: Wed Sep 07, 2016 10:12 am
				by sander
				I'm lazy, can you post that xml? I'll take a look if you want. Chad's sleeping now 

 
			 
			
					
				Re: Transfer the Indigo Substrate list to SQL-Database
				Posted: Wed Sep 07, 2016 10:14 am
				by lombert
				sander wrote:I'm lazy, can you post that xml? I'll take a look if you want. Chad's sleeping now 

 

 You got mail