B4Print.com

Imposition Software => Kodak Preps => Topic started by: DCurry on February 07, 2019, 11:43:33 AM

Title: Using text editor to change color bar on many templates
Post by: DCurry on February 07, 2019, 11:43:33 AM
Has anyone ever used a text editor to open up Preps templates and modify the marks?

Currently using Preps 8 and discovered recently that we've been using the wrong color bar for the past year and a half, so now we need to change it on all our templates. Because of the overall suckitude of any version after 5, modifying templates with lots of sigs within is now a major PITA so I'm looking to streamline it somewhat.

I tried it out on a job recently and it seems to have worked well, but just wondering if there is a caveat somewhere I'm not seeing? (Joe, I know you've done this before!)
Title: Re: Using text editor to change color bar on many templates
Post by: Joe on February 07, 2019, 01:14:48 PM
Yeah I use either the deprecated TextWrangler or the free version of BBEdit. You can do a search and replace on all files in a folder. The secret is to place about 5 copies of a few templates and test it to make sure before you do it on your whole inventory of templates. Unless of course you like living on the edge. No secret caveat that I know of. Just make sure what you are searching for is correct and replace with something is correct.
Title: Re: Using text editor to change color bar on many templates
Post by: scottrsimons on February 07, 2019, 01:49:17 PM
I vaguely remember doing the same sorta thing using BBEdit to a whole folder of templates. Search and Replace within the folder, per Kodak instructions. But I wish I could remember exactly how. If I'm pressed, I could probably find it.
Title: Re: Using text editor to change color bar on many templates
Post by: Mikie on February 07, 2019, 02:07:09 PM
Could you guys elaborate on this a little more? Like how it works etc. I too recently found out we have the wrong color bars and would love an easy way to fix the templates. 
Title: Re: Using text editor to change color bar on many templates
Post by: Joe on February 07, 2019, 04:10:27 PM
Using BBEdit under the search menu click "Multi-file Search..."

[attach width=400]19401[/attach]

Fill in your search and replace text in the boxes with the red arrow.

Then click the "Other" button and navigate to and select the folder where your template files are at.

[attach width=400]19403[/attach]

Then click "Replace All".

Just make sure you are using a copy of your templates so if something goes wrong you still have the originals.
Title: Re: Using text editor to change color bar on many templates
Post by: DCurry on February 08, 2019, 08:54:22 AM
Mikie - once you force your template open in a text editor, you'll see a bunch of lines of code that basically just describe everything in the template. You have to do as Joe says and find what you want to replace. In my case, the code for my old color bar looks like this:

Quote%SSiSmartMarkStart: 3 9 -1
name: |XL75_ColorBar_6Si_2019|
text: |F074_6S___740x10v12.0f.eps|
dupflags: 291
sigstart: 1
sigmod: 1
colortype: 0
color1: 100
color2: 100
color3: 100
color4: 100
rotation: 0
smartoffsetx: 36.00000
smartoffsety: -13.50000
refentity: 2
refanchor: 1
markanchor: 1
section: 0
width: 0.00000
height: 28.34700
origingroup: ||
calibratedupmark: true
smartoffsetb: -36.00000 14.84700
refentityb: 2
refanchorb: 3
%SSiSmartMarkEnd:

So, I replace all those lines with code describing my new color bar. To get that code, you can either open your desired SmartMark in the text editor and just copy all of it, or what I did was place the correct bar on a template, then open that new template and find the good code and copy it.

It's important to include first and last lines to denote the start and end of that smart mark. Otherwise it won't work. Also note that if your template has multiple signatures within, you'll likely have to find/replace the mark multiple times (once for each form.)

My plan is to do several at a time, and then open each one and verify that I didn't screw anything up before moving on to the next batch.

Joe - thanks for confirming that this is not a crazy idea!
Title: Re: Using text editor to change color bar on many templates
Post by: Joe on February 08, 2019, 09:05:30 AM
Beats the hell out opening hundreds or even thousands of templates one at a time! Pretty sure ours are in the thousands by now.
Title: Re: Using text editor to change color bar on many templates
Post by: Mikie on February 08, 2019, 10:11:03 AM
Got it. My issue here is we write out pjtf and .ps files for prinergy and thats what we import into each job with place holders. This is good info to know tho, so thanks guys :)
Title: Re: Using text editor to change color bar on many templates
Post by: Mikie on February 08, 2019, 10:14:36 AM
Oh and...check out number of items



Title: Re: Using text editor to change color bar on many templates
Post by: Joe on February 08, 2019, 10:16:59 AM
I don't think we have that many. I'll have to check.
Title: Re: Using text editor to change color bar on many templates
Post by: Joe on February 08, 2019, 10:18:59 AM
Quote from: Mikie on February 08, 2019, 10:11:03 AMGot it. My issue here is we write out pjtf and .ps files for prinergy and thats what we import into each job with place holders. This is good info to know tho, so thanks guys :)

I think .ps and .pjtf files are just text files aren't they. So you could do it with those too I think.
Title: Re: Using text editor to change color bar on many templates
Post by: DCurry on February 08, 2019, 11:21:10 AM
Mikie - I'm not trying to re-invent your workflow or anything, but I'm curious why you wouldn't just use Prinergy's "Create New Imposition" which opens up a dialog box based on Preps where you can pick your template? Saves you from having to touch Preps at all unless you need to modify a template or make a new one.
Title: Re: Using text editor to change color bar on many templates
Post by: Mikie on February 08, 2019, 11:48:53 AM
Good question, and my answer is based on how things worked when i got here. I am currently looking for a way to impose jobs right before plating but haven't had any luck out of preps. We are plating over 100 jobs a day easily so it's a bit of a mess. Any chance you could walk me through how your method works? It sounds interesting to me.

90% of our jobs are automated. Data is entered into a web app, and an xml file is exported. I run indesign scripts to build the art, pass the Indd and pdf and xml off to prinergy which creates a new job based on a prejob(which contains the imposition files). We do flat work here so they are basic impositions, but we have a lot of varying sizes and possible presses we can send to.
Title: Re: Using text editor to change color bar on many templates
Post by: Mikie on February 08, 2019, 11:57:44 AM
Quote from: Joe on February 08, 2019, 10:16:59 AMI don't think we have that many. I'll have to check.

hmmm, indeed they are and I just found the color bar info in the .ps file.

man i love you guys lol
Title: Re: Using text editor to change color bar on many templates
Post by: Joe on February 08, 2019, 12:27:17 PM
Quote from: Mikie on February 08, 2019, 10:14:36 AMOh and...check out number of items

I guess we are wimps here. Only 5,634. And some of those are just folders :D
Title: Re: Using text editor to change color bar on many templates
Post by: scottrsimons on February 11, 2019, 09:20:05 AM
Just found my notes, and they were for changing the names of the color bars in our templates, using BBEdit, with the Multi-File search like Joe said. Worked like a charm. But it was only on the Preps Template files, and not on the .ps or .pjtf files.
Title: Re: Using text editor to change color bar on many templates
Post by: DCurry on February 11, 2019, 09:28:02 AM
I don't think this is going to work as well as I hoped - the code of the bar I want to replace is inconsistent from sig to sig so I can't do a Find All and Replace. Had one Friday with about 20 sigs in the template and found it was easier and faster to just do it the old way in Preps.
Title: Re: Using text editor to change color bar on many templates
Post by: Joe on February 11, 2019, 10:03:28 AM
If I remember correctly in older versions of Preps, 5 and 6 I think, it didn't contain all of that smart mark info. I think back then it only had the name of the smart mark. I guess that was a new feature at some point.
Title: Re: Using text editor to change color bar on many templates
Post by: Mikie on February 11, 2019, 02:26:18 PM
Just wanted to say thanks guys. I have been playing with this and it is going to work using the create imposition option Mr. Curry pointed out to me. Because of our workflow it is going to be faster to just reimposed everything at the plate setter rather than trying to track down the thousands of jobs I already had .pjtf and .ps files in.

One thing I am doing slightly different is instead of changing the template file using a text editor, I am just replacing the old color bar with the new one, but using the old color bar name. I know some templates are gonna break, but the majority should go fine. So in prinergy when i create imposition, and select an existing template file, it uses the new color bar :). I did test renaming the color bar in the template as text, and it did indeed work. But didn't solve my other issue.

So THANKS!!! You guys saved me a lot of time.
Title: Re: Using text editor to change color bar on many templates
Post by: born2print on February 11, 2019, 02:32:47 PM
Quote from: Mikie on February 11, 2019, 02:26:18 PMI am just replacing the old color bar with the new one, but using the old color bar name.
Brilliant!
Title: Re: Using text editor to change color bar on many templates
Post by: Mikie on February 11, 2019, 03:30:20 PM
Quote from: born2print on February 11, 2019, 02:32:47 PM
Quote from: Mikie on February 11, 2019, 02:26:18 PMI am just replacing the old color bar with the new one, but using the old color bar name.
Brilliant!

Or as others have pointed out in my career, "hacky as shit" lol
Title: Re: Using text editor to change color bar on many templates
Post by: Joe on February 11, 2019, 03:56:33 PM
Quote from: Mikie on February 11, 2019, 02:26:18 PMJust wanted to say thanks guys. I have been playing with this and it is going to work using the create imposition option Mr. Curry pointed out to me. Because of our workflow it is going to be faster to just reimposed everything at the plate setter rather than trying to track down the thousands of jobs I already had .pjtf and .ps files in.

One thing I am doing slightly different is instead of changing the template file using a text editor, I am just replacing the old color bar with the new one, but using the old color bar name. I know some templates are gonna break, but the majority should go fine. So in prinergy when i create imposition, and select an existing template file, it uses the new color bar :). I did test renaming the color bar in the template as text, and it did indeed work. But didn't solve my other issue.

So THANKS!!! You guys saved me a lot of time.

Yeah we use the built in create imposition tool as well. Only go into Preps if we have to create/modify a template.
Title: Re: Using text editor to change color bar on many templates
Post by: born2print on February 11, 2019, 04:05:43 PM
Quote from: Mikie on February 11, 2019, 03:30:20 PM
Quote from: born2print on February 11, 2019, 02:32:47 PM
Quote from: Mikie on February 11, 2019, 02:26:18 PMI am just replacing the old color bar with the new one, but using the old color bar name.
Brilliant!

Or as others have pointed out in my career, "hacky as shit" lol
:shrug: I am results oriented I guess.
Title: Re: Using text editor to change color bar on many templates
Post by: whamboozeled on February 19, 2019, 08:50:26 AM
Quote from: DCurry on February 07, 2019, 11:43:33 AMBecause of the overall suckitude of any version after 5,


I just started using preps 8 from 5 and This is my feeling exactly.
Title: Re: Using text editor to change color bar on many templates
Post by: Tracy on February 19, 2019, 11:55:47 AM
whamboozeled :laugh:  cool!
Title: Re: Using text editor to change color bar on many templates
Post by: DigiCorn on February 19, 2019, 12:29:14 PM
Haven't had to use it in over 2+ years, but version 5 was okay... I liked 6 because you could see in real time what was going on, without having to create previews, and once you figured out all the counter-intuitive shit, and reprogrammed one of the preference files, it was an improvement. 7 though, was as buggy as day-old-shit on a major city's dumpsite.