• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Perl?

Community Beginner ,
Apr 20, 2012 Apr 20, 2012

Copy link to clipboard

Copied

Is it possible to use ExtendScripts to run a Perl script in Unix?

We use Perl to generate .mif files. So with an ExtendScript, I'd like to run the Perl script, and then get the resulting .mif file into the active FrameMaker document.

Thanks,

Jason

TOPICS
Scripting

Views

2.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 20, 2012 Apr 20, 2012

Copy link to clipboard

Copied

Why don't you just use extendscript to generate the MIF files directly? Sounds like it would  be faster then having to call a separate script and then have that script send output back to the extenscript.

Joe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 20, 2012 Apr 20, 2012

Copy link to clipboard

Copied

It's part of the workflow. The Perl script cannot be re-built in ExtendScript. I just need to know if ExtendScripts can interface with Unix to kick off a Perl script. Is that possible?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 19, 2019 Jun 19, 2019

Copy link to clipboard

Copied

Hello Josan ,

Could you please provide few sample perl scripts to generate mif files ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jun 19, 2019 Jun 19, 2019

Copy link to clipboard

Copied

Your question is not correctly stated because it does not make sense. Whether there is a Perl script or anything else is irrelevant. You want to run a task on Unix and FrameMaker runs on Windows. This means you would either have to start a Virtual Machine running Unix or you would have to connect to a server that is already running Unix. The first action can be done if you can run a batch file that starts the Virtual Machine with Unix, which in turn would auto-run the Perl script. But this would be a ridiculous construction. The second option can be achieved by using a socket in ExtendScript to connect to the already running Unix machine.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 19, 2019 Jun 19, 2019

Copy link to clipboard

Copied

Hi Jason,

Provide an interface to your Unix Server (http-protocol) and it should be possible to execute the script and process the result in FrameMaker.

As 4everJang​ said, Perl is running on Unix and FM on Windows, so there are two machines running and you have to communicate with Services on the Unix Machine and perhaps vice versa.

The other way is to put MIFs generated by your Perl script on a file share an let FM pull MIFs from there. By user interaction or by Polling directory any X minutes.

But please note, this kind of automation (without user interaction) is not captured by Adobe FrameMaker EULA. You need a license of FM Publishing Server, which means a Windows Server installation

EDIT:

Running FMPS provides a REST API on Windows Server. So you can generate your MIFs with your Perl scripts, and when done call FMPS via REST API to gnerate FM files, PDFs and others. That's the process I would recommend.

Furthermore I would recommend not to generate MIF. Generate XML and process gets very smooth

Markus

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 19, 2019 Jun 19, 2019

Copy link to clipboard

Copied

Hello Weidenmaier ,

Could you please provide sample perl scripts to convert xml data to mif table elements ?

Thank You

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 19, 2019 Jun 19, 2019

Copy link to clipboard

Copied

Hi anjana,

you don't need to do this.

publish your data to CALS Table (CALS Table Model - Wikipedia)​ wrap it into a DITA Topic OASIS Darwin Information Typing Architecture (DITA) TC | OASIS Open XML in FM and anything is done. take topic.template.fm to fit layout for your needs.

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">

<topic id="topic_svb_h5f_d3b">

    <title>topic title</title>

    <body>

        <table frame="all" rowsep="1" colsep="1" id="table_h1w_h5f_d3b">

            <title>table title</title>

            <tgroup cols="5">

                <colspec colname="c1" colnum="1" colwidth="1*"/>

                <colspec colname="c2" colnum="2" colwidth="1*"/>

                <colspec colname="c3" colnum="3" colwidth="1*"/>

                <colspec colname="c4" colnum="4" colwidth="1*"/>

                <colspec colname="c5" colnum="5" colwidth="1*"/>

                <thead>

                    <row>

                        <entry>heading 1</entry>

                        <entry>heading 1</entry>

                        <entry>heading 1</entry>

                        <entry>heading 1</entry>

                        <entry>heading 1</entry>

                    </row>

                </thead>

                <tbody>

                    <row>

                        <entry/>

                        <entry namest="c2" nameend="c3">column spanned</entry>

                        <entry/>

                        <entry/>

                    </row>

                    <row>

                        <entry/>

                        <entry/>

                        <entry/>

                        <entry morerows="1">row spanned</entry>

                        <entry/>

                    </row>

                    <row>

                        <entry/>

                        <entry/>

                        <entry/>

                        <entry/>

                    </row>

                </tbody>

            </tgroup>

        </table>

    </body>

</topic>

If you don't want to use DITA, configure your customer XML Application, which works similar. No Need to go the MIF way. Simply use FM Standard funcations

EDIT: copy this Code into Notepad++ save it with file Extension XML, and see what happens. No Script (neither ES nor Perl) is needed

If not already done, switch preferences to structured FrameMaker and time for MIF is over

Markus

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jun 19, 2019 Jun 19, 2019

Copy link to clipboard

Copied

Note that this is a FrameMaker Scripting forum, not a Perl forum.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 19, 2019 Jun 19, 2019

Copy link to clipboard

Copied

LATEST

it's not, but you don't need Perl nor MIF to solve this issue, so why not asking such questions here.

You can solve this issue with FM Standards, and if you think about data and process you can solve all this stuff without or only with a little bit of code.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines