Results 1 to 4 of 4

Thread: Sed, Pisg: Converting mIRC logs into Eggdrop logformat.

  1. #1
    Join Date
    Mar 2008
    Beans
    10

    Sed, Pisg: Converting mIRC logs into Eggdrop logformat.

    Hiya, not sure if this is the correct forum to ask this but Ill give it a try since it involves programming, sed and eggdrop.

    Heres the thing, Ive tried to convert mIRC logs into Eggdrop without any special success. Ive browsed some forums and found a person using mirc2egg.sed which is included in pisg, so I used it but it will only convert
    Session Start: Sat Oct 09 07:57:31 2010
    into
    [07:58] --- Sat Oct 09 2010

    This leaves out everything else like chat, mirc2egg.sed seems to be quite outdated but not sure if this makes any difference. Is there any other way to convert mIRC logs into Eggdrop?

    Cheers!

  2. #2
    Join Date
    Apr 2005
    Location
    Warsaw, Poland
    Beans
    111
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Sed, Pisg: Converting mIRC logs into Eggdrop logformat.

    Can you post a short sample of both log formats?

  3. #3
    Join Date
    Mar 2008
    Beans
    10

    Re: Sed, Pisg: Converting mIRC logs into Eggdrop logformat.

    mIRC:
    (00:04:57) ‹Nick› chatchat chat chat
    (00:04:57) ‹Nick› Lol.
    (00:05:03) ‹@Nick› chatchat chat chat
    (00:05:06) ‹Nick› chat chat
    (00:05:09) ‹Nick› chatchat chat chat
    (00:05:10) ‹Nick› chat chat

    Eggdrop:
    [00:04] <Nick> chatchat chat chat
    [00:04] <Nick> Lol.
    [00:05] <Nick> chatchat chat chat
    [00:05] <Nick> chat chat
    [00:05] <Nick> chatchat chat chat
    [00:05] <Nick> chat chat

  4. #4
    Join Date
    Apr 2005
    Location
    Warsaw, Poland
    Beans
    111
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Sed, Pisg: Converting mIRC logs into Eggdrop logformat.

    So it's just the time part that needs to be converted? If so, then a simple sed substitution should do:

    Code:
    cat mirc_log_file | sed 's/^(\([0-9]\+:[0-9]\+\):[0-9]\+)/[\1]/'
    If you also want the normal less-than/greater-than characters wrapped around the nick instead of the characters used by mIRC, use this longer variant:

    Code:
    sed 's/^(\([0-9]\+:[0-9]\+\):[0-9]\+) ‹\([^›]\+\)›/[\1] <\2>/'

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •