Eric Nelson Posted December 30, 2017 Posted December 30, 2017 Occasionally I need to create a bunch of video titles with filenames and content from a CSV file. Several years ago I wrote a java script to do this in Photoshop. With the Photoshop template loaded, it prompts for the CSV file and, for each parsed line of the file, drops content into text layers and saves each new video title as a PSD file with a sequence number. Later those files will be imported into FCPX as a batch, making it a very efficient workflow. If something changes I tweak the CSV file and regenerate the batch. Is there the equivalent capability in either Photo or Designer? Is there a better way to do it? Thanks for insight… Uuiop 1 Quote
Staff stokerg Posted January 3, 2018 Staff Posted January 3, 2018 Hi Eric and Welcome to the Forums, We don't have scripting in Designer at the moment. There have been a number of requests for it and may be something the Dev team add at a much later date. Photo has the ability to batch process files but no ability to read the CSV file to generate the filenames and Photo's batch function also can't re-save to PSD. I can't think of another way to get the same results as the old workflow you used but i'm sure if someone else see this post and knows of a way, they will reply Quote
v_kyr Posted January 3, 2018 Posted January 3, 2018 Well the overall problem with AD is that it doesn't offer any programming (scripting, plugins, macros etc.) hooked in facilities here. And even AP seems to have only limited macro facilities here, which seem not to can deal with creating text layers at all, or let alone read in text somehow from external sources. - So there actually aren't such automation capabilities possible with just the Affinity products. What can be generally instead done is, to not rely on Affinity products or PS at all here for filling up a template file and thus build some other video title template in another easy to manipulate (read/write/parse) output format. Let's say build-up some SVG or EPS video title template file with placeholders for the corresponding entries from your CSV file entries, like for example ... ... <svg height="90" width="200"> <text x="10" y="20" style="fill:red;">#title <tspan x="10" y="45">#line1</tspan> <tspan x="10" y="70">#line2</tspan> ... </text> </svg> ... ... and then replace those placeholders (#title, #line1, #line2 ...) with the parsed in values from each of your CVS contents lines. - This way you would then have as result a bunch of SVG (or EPS if you prefer that format) files which you can convert into PDFs or some other appropriate format, dependent on what FCPX can import here. The above roughly sketched procedure for generating video title files from a vector described template file can be done in any scripting or programming language. And the step of conversion from one format into another (like SVG to PDF or whatever) can be easily done with tools like ImageMagick or even with graphical frontends like XNView, IrfanView, GraphicConverter etc. BTW a SVG or EPS template file can also be initially created or setup via AD/AP here and later when filled out the results also reopened in those for further fine tuning! Eric Nelson 1 Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2
Eric Nelson Posted January 6, 2018 Author Posted January 6, 2018 Thanks @v_kyr this is a brilliant! I've never looked inside an SVG file before to know just how easy it is to edit them. I can probably do the whole batch with a one-line unix command… cat foo.csv | while IFS=',' read a b c; do sed -e... -e... template.svg >${a}.svg; done Quote
v_kyr Posted January 6, 2018 Posted January 6, 2018 Yes you can easily with the common Unix cmd or scripting tools (like awk, sed, perl, python etc.), though you best make a shell script then out of your one liner calls. The overall beauty of vector formats like SVG or EPS is, that it's just declaritive and interpreted text, which therefor is easy to read/write/parse/generate/modify. Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.