Convert to python module

This commit is contained in:
dpedu 2015-06-18 19:29:46 -07:00
parent 99479e193c
commit b7eacbfc22
34 changed files with 36 additions and 13 deletions

5
.gitignore vendored
View File

@ -2,4 +2,7 @@ libs
*__pycache__*
docs/_build
.DS_Store
botenv
botenv
dist
build
pyircbot.egg-info

View File

@ -4,7 +4,8 @@ import sys
import logging
import yaml
from optparse import OptionParser
from core.pyircbot import PyIRCBot
from pyircbot import PyIRCBot
if __name__ == "__main__":
" logging level and facility "

View File

@ -1,8 +1,9 @@
user:
nick:
- pyircbot3
- pyircbot3_
- pyircbot3__
- dave
- dave_
- dave__
- dave___
password: nickservpassword
username: pyircbot3
hostname: pyircbot3.domain.com
@ -15,7 +16,7 @@ ident:
ghost_to: nickserv
ghost_cmd: ghost %(nick)s %(password)s
channels:
- "#xmopx"
- "#dave2"
privatechannels:
to: chanserv
command: invite %(channel)s

2
examples/run-example.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
../bin/pyircbot -c config.main.yml -b config.instance.yml

View File

@ -9,3 +9,8 @@
.. automodule:: core.rpc
"""
__all__ = ["PyIRCBot"]
from pyircbot.pyircbot import PyIRCBot
from pyircbot.irccore import IRCCore

View File

@ -7,7 +7,7 @@
"""
from modulebase import ModuleBase,ModuleHook
from pyircbot.modulebase import ModuleBase,ModuleHook
class PingResponder(ModuleBase):
def __init__(self, bot, moduleName):

2
pyircbot/modules/Services.py Normal file → Executable file
View File

@ -7,7 +7,7 @@
"""
from modulebase import ModuleBase,ModuleHook
from pyircbot.modulebase import ModuleBase,ModuleHook
from time import sleep
class Services(ModuleBase):

View File

@ -9,8 +9,9 @@
import logging
import time
import sys
from core.rpc import BotRPC
from core.irccore import IRCCore
from pyircbot.rpc import BotRPC
from pyircbot.irccore import IRCCore
from pyircbot import modulebase
import os.path
class PyIRCBot:

View File

@ -8,7 +8,7 @@
import traceback
import logging
from core import jsonrpc
from pyircbot import jsonrpc
from threading import Thread
class BotRPC(Thread):

View File

@ -1,2 +0,0 @@
#!/bin/sh
./pyircbot/main.py -c config.main.yml -b config.instance.yml

12
setup.py Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env python3
from setuptools import setup
setup(name='pyircbot',
version='4.0.0aa',
description='A modular python irc bot',
url='http://gitlab.xmopx.net/dave/pyircbot3/tree/master',
author='dpedu',
author_email='dave@davepedu.com',
packages=['pyircbot'],
scripts=['bin/pyircbot'],
zip_safe=False)