metatagger.cfg

We wrote a perl script to clean-up all the <TAGS> from our DCR content. How do we implement this in our metatagger.cfg file

We would like to run the script before metatagger picks the file for tagging

Our Metetagger.cfg file:

<fileType>
<label>DCR input</label>
<extension></extension>
<htmlMode>true</htmlMode>
</fileType>

please note our DCR doesn’t have an extension value because that is how we save it from Visual Formatter. Even thought the DCR file is an xhtml


thanks in advance

Comments

  • Are you running metatagger from workflow when a DCR is closed?
    If yes, then before the task that executes mtmetaproxy.cgi, you can have a custom task to run your custom script.

    Hope this helps!

    Akshat Pramod Sharma
    Interwoven Inc.
  • Thanks for your response;
    Yes we are running metatagger from a workflow.
    And Yes we could run the custom task before running mtmetaproxy.cgi.
    But what happens if we strip all tags from our DCR and then re-safe the file, will that not screw-up our DCR. how could be cleanup the tags with out compromising the output display
  • I do not understand the need to make physical changes to the file. Why do you want to change your DCR permanently? That way it won't remain re-useable.

    I understand that all you wanted was to run some custom script before running metatagger. If your intention is to have metatagger pick the content of your dcr without tags then I don't think you need to even run your custom script. MetaTagger should take care of it.

    What exactly is your requirement?
    I suggested just a way to run your custom script but it will be best if you could specify the steps you are trying to accomplish.

    Hope this helps!

    Akshat Pramod Sharma
    Interwoven Inc.
  • Use the <converter> tag to run the file through your script. Then the output of your script (whatever gets written to stdout) will get sent to metatagger for processing.

    <fileType>
    <label>DCR input</label>
    <extension></extension>
    <htmlMode>true</htmlMode>
    <converter>/full/path/to/perl.exe yourscript.pl &quot;%FILE%&quot;</converter>
    </fileType>

    Yourscript.pl should take the first command line argument as the filename, open it, process it and print the text to stdout. If the output of your script will be plain text as opposed to HTML set the <htmlMode> to false or omit that tag.
  • We’ve tried the following <converter tag > in many variations, but we are still experience a runtime error:
    <fileType>
    <label>DCR input</label>
    <extension></extension>
    <htmlMode>false</htmlMode>
    <converter>d:/iw-home/iw-perl/bin/perl.exe d:/iw-home/iw-perl/bin/mtpreprocess.pl &quot;%FILE%&quot;</converter>
    </fileType>
    we also tried the following:
    <fileType>
    <label>DCR input</label>
    <extension></extension>
    <htmlMode>false</htmlMode>
    <converter>d:/iw-home/iw-perl/bin/perl.exe mtpreprocess.pl &quot;%FILE%&quot;</converter>
    </fileType>

    we’ve also used the a different perl engine iwperl.exe instead off the perl.exe; this didn’t help either.
    Your solution is exactly what we want to do. Clean the DCR before metatagger reads it with out effecting the DCR’s original content, but we can’t get it to work. What’re we doing wrong?

    Edited by Developer on 12/20/02 02:04 PM (server time).

  • The following Error is what we are getting when we open up the DCR for meta tagging:

    ERROR: Suggest fails. Reason: [SERVER] Failed to invoke converter for input file type 'DCR input'. Internal error: [DFutRuntime.cpp,149]: Failed to spawn process.
  • I think we're close!

    Two things to try:
    * Use windows style slashes "\" instead of unix
    * Add the directory containing iwperl.exe (or whatever perl you want to use) to your system PATH
Sign In or Register to comment.