3 Replies Latest reply on Aug 16, 2015 11:08 PM by Vamitul

    Are there any perl scripters around here?

    Dirk Becker Level 4

      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:

      Bildschirmfoto 2015-08-16 um 12.27.55.png

      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

        • 1. Re: Are there any perl scripters around here?
          [Jongware] Most Valuable Participant

          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.

          • 2. Re: Are there any perl scripters around here?
            Dirk Becker Level 4

            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.

            • 3. Re: Are there any perl scripters around here?
              Vamitul Level 4

              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!!