Results 1 to 4 of 4

Thread: filter2xml.pl prob

  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    7

    filter2xml.pl prob

    Heya. A few of my old seq4 filters files aren't correctly converted to the new seq format by filter2xml.pl. My seq4 filter file for solro tower is attached. Running it through filter2xml.pl results in section names like this:
    Code:
    [Hunt]
        </section>
    [Caution]
        </section>
    Also, a space and a ^M are added at the end of each mob's name:
    Code:
    <oldfilter><regex>Name:Galremos ^M</regex></oldfilter>
    Any ideas?
    Attached Files Attached Files

  2. #2
    Registered User Zaphod's Avatar
    Join Date
    Dec 2001
    Posts
    648
    The problem turns out to be that your source files have a trailing space after the filter strings and also use windows (CRLF) line termination as opposed to UNIX line termination (LF). The CR appears as a ^M (aka control-M, ASCII 13). I'll make the next version of filter2xml.pl more robust in the face of such files.

    Enjoy,
    Zaphod (dohpaZ)
    Last edited by Zaphod; 01-16-2004 at 07:32 AM.
    Chief Software Engineer of the Apocalypse.
    http://showeq.doomed.to/
    SourceForge.net user: dohpaz.

    Personal thank you donations are now accepted.

  3. #3
    Registered User
    Join Date
    Dec 2001
    Posts
    849
    Open your source files in vi. then enter
    Code:
    :%s/^M//g
    to make the ^M type Ctrl+V then Ctrl+M. That will get rid of the ^M's next enter
    Code:
    :%s/\ $//g
    that will get ride of the trailing spaces (there is a space after the "\"). finally to save the file and quit enter
    Code:
    :wq!
    There maybe an easier way in vi but I'm not a vi guru, only been using it for about 9 years.
    "What you've just said is one of the most insanely, idiotic things i've ever heard. At no point in your rambling, incoherant response were you even close to anything that could be considered a rational thought. Everyone in this room is now dumber for having listened to it. I award you NO points, and may god have mercy on your soul."

  4. #4
    Registered User
    Join Date
    May 2003
    Posts
    7
    Thank you both =)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

You may post new threads
You may post replies
You may post attachments
You may edit your posts
HTML code is On
vB code is On
Smilies are On
[IMG] code is On