================================= Docs on using 'recordbot' in #qdq ================================= The recordbot is a (it used to say "simple" here) bot that reads SDA's history.txt file and can answer questions about records on the levels in SDA's tables. To use, simply say 'recordbot: ' in the channel (the colon is important!) or send recordbot a private message. .. contents:: Commands ======== There are two complex commands, ``level`` and ``demos`` (and variants thereof) and a bunch of miscellaneous commands. The ``level`` Command --------------------- * ``recordbot: ``: The basic command, lists the times for the ER, EH, NR and NH of ````. For example:: recordbot: e1m1 Can also be spelt explicitly as 'level' (for when someone adds a map called "refresh" or something):: recordbot: level end * ``recordbot: all``: This also lists the coop records:: recordbot: e1m1 all * ``recordbot: ``: List the time, date and player(s) for the given run types:: recordbot: e1m1 er recordbot: e1m1 nh2 [assert] '-- go' in output recordbot: e1m1 eh8 recordbot: e1m1 eh2 eh3 * ``recordbot: link``: Print a link which you can use to download the record:: recordbot: e1m1 er link * ``recordbot: long [all]``: Print all the single players records on a level in the longer time, date, players format:: recordbot: e1m1 long Adding ``all``, as above, prints the coop demos too:: recordbot: end long all * ``recordbot: history``: Prints the history of the given record:: [assert] 'excess flood' not in output recordbot: e1m1 nh2 history The interaction of the various forms of the level command can be a bit confusing and arbitrary. I find it hard to care, though. The ``demos`` command --------------------- * ``recordbot: demos [] []``: This command queries the tables and reports how many demos have been submitted that satisfy certain criteria such as being by a given player or are of a particular type or from a particular year. In the basic form, just reports how many demos have been submitted:: [assert] not output.startswith('1') recordbot: demos So still some way to 10000 demos, then :) Further arguments restrict the number of demos considered. Giving a player name restricts to demos in which that player played a part:: [assert] "don't know" not in output recordbot: demos richard [assert] "don't know" in output recordbot: demos no one Passing "flags" (arguments that start with + or -) restricts the demos in other ways. For a full list see `The Demo Feature Language`_, but here are some examples:: recordbot: demos michael hudson +records Multiple flags are "and"ed together, so:: [assert] '0 demos' in output recordbot: demos robert axelsson +rogue +coop -records So no-one's beaten an R&R demo on the rogue maps yet! There's one 'psuedo-flag', ``+list``:: [assert] 'excess flood' not in output recordbot: demos michael hudson +rogue +05 There are two variants, mostly for historical reasons: * ``recordbot: records [] []``: ``records [] []`` is equivalent to ``demos +records [] []``:: recordbot: demos +records ilkka recordbot: records ilkka * ``recordbot: recordlist [] []``: ``recordlist [] []`` is equivalent to ``demos +records +list [] []``:: [assert] 'excess flood' in output recordbot: recordlist thomas stubgaard +id +sp +nh Oops! He's done so many of those ``recordbot`` is too scared to list them all to IRC in fear of being booted off for flooding. You can `use the web interface`_ to see them all. Or even all of Optic's demos... .. _`use the web interface`: http://python.net:8080/botalike?command=recordlist+thomas+stubgaard+%2Bid+%2Bsp+%2Bnh * ``recordbot: oldest [n] [] []``: Very much like the demos command, except it sorts by date and prints the ``n`` oldest demos:: recordbot: oldest recordbot: oldest 7 +sp +records -optimal recordbot: oldest 3 -rogue michael hudson * ``recordbot: newest [n] [] []``: Can you guess how this differs from ``oldest``? :: recordbot: newest recordbot: newest 3 +optimal recordbot: newest markus taipale Miscellaneous Commands ---------------------- * ``recordbot: refresh``: Downloads history.txt (and config) from speeddemosarchive.com. recordbot does this once a day anyway, but you can give it a prod:: recordbot: refresh [time passes...] ...done! * ``recordbot: help``: Prints the URL of this page:: recordbot: help * ``recordbot: todo``: Prints the todo list. * ``recordbot: tablefiller []``: Prints a random tablefiller (i.e. a map/runtype that's only ever had one demo submitted for it):: recordbot: tablefiller recordbot: tablefiller EH For use by the bored. Doesn't really work very well -- the new-ish 'holes' command is almost certainly more useful, see below. * ``recordbot: table coop``: Prints out a table of demos against time, including info on how many coop demos there were each year:: recordbot: table coop You can also try ``table id``. This command is evolving, and currently is a bit strange and I don't really want to talk about the other things you can make it do. * ``recordbot: source``: Prints a URL where you can get the source to recordbot. :: recordbot: source The main motivation for this is that when people say "recordbot should do X" it's marginally politer to point people at the source than tell them to fuck off. * ``recordbot: 0wnage [+list] [+coop]``: Prints how many levels ``player`` has total ownage in (i.e levels where ``player`` has all of ER, EH, NR and NH):: [assert] '12' in output recordbot: 0wnage thomasb (At the time of writing, Thomas is the guy with the most of these, yes. Carl and Daniel are joint second with 7 each). Adding ``+list`` lists the levels too:: [assert] '0 levels' not in output recordbot: 0wnage richard skidmore +list If you pass the ``+coop`` flag you can list multiple players to find total ownage-holding coop teams, but you must use single word aliases -- so like ``thomasb``, not like ``Thomas Bergendorff`` (see the config file for these, if guessing doesn't work):: [assert] '0 levels' not in output recordbot: 0wnage pif luc +coop [assert] '0 levels' not in output recordbot: ownage robert rickard +coop +list As you can see, you can also spell ``0wnage`` as ``ownage``, if you're not feeling l33t. * ``recordbot: holes``: Used to find holes in the tables. Defaults to single player, non-marathon holes, though this can be changed, and there's some support for filtering by category of run or level series:: recordbot: holes recordbot: holes +list [assert] '0 matching holes' in output recordbot: holes +id +er recordbot: holes +2p [assert] '0 matching holes' not in output recordbot: holes +2p +id +nr +list [assert] '0 matching holes' not in output recordbot: holes +mara +list * ``recordbot: top [] []``: Prints a little league table of the top ``n`` (default: 5) players ordered by the number of demos they have satisfying the criteria given by the features flags passed:: recordbot: top recordbot: top 3 +records +sp +id recordbot: top 3 -records +madcoop * ``recordbot: botalike``: IRC is really a crap interface for large quantities of data, which is why I wrote the `web interface`_. To allow relatively seamless transitions from IRC to the web, you can use the ``botalike`` command to generate a link to the last command ``recordbot`` saw in the web interface:: recordbot: botalike (Note that this is the last command ``recordbot`` saw via *any* interface -- it may not be the last command you can see!). You can also give a command to execute in the web interface:: recordbot: botalike holes +2p +list ``web`` is an alias for ``botalike``:: recordbot: web Yes, that's a link to a command that produces a link to another command. .. _`web interface`: http://python.net:8080/botalike In general the handling of malformed commands can be a bit spotty. Live with it. The Demo Feature Language ========================= The ``demos``, ``top`` and ``table`` commands all take arguments that describe the demos to be considered (although how the ``table`` command does this isn't documented because it's a bit crazy). These are the currently recognized feature flags: + ``id``: demos on the original ID maps. + ``hip``: demos on the Hipnotic ("Scourge of Armagon") maps. + ``rogue``: demos on the Rogue ("Dissolution of Eternity") maps. + ``mara``: marathon demos. + ``sp``: single player demos. + ``coop``: cooperative demos -- demos with two or more players. + ``madcoop``: "madcoop" demos -- demos with three or more players. + ``Np`` where ``N`` is ``1``, ``2``, ..., ``8``: only ``N`` player demos. + ``coop2``: demos with exactly two players. + ``run``: runs + ``100`` or ``100%``: 100%s + ``easy``: demos recorded on easy skill + ``night`` or ``nightmare``: demos recorded on nightmare skill + ``er``, ``eh``, ``nr``, ``nh``: demos recorded in the given category + ``records``: demos that are still records. + ``97``, ``98``, ... ``00``, ``01``, ...: demos recorded in a given year. + ``jan``, ``feb``, ... ``dec``: demos recorded in a given month. Mutiple flags are 'and'ed together, so "``+id +3p``" means "demos on id maps that are three-player coops". There's a limited form of 'or'ing available: "``+hip|rogue``" means "demos on hip *or* rogue maps". You can only 'or' flags that are of the same 'kind'; something like "``+coop|run``" will give an error message.