qmsk/irclogs/log_source.py
changeset 141 65c98c9e1716
parent 140 6db2527b67cf
child 146 22d6b9525ae0
equal deleted inserted replaced
140:6db2527b67cf 141:65c98c9e1716
    87         """
    87         """
    88             Get the logs for a given date (as a datetime), divided into pages of count each. If page is given, the time
    88             Get the logs for a given date (as a datetime), divided into pages of count each. If page is given, the time
    89             portion of the dt is ignored, and the lines for the given page are returned. Otherwise, if page is None,
    89             portion of the dt is ignored, and the lines for the given page are returned. Otherwise, if page is None,
    90             then the lines for the page containing the given timestamp is returned.
    90             then the lines for the page containing the given timestamp is returned.
    91 
    91 
       
    92                 dt          - the date to get logs for. If page is None, this is also the specific timestamp to page to
       
    93                 count       - number of lines per page to return
       
    94                 page        - specific page to return, or None to pick the right page for the given datetime
       
    95 
    92             The return value is a (page, max, lines) tuple.
    96             The return value is a (page, max, lines) tuple.
       
    97                 page        - the selected page
       
    98                 max         - total number of pages
       
    99                 lines       - the sequence of lines for the selected page
       
   100 
    93         """
   101         """
    94         
   102         
    95         # how to act?
   103         # how to act?
    96         if page :
   104         if page :
    97             # constant skip
   105             # constant skip