#143 True "last N days" parsing

open
nobody
None
5
2012-03-29
2005-08-30
Poromenos
No

There should be a display from-to dates option. I have a
huge log which has various channels in it (I separate
them later using grep) and I don't want to display certain
chats before a certain date, I only want chats since
August 15th to today. It would be nice if there was an
option that took a date and displayed chats since that
date, and another that displayed from the beginning to
the ending date.

Discussion

  • Logged In: YES
    user_id=649301

    This could be done by splitting the log into 1 file per day
    or so. PISG doen's count days as a human being does. If the
    time of the day is less than the last line, PISG will count
    it as a new day.

     
  • Poromenos
    Poromenos
    2005-08-31

    Logged In: YES
    user_id=267121

    I'm not sure I understand what you mean, but I think it would
    be pretty easy to compare the date of the chat to, say, "15/06/
    2005" and if it is later (or earlier), parse it, otherwise ignore it.
    Just compare first the year, if it's later it's a match, or if it's the
    same compare month, and then day. It doesn't have to count
    days as 24 hour periods, just understand which day of the
    month it is.

     
  • Christoph Berg
    Christoph Berg
    2005-08-31

    Logged In: YES
    user_id=304233

    Pisg does not know about dates. All it looks at are
    timestamps, and when the time goes "backwards", a new day
    starts.
    Of course it would be possible to extract the necessary
    information from most log formats, but this has not yet been
    implemented. And then there's the issue of how to combine
    that with the cache...

    For now, split your log into 1 file/day and use NFiles.

    Christoph

     
  • Poromenos
    Poromenos
    2005-08-31

    Logged In: YES
    user_id=267121

    Hmm, I see. So what if you log one day from 2 pm to 4 pm,
    and the next day from 5 pm to 7 pm? Does that count as one
    day?

    As for the logs, I can't split them because it's not IRC, I'm
    having various channels logged in one file and it's hard to
    separate, but it doesn't matter that much, it would just be nice
    if pisg could do that.

     
  • Christoph Berg
    Christoph Berg
    2005-08-31

    Logged In: YES
    user_id=304233

    As 5 is > 4, this would still be one day.

     
  • Poromenos
    Poromenos
    2005-08-31

    Logged In: YES
    user_id=267121

    I thought so... OK then, I'll try to find some other way.