Jump to content
You must now use your email address to sign in [click for more info] ×

Recommended Posts

4 hours ago, Jon W said:

Thanks everyone for all your suggestions - please keep them coming!

I would be afraid of piling on to an already quite long thread, but since you asked! …

My first thought would be the ability to automate tedious series of find and replace. Presently, I use the automation tool Keyboard Maestro (which, by the way, I learned about a few years ago after seeing it mentioned by others on this forum) to run through a few tasks for me on a regular basis:

  1. A set of 15 typographical replacements that are used for most of our publications. I have Keyboard Maestro offer me the choice of which replacements to make on a given run:

    Screenshot2023-06-07at11_13_20AM.png.464787b5703b5748d3bcd8484fb377ab.png

    Keyboard Maestro then operates Publisher to apply a set of find and replace strings (mostly regex) that I have configured.
     
  2. I have Keyboard Maestro export to PDF our various publications in the formats that they require with the final print files. Different kinds of publications require different settings, and in most cases we export for both a PDF intended for web and a print-ready file imposed for our own equipment. Some of these documents can have PDFs made directly from the Publisher file, while some need to be imposed in a different way. In the latter case, I have Publisher templates prepared wherein I can (or Keyboard Maestro) place the original document to create a ready-made imposed form. In other cases, such as booklets, I export the PDF pages from Publisher and then process the files further in Create Booklet 2. I have configured Keyboard Maestro to automate all of that process, so that I pick a Publisher file and select one of my preconfigured formats, and then I let go of the controls and let Keyboard Maestro operate the computer for me until I have PDF files properly named and saved in their proper locations.

Those are two typical examples. I am glad for Keyboard Maestro, but sometimes you have to get creative to think about how to get it to operate a user interface designed for humans. Things like menu items are foolproof, but things requiring clicks and visual interpreting a UI are trickier, and the setup can be very precarious and easily broken.

The ability to add scripting in Affinity could really help in these cases, if I understand correctly. As for the Find/Replace routine, it might be possible that I could do it entirely in a script, although I do not know whether there will be (and here is perhaps my first actual suggestion) an interface for the script to pause to get user input, such as for configuration of parameters, like in my screenshot above. But even if not, I can have each find/replace pair to be saved as a script that Keyboard Maestro would be able to access far easier via menu item versus trying to operate the FaR Studio that was designed for a human.

I don’t know whether you currently have in mind for scripting only to be from within Affinity, or whether there will be an API that 3rd-party apps could access. I know I have seen some requests about that. For me, scripting within Publisher will be great already, and access outside of the app would be even better.

A couple other ideas that scripting might be useful for in my needs:

  1. I would like to make more efficient the process of taking text from a Publisher document to be put online in WordPress. I can imagine I might be able to make a script that could copy a text thread as raw text but with markup, where I might have carefully matched up text styles with HTML markup: for example, the text of a paragraph with the paragraph style named “Subheading” might be wrapped in <h2> tags in the final copied text. And then I could just paste the resulting text into the HTML editor in WordPress, rather than manually going through and reapply the various formatting elements that didn’t come automatically in the current method. And if the script can pause for user input, I can pair styles at runtime rather than carefully set up my style names.
  2. Antidote integration, which a few of us have been interested in, might well be possible through this. It is a grammar checker (among other French and English language resources), and really its integration needs are pretty simple: it just needs to be able to receive text and send it back with edits. The trick will be to do so with formatting intact.

Once the feature is available, I’m sure more ideas will start popping up of how I could make life easier in various aspects of using Publisher. I am very excited about it.

Link to comment
Share on other sites

3 hours ago, garrettm30 said:

My first thought would be the ability to automate tedious series of find and replace.

Scripting find/replace would be good but an additional feature request should be the ability to save find/replace searches. InDesign does this and allows you to maintain an extensive list of frequently used changes. Being able to script it would also be good.

Link to comment
Share on other sites

3 hours ago, garrettm30 said:

I would like to make more efficient the process of taking text from a Publisher document to be put online in WordPress

I see this as a bit trickier and probably in the realm of a Wordpress plugin. There are already a couple of InDesign to Wordpress Plugins so it might be worth contacting the authors to enquire on the viability of writing a Publisher version.

It could potentially be done by scripting but would require considerable thought on how you address which page items you want to publish and a decent knowledge of JSON would be needed to handle the Wordpress side. It would not be a trivial undertaking but it could be done if the appropriate hooks were in the Publisher scripting model.

I wrote the editorial system at our company and one of the key features was the ability to publish directly to both Wordpress and Apple News. The editorial staff can publish to the web before a story has even been allocated to a page - totally eliminating InDesign from the equation. They write the story, add the standard meta data, allocate the images and then simply click "Export to Wordpress" and it magically arrives online complete with the correct category, publication, tags, feature pic, byline etc. It's truly beautiful to watch :)

Link to comment
Share on other sites

On 6/7/2023 at 7:03 PM, kimtorch said:

I see this as a bit trickier and probably in the realm of a Wordpress plugin. There are already a couple of InDesign to Wordpress Plugins so it might be worth contacting the authors to enquire on the viability of writing a Publisher version.

 

I hope I don’t sidetrack this thread, as it is supposed to relate to scripting. But just to answer you, I am in fact a WordPress developer for our organization; I could make a plugin for this if it were needed, but in this case it is not the WordPress side but the original source text that I would need. I can easily get the text by copying, but the text loses a lot once it leaves Publisher. Most of the formatting I would not need, but I would need what effectively amounts to semantic markup. This could be accomplished on Publisher’s side, since within Publisher the text still has text style information that I can map to markup.

Note I am not really asking for Serif to implement anything regarding this example. I am simply responding to the request for ideas about how we might use scripting.

Link to comment
Share on other sites

3 hours ago, garrettm30 said:

I am in fact a WordPress developer for our organization; I could make a plugin for this if it were needed, but in this case it is not the WordPress side but the original source text that I would need.

That's cool, maybe once we get to see the scripting model there might be an opportunity for you to write a Plugin for general use.

When we move data from our editorial system to InDesign, text and graphic frames are created by scripts. We label every frame with a script label which specifically includes the story ID and what type of component it is (Heading, Sub Head, intro, body, captions etc). Formatting is done with tags so a journalist can update the story in the editorial system and our related import app (a front end to a variety of scripts which talk to MySQL) can update stories in situ.

This is why I believe script labels (or some sort of tag) for page items is critical. Scripts need to be able to address items by name and I believe this would be similar in your case where you're looking for various text blocks to move to Wordpress.

Link to comment
Share on other sites

4 hours ago, DiegoBM said:

or pre-released like in beta format

You can join the beta program: https://affinity.serif.com/en-us/affinity-beta-program/

Note that occasionally something will show up in a beta then be pulled out before the release if Serif feels it was not actually ready, but if something is going to show up in a release, it will almost always show up first in the beta.

Link to comment
Share on other sites

12 hours ago, kimtorch said:

When we move data from our editorial system to InDesign, text and graphic frames are created by scripts. ...

Scripting was and still is essential in the DTP world too. - What you descripe reminds me partly to what I've recently read about the former times and nowadays ways of creating a popular german IT-magazine, where they also tend(ed) to use a bunch of custom scripting for their specific workflows.

For those interested in a read of those article, how it was in former times ...

... versus nowadays ...

☛ 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

Link to comment
Share on other sites

4 hours ago, DiegoBM said:

Is there any way to subscribe to when features are released (or pre-released like in beta format) and get notified via email for example?

 

You can subscribe to (Follow) this topic for notification of new releases: 

 

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 17.7, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.7

Link to comment
Share on other sites

On 6/8/2023 at 1:54 AM, kimtorch said:

Scripting find/replace would be good but an additional feature request should be the ability to save find/replace searches. InDesign does this and allows you to maintain an extensive list of frequently used changes. Being able to script it would also be good.

And Mellel, a word processor, even support GREP sets so you can execute multiple tasks with one click.

All the latest releases of Designer, Photo and Publisher (retail and beta) on MacOS and Windows.
15” Dell Inspiron 7559 i7 Windows 10 x64 Pro Intel Core i7-6700HQ (3.50 GHz, 6M) 16 GB Dual Channel DDR3L 1600 MHz (8GBx2) NVIDIA GeForce GTX 960M 4 GB GDDR5 500 GB SSD + 1 TB HDD UHD (3840 x 2160) Truelife LED - Backlit Touch Display
32” LG 32UN650-W display 3840 x 2160 UHD, IPS, HDR10 Color Gamut: DCI-P3 95%, Color Calibrated 2 x HDMI, 1 x DisplayPort
13.3” MacBook Pro (2017) Ventura 13.6 Intel Core i7 (3.50 GHz Dual Core) 16 GB 2133 MHz LPDDR3 Intel Iris Plus Graphics 650 1536 MB 500 GB SSD Retina Display (3360 x 2100)

Link to comment
Share on other sites

  • 2 weeks later...
On 3/24/2023 at 8:05 AM, Tim France said:

Hi folks,

I thought I'd give you a quick progress update and let you see some of things we've been working on at Serif Labs.  We now have a scripting core that we're reasonably happy with and have put together a little test area where we can run Javascript code, so I thought I'd show you some of that. Things to note:

  1. This is all VERY early, like pre-pre-pre-alpha.
  2. The JS API is extremely fluid and is constantly changing.
  3. This is not how the Affinity suite will run scripts and plugins; it is just a sandbox window for internal testing.
  4. There is still a huge amount of work to be done. I can't provide any timescales for when scripting will be publicly released, for Beta or Retail.
  5. Constructive feedback is welcomed, but I won't be able to answer all questions - see previous points.
  6. I'm not claiming any of these examples are particularly useful on their own; they're just to demonstrate some basic scripting functionality.
  7. Re Javascript async - yes, we support it, I've just not recorded anything yet. The sleep calls are there for screen-recording purposes only.

Here are some demos as low-res gifs. If you want to take a closer look, movs are attached.

Create a Mandelbrot image

image.gif

Some dodgy physics

image.gif

Insert a dragon curve

image.gif

"Emojification" (translation?) of text

image.gif

Create a grid of colours

 image.gif

Select and hide based on hue

image.gif

Replay a document's edit history

image.gif

mandelbrot.mov 13.35 MB · 41 downloads

balls.mov 6.73 MB · 21 downloads

dragon.mov 3.34 MB · 18 downloads

grid.mov 5.37 MB · 22 downloads

hue.mov 2.1 MB · 22 downloads

replay.mov 9.03 MB · 22 downloads

emoji.mov 2.64 MB · 21 downloads

This is GREAT NEWS !!

Please, please, please ....

Link to comment
Share on other sites

  • 2 weeks later...

As there is no sign of a text editor for editing long form text linked boxes, hopefully scripting support will be added soon so we can develop our own.

Indesign had a story editor, heck even Scribus has a story editor, but Publisher, nope!

Main Computer: iMac 2019 5K retina

Laptop: 2015 Macbook Pro Retina - i7, 16GB, 2TB SSD

Server: Mac Mini 2012 - i5, 16GB, 2TB SSD

Workshop: M1 Mac Mini

Software:  Affinity Suite (ver. 2), Office 365, Fusion360, OnShape, Carbide Create, Cura, Inkscape
 

Link to comment
Share on other sites

3 minutes ago, cyberlizard said:

As there is no sign of a text editor for editing long form text linked boxes, hopefully scripting support will be added soon so we can develop our own.

Indesign had a story editor, heck even Scribus has a story editor, but Publisher, nope!

Oh, I so miss having a story editor in Publisher. I keep holding back moving content from .rtf/.docx into Publisher until it's absolutely necessary (which causes other issues) so that I can continue to edit content in a sane manner (and have access to proofing tools such as Antidote[1]). It may seem like a small thing, but when you have dozens, or hundreds of flowing text pages, being able to just focus on the text (with tools designed to manipulate text) is such a godsend.

Also, being able to link text documents (in .rtf/.docx) and be able to update them via the Resource Manager would be a fantastic addition, and somewhat reduce the need for a built-in story editor (although it would still be nice to have one).

[1] InDesign and Illustrator both have Antidote support available. It would be massively helpful to many English and French users around the world if Antidote integration were possible within the Affinity apps.

Link to comment
Share on other sites

  • 4 weeks later...

I just want this to be possible in Designer: https://github.com/EsotericSoftware/spine-scripts/tree/master/photoshop

Creating new tools is all swell and good, but I just need a basic export pipeline for Spine 2D animation software, which is the industry standard for 2D animation in video games. The linked script saves literally hours of work and is the single biggest reason I'm still subbed to Adobe. Hopefully, the API will cover things like merging layers, parsing layer names then do operation X if the name contains some string, change exported layer name, add alpha padding to each exported image, trim alpha whitespace, set and read designer document ruler origin, read layer mode, scale layers before exporting and write relevant data to a JSON file, which Spine can then import and rebuild the exact layer order, layer position, layer mode and everything else that's relevant. This should be possible without manually defining export slices, ain't nobody got time for that. 

Link to comment
Share on other sites

15 hours ago, PanthenEye said:

I just want this to be possible in Designer: https://github.com/EsotericSoftware/spine-scripts/tree/master/photoshop

Creating new tools is all swell and good, but I just need a basic export pipeline for Spine 2D animation software, which is the industry standard for 2D animation in video games. The linked script saves literally hours of work and is the single biggest reason I'm still subbed to Adobe. Hopefully, the API will cover things like merging layers, parsing layer names then do operation X if the name contains some string, change exported layer name, add alpha padding to each exported image, trim alpha whitespace, set and read designer document ruler origin, read layer mode, scale layers before exporting and write relevant data to a JSON file, which Spine can then import and rebuild the exact layer order, layer position, layer mode and everything else that's relevant. This should be possible without manually defining export slices, ain't nobody got time for that. 

There is a "Spine JSON" choice in the Export Persona. I don't know if this helps you.

ScreenShot2023-08-02at7_31_42AM.png.67057ed0c7f654143b30d5ae18a56808.png

Mac Pro (Late 2013) Mac OS 12.7.6 
Affinity Designer 2.5.5 | Affinity Photo 2.5.5 | Affinity Publisher 2.5.5 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

1 hour ago, Old Bruce said:

There is a "Spine JSON" choice in the Export Persona. I don't know if this helps you.

ScreenShot2023-08-02at7_31_42AM.png.67057ed0c7f654143b30d5ae18a56808.png

 
 
 
 
 

It's very basic. Transfers single PNG images in  correct (EDIT: Actually, it's not correct order, perhaps something with Slice order?) layer order but doesn't retain the Layer blending mode such as Multiply. 

There's also no way of correctly positioning the art. I want rulers to define the origin: 

spacer.png

But no such functionality exists and art is offset in Spine since it's placed using the bottom left corner of the document:

spacer.png

I can, of course, move the art in Spine in place, but this introduces issues when updating art later via JSON import. And PhotoshopToSpine script can set a custom ruler origin before export.

For animation purposes, I need 1-2px alpha whitespace at a minimum, which the PhotoshopToSpine script adds to each individual image exported. In Designer I have to do this by hand manually with export slices. Too much manual work for complex projects, which can easily exceed several dozen slices for a single character. It just doesn't scale. 

And finally, the built in Spine exporter doesn't support any of the Spine specific features such as defining Skins, defining bones, placing multiple images under the same Spine slot, auto converting images to mesh, exporting into subfolders which spine will export as separate texture atlas, etc. All of this is very Spine specific, so it's not really Affinity's job to cover this. But API should be robust enough to handle all this and it should do so without manually defining export slices. Or if slicing can't be worked around, at least it should be able to automatically define slices per rules defined, such as auto slice only visible groups and add X px alpha white space to each slice. 

Link to comment
Share on other sites

12 minutes ago, PanthenEye said:

There's also no way of correctly positioning the art. I want rulers to define the origin: 

I haven't tested how this impacts that particular export format, but have you tried dragging from the corner of the rulers to the point you want to use as the origin?  That does at least adjust the origin point within the app itself...

Link to comment
Share on other sites

8 minutes ago, fde101 said:

I haven't tested how this impacts that particular export format, but have you tried dragging from the corner of the rulers to the point you want to use as the origin?  That does at least adjust the origin point within the app itself...

 
 
 

Yea, I did that. That's why 0,0 is right where rulers meet, but it does not import into Spine at 0,0.

Link to comment
Share on other sites

will it come in the 2.3 cycle?

New hardware

dell inspiron 3030 i5 14400/16GB DDR5/UHD 730 graphics

Acer KB202 27in 1080p monitor

Affinity Photo 1.10.6

Affinity photo 2 2.5.3 Affinity Designer 2 2.5.3 Affinity Publisher 2 2.5.3 on Windows 11 Pro version 24H2

Beta builds as they come out.

canon 80d| sigma 18-200mm F3.5-6.3 DC MACRO OS HSM | Tamron SP AF 28-75mm f/2.8 XR Di LD | Canon EF-S 10-18mm f/4.5-5.6 IS STM Autofocus APS-C Lens, Black

 

Link to comment
Share on other sites

8 hours ago, tzvi20 said:

will it come in the 2.3 cycle?

I don't think so. Maybe in 4.0 or 5.0 or even later.

All the latest releases of Designer, Photo and Publisher (retail and beta) on MacOS and Windows.
15” Dell Inspiron 7559 i7 Windows 10 x64 Pro Intel Core i7-6700HQ (3.50 GHz, 6M) 16 GB Dual Channel DDR3L 1600 MHz (8GBx2) NVIDIA GeForce GTX 960M 4 GB GDDR5 500 GB SSD + 1 TB HDD UHD (3840 x 2160) Truelife LED - Backlit Touch Display
32” LG 32UN650-W display 3840 x 2160 UHD, IPS, HDR10 Color Gamut: DCI-P3 95%, Color Calibrated 2 x HDMI, 1 x DisplayPort
13.3” MacBook Pro (2017) Ventura 13.6 Intel Core i7 (3.50 GHz Dual Core) 16 GB 2133 MHz LPDDR3 Intel Iris Plus Graphics 650 1536 MB 500 GB SSD Retina Display (3360 x 2100)

Link to comment
Share on other sites

The truth is it's not so clear how much progress was made since one of the developers made the announcement at the end of march over 4 months ago.

New hardware

dell inspiron 3030 i5 14400/16GB DDR5/UHD 730 graphics

Acer KB202 27in 1080p monitor

Affinity Photo 1.10.6

Affinity photo 2 2.5.3 Affinity Designer 2 2.5.3 Affinity Publisher 2 2.5.3 on Windows 11 Pro version 24H2

Beta builds as they come out.

canon 80d| sigma 18-200mm F3.5-6.3 DC MACRO OS HSM | Tamron SP AF 28-75mm f/2.8 XR Di LD | Canon EF-S 10-18mm f/4.5-5.6 IS STM Autofocus APS-C Lens, Black

 

Link to comment
Share on other sites

Good opportunity for you guys.

Adobe is in a weak spot right now, since they migrated from a built-in ExtendScript to VS Code plugin causing a lot of confusion in their community. It's probably one of the worst moments to get into their scripting environment right now. I don't know what they intend to do with it in the long run, but right now it's a mess.

 

My suggestions:

- Provide examples of API calls from different programming languages.

- Good documentation, self-documenting if possible, including listing parent/children functions, allowable types, working examples of usage. Minimize friction.

- Focus on good Data exchange, especially in DTP. Moving frame parameters back and forth into Publisher would be great - from keeping texts in version control or easily editable in Google Docs, to exporting numerical frame parameters to CSVs for fast manual edits, creating IDML templates, etc. Regarding IDML - check out the activity around https://github.com/Starou/SimpleIDML - they tend to attract people with particular usecases.

- Provide some means of code obfuscation, so people can create commercial plugins and sell them.

 

Are the scripting features available to betatesters?

 

 

Link to comment
Share on other sites

Not yet but hopefully soon. Tim france made the announcement that they are working on it but they were still early on we will have to wait and see if comes out in the upcoming 2.3 beta.

New hardware

dell inspiron 3030 i5 14400/16GB DDR5/UHD 730 graphics

Acer KB202 27in 1080p monitor

Affinity Photo 1.10.6

Affinity photo 2 2.5.3 Affinity Designer 2 2.5.3 Affinity Publisher 2 2.5.3 on Windows 11 Pro version 24H2

Beta builds as they come out.

canon 80d| sigma 18-200mm F3.5-6.3 DC MACRO OS HSM | Tamron SP AF 28-75mm f/2.8 XR Di LD | Canon EF-S 10-18mm f/4.5-5.6 IS STM Autofocus APS-C Lens, Black

 

Link to comment
Share on other sites

1 hour ago, michalmph said:

Are the scripting features available to betatesters?

The scripting features haven't yet been built for betas. So, no.

Mac Pro (Late 2013) Mac OS 12.7.6 
Affinity Designer 2.5.5 | Affinity Photo 2.5.5 | Affinity Publisher 2.5.5 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.