Back to index

moin  1.9.0~rc2
Static Public Attributes
MoinMoin.support.pygments.lexers.text.IrcLogsLexer Class Reference
Inheritance diagram for MoinMoin.support.pygments.lexers.text.IrcLogsLexer:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.support.pygments.lexers.text.IrcLogsLexer:
Collaboration graph
[legend]

List of all members.

Static Public Attributes

string name = 'IRC logs'
list aliases = ['irc']
list filenames = ['*.weechatlog']
list mimetypes = ['text/x-irclog']
 flags = re.VERBOSE|re.MULTILINE
string timestamp = r""
dictionary tokens

Detailed Description

Lexer for IRC logs in *irssi*, *xchat* or *weechat* style.

Definition at line 286 of file text.py.


Member Data Documentation

Definition at line 292 of file text.py.

Definition at line 293 of file text.py.

Definition at line 296 of file text.py.

Definition at line 294 of file text.py.

Definition at line 291 of file text.py.

Definition at line 297 of file text.py.

Initial value:
{
        'root': [
                # log start/end
            (r'^\*\*\*\*(.*)\*\*\*\*$', Comment),
            # hack
            ("^" + timestamp + r'(\s*<[^>]*>\s*)$', bygroups(Comment.Preproc, Name.Tag)),
            # normal msgs
            ("^" + timestamp + r"""    (\s*<.*?>\s*)          # Nick """,
             bygroups(Comment.Preproc, Name.Tag), 'msg'),
            # /me msgs
            ("^" + timestamp + r"""    (\s*[*]\s+)            # Star    ([^\s]+\s+.*?\n)       # Nick + rest of message """,
             bygroups(Comment.Preproc, Keyword, Generic.Inserted)),
            # join/part msgs
            ("^" + timestamp + r"""    (\s*(?:\*{3}|<?-[!@=P]?->?)\s*)  # Star(s) or symbols    ([^\s]+\s+)                     # Nick + Space    (.*?\n)                         # Rest of message """,
             bygroups(Comment.Preproc, Keyword, String, Comment)),
            (r"^.*?\n", Text),
        ],
        'msg': [
            (r"[^\s]+:(?!//)", Name.Attribute),  # Prefix
            (r".*\n", Text, '#pop'),
        ],
    }

Definition at line 317 of file text.py.


The documentation for this class was generated from the following file: