Transfer the Indigo Substrate list to SQL-Database
Transfer the Indigo Substrate list to SQL-Database
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?
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?
Between jobs!
Re: Transfer the Indigo Substrate list to SQL-Database
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.
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
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..
I'm om mac, Notepad++ don't exist.. Text wrangler don't do that search. Need to find other program then..
Between jobs!
Re: Transfer the Indigo Substrate list to SQL-Database
Ouch man, you hurt my feelings.
Especially for you, I created this XSL transform
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
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
You're welcome
Re: Transfer the Indigo Substrate list to SQL-Database
We don't change the substrate-list that often..sander wrote:Now find the command line to export the list, and let Switch update it on a nightly base
Between jobs!
Re: Transfer the Indigo Substrate list to SQL-Database
We neither, but it sounds fun
Re: Transfer the Indigo Substrate list to SQL-Database
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!
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore
Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
Free Switch apps: open-automation @ Enfocus appstore
Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
Re: Transfer the Indigo Substrate list to SQL-Database
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.
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
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.
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
Thanks 'cstevens'!
I'v got some different xml-files.
I don't really knew what I'm doing, but the;
How can I change 'sanders' XSL transform to pickup this string instead? hum?
I'v got some different xml-files.
I don't really knew what I'm doing, but the;
- JMF URL: "http://hpro1-sm1:8080/prodflow/jmf/hpi7500"
And JMF Query Type: "KnownDevice" and "Full"
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
Last edited by lombert on Wed Sep 07, 2016 10:13 am, edited 1 time in total.
Between jobs!
Re: Transfer the Indigo Substrate list to SQL-Database
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
You got mailsander wrote:I'm lazy, can you post that xml? I'll take a look if you want. Chad's sleeping now
Between jobs!