Skip to main content
Legend
August 16, 2015
Question

Are there any perl scripters around here?

  • August 16, 2015
  • 2 replies
  • 704 views

Hi all,

for a client project I need to run a perl script. I don't yet know how much perl programming beyond that client project I will do - the language is a bit "different" and this is my first use of it.

To invoke perl from ExtendScript means to take the detour via AppleScript, "do shell script" and finally the perl command. With a plugin that overhead can be minimized. For now I got this proof of concept working, and I'm sure I can tweak it to my needs:

This still needs better argument, result and error handling, there is no binding for the InDesign object model, I only have a temporary targetengine, and so forth. To maintain ports across InDesign versions and platforms will also require some work. Before I spend any more effort, my main question is: Would anybody be seriously interested in such a plugin?

Dirk

This topic has been closed for replies.

2 replies

Vamitul
Legend
August 17, 2015

I'd second Jongware's idea about Python. The possibilities that that would open are amazing. Powerful string formatting and manipulations, socket server/client etc that can actually be used, multithreading!!

Jongware
Community Expert
Community Expert
August 16, 2015

‌Perl, not so much. Is there any advantage that Perl has over JS/AS/VBS? (Other than your clients' "it's a language we already know" - Javascript ain't that hard!)

But I would be utterly fascinated with a native Python control for InDesign. Some of Python's constructions seem very alike ID's Object/Collection constructions, and it has a powerful set of collection operators.

Legend
August 16, 2015

The client is interested in a specific library, not in the language itself. I think that the available libraries are the major advantage over at least ExtendScript - for example CPAN has 27982 modules, and I didn't bother to check github.

Of course npm right now claims 175143 packages for node.js, but CEP is not available for CS5/CS6. Besides even though I really like node.js I doubt that it has anything like AFDKO (Adobe Font Development Kit), and that's not the library in question.

Speed could become another advantage, but it is too early for any claims.

Hmm, Python? Sounds doable, but that would be a different weekend. Probably I'd first revive my old Java binding.