Changeset 1101:c92b727a6ba1 for doc

Show
Ignore:
Timestamp:
02/17/07 22:29:39 (23 months ago)
Author:
bart@…
Branch:
default
Message:

docify

Location:
doc
Files:
11 modified

Legend:

Unmodified
Added
Removed
  • doc/COLLECTIVE

    r1097 r1101  
    99 
    1010Enable collective 
    11 ================= 
     11~~~~~~~~~~~~~~~~~ 
    1212:: 
    1313 
     
    1616 
    1717Disable collective 
    18 ================== 
     18~~~~~~~~~~~~~~~~~~ 
    1919:: 
    2020 
     
    2323 
    2424Boot the collective 
    25 =================== 
     25~~~~~~~~~~~~~~~~~~ 
    2626 
    2727This wil copy the collective nodes list from a given server:port combo. 
     
    3232 
    3333Copy all nodes list from all known nodes 
    34 ======================================== 
    35 :; 
     34~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     35:: 
    3636 
    3737  < dunk> !coll-fullboot 
     
    3939 
    4040See what nodes are active 
    41 ========================= 
     41~~~~~~~~~~~~~~~~~~~~~~~~~ 
    4242:: 
    4343 
    4444  < dunk> !coll-status 
    4545  < gozerbot> 5 active nodes:  ivitor .. hzt .. qqa .. r8 .. Noa 
    46  
    47 Commands 
    48 ======== 
    4946 
    5047Do a command on all the other collective bots 
     
    6663  < gozerbot> (0.129984855652) -||r8||- GOZERBOT 0.5 HG revision 712 
    6764 
    68 Nodes 
    69 ===== 
    70  
    7165Add a node to the local collective list 
    7266~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  • doc/FLEET

    r1097 r1101  
    99 
    1010Get a list of the bots in the fleet 
    11 =================================== 
     11~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    1212:: 
    1313 
     
    1616 
    1717Add a irc bot to the fleet 
    18 ========================== 
     18~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    1919:: 
    2020 
     
    3030 
    3131Add jabber bot 
    32 ============== 
     32~~~~~~~~~~~~~~ 
    3333(this can only be done on a jabber bot because of password 
    3434passing .. irc is not save, use a private chat to the jabberbot) 
     
    4242 
    4343Make another bot join a channel 
    44 =============================== 
     44~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    4545:: 
    4646 
     
    5151 
    5252Delete a bot 
    53 ============ 
     53~~~~~~~~~~~~ 
    5454:: 
    5555 
  • doc/FLOW

    r1097 r1101  
    1212 
    1313receive string and make it an ircevent 
    14 ====================================== 
     14~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    1515 
    1616in gozerbot/irc.py: 
     
    2323 
    2424basic handling of the ircevent 
    25 ============================== 
     25~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    2626 
    2727in gozerbot/bot.py: 
     
    5757 
    5858command handling 
    59 ================ 
     59~~~~~~~~~~~~~~~~ 
    6060 
    6161in gozerbot/bot.py: 
     
    118118 
    119119callback handling 
    120 ================= 
     120~~~~~~~~~~~~~~~~~ 
    121121 
    122122in gozerbot/callbacks.py: 
     
    148148            # see if the callback pre requirement succeeds 
    149149            if cb.prereq: 
    150                 rlog(-10, 'callback', 'excecuting in loop %s' % \ 
    151 str(cb.prereq)) 
     150                rlog(-10, 'callback', 'excecuting in loop %s' % str(cb.prereq)) 
    152151                if not cb.prereq(bot, ievent): 
    153152                    return 
     
    156155                return 
    157156            # start callback in its own thread 
    158             rlog(-10, 'callback', 'excecuting callback %s' % \ 
    159 str(cb.func)) 
     157            rlog(-10, 'callback', 'excecuting callback %s' % str(cb.func)) 
    160158            if cb.threaded: 
    161159                thr.start_new_thread(cb.func, (bot, ievent), cb.kwargs) 
    162160            else: 
    163161                cb.func(bot, ievent, **cb.kwargs) 
    164  
    165 ` 
  • doc/OPER

    r1097 r1101  
    108108 
    109109upgrading 
    110 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     110~~~~~~~~ 
    111111 
    112112-only for mercurial or svn bots- 
  • doc/PLUGINS

    r1097 r1101  
    121121 
    122122.. user related commands 
    123  
    124 30) worktimer 
    125  
    126 .. implement a worktimer 
  • doc/RELAY

    r1097 r1101  
    1010 
    1111add a relay 
    12 =========== 
     12~~~~~~~~~~~ 
    1313 
    1414relay-add <botname> <channel> <botname> <channel> 
     
    2020 
    2121remove a relay 
    22 ============== 
     22~~~~~~~~~~~~~~ 
    2323:: 
    2424 
  • doc/RSS

    r1097 r1101  
    55__copyright__ = 'this file is in the public domain' 
    66 
    7 # first check if you have RSS permission: 
     7first check if you have RSS permission 
     8~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     9:: 
    810 
    9 <dunk> !perms 
    10 <gozerbot> you have permissions = USER .. OPER 
     11    <dunk> !perms 
     12    <gozerbot> you have permissions = USER .. OPER 
    1113 
    12 # if this is not the case add it: 
     14if this is not the case add it 
     15~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     16:: 
     17    <dunk> !setperms dunk rss 
     18    <gozerbot> ok 
    1319 
    14 <dunk> !setperms dunk rss 
    15 <gozerbot> ok 
     20see which rss commands the bot has with 
     21~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     22:: 
     23    <dunk> !apro rss 
     24    <gozerbot> 1) rss-url 2) rss-setsleeptime 3) rss-del 4) rss-add 5) 
     25               rss-delchannel 6) rss-delitemslist 7) rss-stopwatch 8) 
     26               rss-addchannel 9) rss-sleeptime 10) rss-list 11) rss-itemslist 12) 
     27               rss-scan 13) rss-watch 14) rss-running 15) rss-get 16) 
     28               rss-additemslist 
    1629 
    17 # see which rss commands the bot has with: 
     30you will want to add a url to the RSS system, we use slashdot as an example 
     31~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     32:: 
     33    <dunk> !rss-add slash http://rss.slashdot.org/Slashdot/slashdot 
     34    <gozerbot> ok 
    1835 
    19 <dunk> !apro rss 
    20 <gozerbot> 1) rss-url 2) rss-setsleeptime 3) rss-del 4) rss-add 5) 
    21            rss-delchannel 6) rss-delitemslist 7) rss-stopwatch 8) 
    22            rss-addchannel 9) rss-sleeptime 10) rss-list 11) rss-itemslist 12) 
    23            rss-scan 13) rss-watch 14) rss-running 15) rss-get 16) 
    24            rss-additemslist 
     36see if the url works 
     37~~~~~~~~~~~~~~~~~~~~ 
     38:: 
     39    <dunk> !rss-get slash 
     40    <gozerbot> 1) TV Piracy is Next 2) Smarter Phones Coming Soon 3) 7 
     41               Megapixel Camera Phone 4) Jon Bringing WMV9 to Linux 5) Wireless 
     42               Mouse with no Batteries 6) Blog Torrent Beta Released 7) Titanic 
     43               Director to Make Battle Angel Movie 8) Malware: Fighting Malicious 
     44               Code 9) Best Tools for Machinima? 10) Nmap Author Receives FBI 
     45               Subpoenas 
    2546 
    26 # you will want to add a url to the RSS system, we use slashdot as an example: 
     47to let the bot check for updates 
     48~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     49:: 
     50    <dunk> !rss-watch slash 
     51    <gozerbot> watcher thread started 
    2752 
    28 <dunk> !rss-add slash http://rss.slashdot.org/Slashdot/slashdot 
    29 <gozerbot> ok 
     53see if the thread is running 
     54~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     55:: 
     56    <dunk> !rss-running 
     57    <gozerbot> 1) slash ['#dunkbots'] 
    3058 
    31 # see if the url works: 
     59if you want to stop watching 
     60~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     61:: 
     62    <dunk> !rss-stopwatch slash 
     63    <gozerbot> ok 
    3264 
    33 <dunk> !rss-get slash 
    34 <gozerbot> 1) TV Piracy is Next 2) Smarter Phones Coming Soon 3) 7 
    35            Megapixel Camera Phone 4) Jon Bringing WMV9 to Linux 5) Wireless 
    36            Mouse with no Batteries 6) Blog Torrent Beta Released 7) Titanic 
    37            Director to Make Battle Angel Movie 8) Malware: Fighting Malicious 
    38            Code 9) Best Tools for Machinima? 10) Nmap Author Receives FBI 
    39            Subpoenas 
    40  
    41 # to let the bot check for updates: 
    42  
    43 <dunk> !rss-watch slash 
    44 <gozerbot> watcher thread started 
    45  
    46 # see if the thread is running: 
    47  
    48 <dunk> !rss-running 
    49 <gozerbot> 1) slash ['#dunkbots'] 
    50  
    51 if you want to stop watching: 
    52  
    53 <dunk> !rss-stopwatch slash 
    54 <gozerbot> ok 
    55  
    56 # see what other data the rss feed has to offer: 
    57  
    58 <dunk> !rss-scan slash 
    59 <gozerbot> story = 20 author = 20 link = 20 section = 20 title = 20 
    60            comments = 20 topic = 20 time = 20 department = 20 image = 20 
    61            backslash = 1 
     65see what other data the rss feed has to offer 
     66~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     67:: 
     68    <dunk> !rss-scan slash 
     69    <gozerbot> story = 20 author = 20 link = 20 section = 20 title = 20 
     70               comments = 20 topic = 20 time = 20 department = 20 image = 20 
     71               backslash = 1 
    6272 
    6373this counts the number of times a certain tag is found in the feed. 
    6474 
    65 # so if we also want for example the link field added, you can add that item 
    66 # to the itemslist: 
     75so if we also want for example the link field added, you can add that item to the itemslist 
     76~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     77:: 
     78    <dunk> !rss-additemslist slash link 
     79    <gozerbot> ok 
    6780 
    68 <dunk> !rss-additemslist slash link 
    69 <gozerbot> ok 
    70  
    71 # check: 
    72  
    73 <dunk> !rss-get slash 
    74 <gozerbot> 1) Cracking the Google Code... Under the GoogleScope - 
    75            http://slashdot.org/article.pl?sid=05/05/10/1546207 2) Broadway 
    76            Awards Spam - http://slashdot.org/article.pl?sid=05/05/10/1455206 3) 
    77            More on Last Years Cisco Source Code Theft - 
    78            http://slashdot.org/article.pl?sid=05/05/10/1339234 4) What Does a 
    79            Spreading Worm Look Like? - 
    80            http://slashdot.org/article.pl?sid=05/05/10/1333202  (+2) 
     81check 
     82~~~~~ 
     83:: 
     84    <dunk> !rss-get slash 
     85    <gozerbot> 1) Cracking the Google Code... Under the GoogleScope - 
     86               http://slashdot.org/article.pl?sid=05/05/10/1546207 2) Broadway 
     87               Awards Spam - http://slashdot.org/article.pl?sid=05/05/10/1455206 3) 
     88               More on Last Years Cisco Source Code Theft - 
     89               http://slashdot.org/article.pl?sid=05/05/10/1339234 4) What Does a 
     90               Spreading Worm Look Like? - 
     91               http://slashdot.org/article.pl?sid=05/05/10/1333202  (+2) 
    8192 
    8293to remove use rss-delitemslist. 
    8394 
     95poll time 
     96~~~~~~~~~ 
     97 
    8498the bot will default poll once every 30 min. if you want the bot to poll 
    8599every x seconds you can use the rss-setsleeptime command (min is 60 seconds). 
  • doc/TOURDECODE

    r1097 r1101  
    66 
    77bot dir 
    8 ======= 
     8~~~~~~~ 
    99:: 
    1010   
     
    2525   
    2626gozerplugs 
    27 ========== 
    28 plugins that use mysql 
     27~~~~~~~~~~ 
    2928:: 
    3029   
    3130  $ ls 
    3231  __init__.py  dbplugs  plugs  web 
    33    
    34   (bart@dunker):~/gozerbot/tour/gozerbot/gozerplugs/dbplugs 
    35   $ ls 
    36   __init__.py     infoitem.py     quote.py        user.py 
    37   birthday.py     karma.py        todo.py 
    38    
    39   birthday.py .. manages birthdays  
    40   karma.py .. manages karma 
    41   quote.py .. does the quotes thing 
    42   todo.py .. todo  
    43   user.py .. user related plugin 
     32 
    4433   
    4534doc 
    46 === 
     35~~~ 
    4736:: 
    4837   
     
    6655   
    6756files 
    68 ===== 
     57~~~~~ 
    6958:: 
    7059   
     
    9180   
    9281gozerbot 
    93 ======== 
     82~~~~~~~~ 
    9483bots core code 
    9584:: 
     
    141130   
    142131plugs 
    143 ===== 
     132~~~~~ 
    144133:: 
    145134     
    146   (bart@dunker):~/gozerbot/tour/gozerbot/plugs 
     135  (bart@dunker):~/gozerbot/tour/gozerbot/gozerplugs/plugs 
    147136  $ ls  
    148137  __init__.py    core.py        infoitem.py        misc.py         tail.py 
     
    159148  collective.py  idle.py        mailexceptions.py  shop.py 
    160149  convert.py     ignore.py      markov.py          size.py 
     150 
     151database plugs 
     152~~~~~~~~~~~~~~ 
     153:: 
    161154   
    162   see doc/PLUGINS for plugins documentation 
     155  (bart@dunker):~/gozerbot/tour/gozerbot/gozerplugs/dbplugs 
     156  $ ls 
     157  __init__.py     infoitem.py     quote.py        user.py 
     158  birthday.py     karma.py        todo.py 
    163159   
     160  birthday.py .. manages birthdays  
     161  karma.py .. manages karma 
     162  quote.py .. does the quotes thing 
     163  todo.py .. todo  
     164  user.py .. user related plugin 
     165   
     166see doc/PLUGINS for plugins documentation 
     167   
  • doc/UDP

    r1097 r1101  
    1010 
    1111udp config  
    12 ========== 
     12~~~~~~~~~~ 
    1313 
    1414edit the following section in you data/config 
     
    2828 
    2929limiter 
    30 ======= 
     30~~~~~~~ 
    3131 
    3232bot's /msg to a user/channel are limited to 1 per 3 seconds so the bot will 
    3333not excessflood on the server. use partyudp if you need no delay between 
    3434sent messages, this will use dcc chat to deliver the message. 
     35 
     36toudp 
     37~~~~~ 
    3538:: 
    3639 
  • doc/USER

    r1097 r1101  
    77 
    88user related commands 
    9 ===================== 
    109 
    1110user records 
  • doc/WEBSERVER

    r1097 r1101  
    55__copyright__ = 'this file is in the public domain' 
    66 
    7 # get help on the webserver plugin: 
     7get help on the webserver plugin 
     8~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     9:: 
    810 
    9 |       bart | !help webserver 
    10 |   gozerbot | plugin description: maintain the bots webserver 
    11 |   gozerbot | commands: web .. web-allowip .. web-defaultallow .. 
    12                web-defaultdeny .. web-denyip .. web-disable .. web-enable 
    13                .. web-lists .. web-reload 
     11    |       bart | !help webserver 
     12    |   gozerbot | plugin description: maintain the bots webserver 
     13    |   gozerbot | commands: web .. web-allowip .. web-defaultallow .. 
     14                   web-defaultdeny .. web-denyip .. web-disable .. web-enable 
     15                   .. web-lists .. web-reload 
    1416 
    15 # enable webserver: 
     17enable webserver 
     18~~~~~~~~~~~~~~~~ 
     19:: 
     20    |       bart | !web-enable localhost 8087 
     21    |   gozerbot | done 
    1622 
    17 |       bart | !web-enable localhost 8087 
    18 |   gozerbot | done 
     23see if webserver is running 
     24~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     25:: 
     26    |       bart | !web 
     27    |   gozerbot | web server is running at http://localhost:8087 
    1928 
    20 # see if webserver is running: 
     29set default to allow 
     30~~~~~~~~~~~~~~~~~~~~ 
     31:: 
     32    |       bart | !web-defaultallow 
     33    |   gozerbot | ok 
    2134 
    22 |       bart | !web 
    23 |   gozerbot | web server is running at http://localhost:8087 
     35deny an ip 
     36~~~~~~~~~~ 
     37:: 
     38    |       bart | !web-denyip 127.0.0.1 
     39    |   gozerbot | 127.0.0.1 denied 
    2440 
    25 # set default to allow: 
     41set default on deny 
     42~~~~~~~~~~~~~~~~~~~ 
     43:: 
     44    |       bart | !web-defaultdeny 
     45    |   gozerbot | ok 
    2646 
    27 |       bart | !web-defaultallow 
    28 |   gozerbot | ok 
     47allow an ip 
     48~~~~~~~~~~~ 
     49:: 
     50    |       bart | !web-allowip 127.0.0.1 
     51    |   gozerbot | 127.0.0.1 allowed 
    2952 
    30 # deny an ip: 
    31  
    32 |       bart | !web-denyip 127.0.0.1 
    33 |   gozerbot | 127.0.0.1 denied 
    34  
    35 # set default on deny: 
    36  
    37 |       bart | !web-defaultdeny 
    38 |   gozerbot | ok 
    39  
    40 # allow an ip: 
    41  
    42 |       bart | !web-allowip 127.0.0.1 
    43 |   gozerbot | 127.0.0.1 allowed 
    44  
    45 # disable webserver: 
    46  
    47 |       bart | !web-disable 
    48 |   gozerbot | done 
     53disable webserver 
     54~~~~~~~~~~~~~~~~~ 
     55:: 
     56    |       bart | !web-disable 
     57    |   gozerbot | done