Go to file
jesopo 33716efc22 add tests for Line formatting 2020-03-11 13:43:13 +00:00
irctokens add code to serialise/format Line objects 2020-03-11 13:42:23 +00:00
test add tests for Line formatting 2020-03-11 13:43:13 +00:00
.gitignore Initial commit 2020-03-11 11:26:13 +00:00
.travis.yml change mypy in .travis.py to point to new package 2020-03-11 12:22:39 +00:00
LICENSE Initial commit 2020-03-11 11:26:13 +00:00
README.md add travis build status badge to README.md 2020-03-11 12:43:24 +00:00
VERSION add VERSION file 2020-03-11 12:35:42 +00:00
setup.py add pypi setup.py file 2020-03-11 12:35:52 +00:00

README.md

irctokens

Build Status

rationale

there's far too many IRC client implementations out in the world that do not tokenise data correctly and thus fall victim to things like colons either being where you don't expect them or not being where you expect them.

usage

import irctokens
line = irctokens.tokenise(
    "@id=123 :jess!~jess@hostname PRIVMSG #chat :hello there!")

print(f"tags:    {line.tags}")    # {"id": "123"}
print(f"source:  {line.source}")  # "jess!~jess@hostname"
print(f"command: {line.command}") # "PRIVMSG"
print(f"params:  {line.params}")  # ["#chat", "hello there"]