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

Consecutive edition numbering of output files - within the files


Recommended Posts

I need to generate (n) files of the same artwork, each one numbered with its own edition number 0001 to 000(n).

The number string needs to be styled of course, but from one output file to the next there will be no alterations to the file other than the addition of the next consecutive number. 

Anyone got clues as to how one can automate this process?  Many thanks!!!

Link to comment
Share on other sites

Welcome!

I assume you mean just the generated filenames, or also some sort of number style placement into the files themself? Ah Ok I see within the files, what sort of styled increased number (just as number text, an image, at which image position etc.) ? - And under which OS (Win or Mac)?

See also related for/via APub ...

 

... etc.

☛ 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

Hey

Thank you. 

Yeah, imagine an edition of artworks where the number is placed within the art, rather than as an artist scribble on the matt. 

It would be a simple enough styling which in itself is of course easy. The hard part is not having to type in the number, export the file, type in the next number, export the file as the next number along, type the next number.... 

Renumbering of files within Finder folders (Mac here) is best done with A Better Finder Rename - a stunningly useful utility, in case you don't know it.

Link to comment
Share on other sites

1 hour ago, RalphT said:

Hey

Thank you. 

Yeah, imagine an edition of artworks where the number is placed within the art, rather than as an artist scribble on the matt. 

It would be a simple enough styling which in itself is of course easy. The hard part is not having to type in the number, export the file, type in the next number, export the file as the next number along, type the next number.... 

Renumbering of files within Finder folders (Mac here) is best done with A Better Finder Rename - a stunningly useful utility, in case you don't know it.

I know that MacOS tool, though for the filenames part the whole can be done via sh-/bash-/python ... scripting in an equally manner. The inner artwork number placement part could be done in python too with the help of some already available/reusable image manipulation plugins (... so to say all together then in one go), as far as it doesn't have to be in an Affinity file format.

Of course it can an also be done in any higher programming language, since it's basically just keeping a buffered image, performing a simple loop iteration (startnumber <= endnumber, startnumber++ ...) for the specific wanted number format (000n), then placing that increased number always newly onto the buffered image and then writing/saving it out as a wanted filename format with that loop increased number.

Here's a quick example via a trivial bash script and ImageMagick in order to place increased numbers onto an artwork image ...


This script is a trivial shell/bash script which uses ImageMagick's convert operating on a file named "artwork.jpg" ...

#!/bin/bash
count=10001
while true; do
  if [[ "$count" -gt 10009 ]]; then
       exit 1
  fi
  echo ${count:1}
  ### Now use ImageMagick to add the number to artwork.jpg
  convert artwork.jpg -gravity North -pointsize 30 -annotate +0+100 ${count:1} artwork_${count:1}.jpg
  ((count++))
done

The shell script --> test.sh

It could be called/executed in Terminal.app like ...

  • sh test.sh

Or that script can be made executable via "chmod scriptname +x' in a Terminal etc. (see therefor this) and then just called this way ...

  • ./test.sh

So how to adapt/customize it?

Change the variable count and assign it to where you want to start the incr. numbering from aka 10000 = start from 0000 on, or 10001 to start from 0001 on.

I've used a while loop for number iterations (...while count greater given number then exit, otherwise do increase and place number ...). So in the condition expression [[ "$count" -gt 10009 ]] the given number is your stop condition and defines how many iterations (file modifications) to perform. - For example:

10009 = 0001 - 0009
10016 = 0001 - 0016
... and so on ...

The actual count number is then written into the artwork.jpg image file, actually to a plain normal position, you can customize these via ImageMagick option calls (color, size, position ... where to write on image) to your needs instead. Further the filename generated is here actually "artwork_number.jpg", you have to customize that too to your needs!

☛ 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

This is outstanding, thank you. I'd suspected there would be a script somewhere :) Of course one can set up a long Publisher document with the same image on every page, then number the pages and output each individually but the memory requirements for a file with say a thousand image pages,... well....   Great stuff, thank you.  PDFd this response and saved it in case some disaster strikes. Have a superior rest of the weekend.

 

Link to comment
Share on other sites

10 minutes ago, RalphT said:

I'd suspected there would be a script somewhere

Maybe didn't looked, I've wrote that shell script and tested it in 5 minutes here, since I had ImageMagick already pre-installed, it was a quick task from your above overall handling description. - You also can do the same with Apple Automation/Apple Script instead, in order to popup then a file selection and number start-/end input fields, ...so to say to make it more GUI input behaving.

19 minutes ago, RalphT said:

Of course one can set up a long Publisher document with the same image on every page, then number the pages and output each individually but the memory requirements for a file with say a thousand image pages,... well....

Well IMO that's then too much effort and also too much time & memory consuming to try to do yet such things with APub. Since APub/Aph/ADe are all lacking any better scripting capabilities and also don't have no programming API, which would ease to do such things then with those instead, they are not the right tools for such quick turnaround jobs.

☛ 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

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.