-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
136 lines (101 loc) · 3.79 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
quizbot
=======
quizbot is an IRC quiz bot, used for online quizzes and fun+learning activities. The bot also can make basic converation.
It's a combination of two components, both of which have been significantly enhanced by me.
------------------------------------------------------------------------------------------------
quizbot builds upon a skeleton quizbot at https://github.com/plaimi/q/blob/master/q
The chat component is a much enhanced version of https://github.com/jezhiggins/eliza.py
------------------------------------------------------------------------------------------------
Use
===
Hack config.py.
questions are in questions.py, as per the format.
Start the bot with:
$ ./q
or:
$ python q
Dependencies
============
quizbot is written in Python and runs on the 2.7 interpreter. The dependencies
below are listed with the oldest versions that are confirmed to work. Older
versions *might* work.
-python 2.7.x
-twisted >= 11.0.0
-twisted-words >= 11.0.0
A Note on Python 3
------------------
The 3.x interpreter will try to run this and fail. You *need* to use a 2.x
interpreter (2.7.x is the only one with which quizbot is formally tested).
This may be accomplished by specifically invoking a 2.x interpreter on some
systems.
$ python2 q
Contributing To the Project
===========================
Yes, please.
quiz -
- Improve the way question-answer pairs are stored. (Please provide code to
convert the current structure for me to test it.)
- Write better algorithms for detecting answers.
- Make quizbot reconnect correctly when it loses its IRC connection.
- Allow submitting questions to the bot itself
- Allow only one answer per quizzer.
chats -
- More than a single line responses from the bot
- Initiate converations instead of just responding
- More and more regexes , because they lead to less duplication of responses.
Try to keep the source very short. Please take some time to come up with the
shortest readable and logical solution to what you are trying to do.
Send me a pull-request using Github or an email to [email protected]
Happy hacking!
Licensing and Legalese
======================
quizbot is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
quizbot is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with quizbot. If not, see <http://www.gnu.org/licenses/>.
To get the bot working, you might need to do all this:
pip install colorama
pip install termcolor
pip install pyfiglet
yum install python27-python-pip -y
pip install --upgrade pip
pip install twisted
yum install python2-devel
might need to change include path to get twisted to compile and find python.h
/* vim: set textwidth=78 formatoptions=actw2 autoindent: */
--------------
get it working this way on non RH distros:
yum install python3-virtualenv (or yum equivalent)
just get python3-virtualenv somehow
yum install python27-python-pip -y
(get pip)
pip install --upgrade pip
yum install python2-devel
cd to base directory of code
virtualenv --python=/usr/bin/python2 venv
pip install -r requirements.txt (see below)
source venv/bin/activate
./q
----
have this in requirements.txt
root@nikhil-Latitude-5490:/home/nikhil/Downloads/quizbot# cat requirements.txt
attrs==21.2.0
Automat==20.2.0
colorama==0.4.4
constantly==15.1.0
hyperlink==21.0.0
idna==2.10
incremental==21.3.0
pyfiglet==0.8.post1
PyHamcrest==1.10.1
six==1.16.0
termcolor==1.1.0
Twisted==20.3.0
typing==3.10.0.0
zope.interface==5.4.0