debian/0000755000000000000000000000000012244437405007173 5ustar debian/rules0000755000000000000000000000027712244437405010261 0ustar #!/usr/bin/make -f # Tests are not shipped inside source package export PYBUILD_DISABLE=test export PYBUILD_NAME=cobe export PYTHONWARNINGS=d %: dh $@ --with python2 --buildsystem=pybuild debian/manpages0000644000000000000000000000001611747760037010715 0ustar debian/cobe.1 debian/compat0000644000000000000000000000000212175223201010357 0ustar 9 debian/copyright0000644000000000000000000000261412175223201011117 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: cobe Upstream-Contact: Peter Teichman Source: http://pypi.python.org/pypi/cobe Files: * Copyright: 2010-2013, Peter Teichman License: Expat Files: debian/* Copyright: 2012-2013, Daniele Tricoli License: Expat License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. debian/cobe.10000644000000000000000000000241511747760037010176 0ustar .TH cobe 1 "Nov 2011" "cobe 2.0.2" "User Commands" .SH NAME cobe \- Markov chain based text generator library and chatbot .SH SYNOPSIS .B cobe [\fI\-h\fR] [\fI\-b BRAIN\fR] [\fI\-\-instatrace FILE\fR] \fIcommand\fR .SH DESCRIPTION cobe is a Markov chain based text generator, it uses Markov modeling to generate text responses after learning from input text. cobe use an on-disk data store (brain database) for low memory usage. The cobe command line tool can be used for interacting with a brain database. .SS OPTIONS .TP 2 \fB\-h\fR, \fB\-\-help\fR Show the help message and exit. .TP \fB\-b\fR BRAIN, \fB\-\-brain\fR BRAIN Use BRAIN as brain database. .TP \fB\-\-instatrace\fR FILE Log performance statistics to FILE. .SS COMMANDS .TP 2 \fBconsole\fR Start an interactive console. .TP \fBinit\fR Initialize a new brain. .TP \fBirc-client\fR Start an IRC client. .TP \fBlearn\fR Learn a file of text. .TP \fBlearn-irc-log\fR Learn a file of IRC log text. .TP \fBset-stemmer\fR Configure a stemmer. .TP \fBdel-stemmer\fR Delete the stemmer. .P Run `cobe command \-h' to access the built-in documentation of each command. .SH AUTHOR Peter Teichman .PP This manual page was written by Daniele Tricoli , for the Debian project (but may be used by others). debian/control0000644000000000000000000000202012244437405010570 0ustar Source: python-cobe Maintainer: Debian Python Modules Team Uploaders: Daniele Tricoli Section: python Priority: optional Build-Depends: debhelper (>= 9), dh-python, python-all (>= 2.6.6-3), python-setuptools (>= 0.6b3) Standards-Version: 3.9.5 X-Python-Version: >= 2.6 Homepage: http://wiki.github.com/pteichman/cobe/ Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/python-cobe/trunk/ Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/python-cobe/trunk/ Package: python-cobe Architecture: all Depends: ${misc:Depends}, ${python:Depends}, python (>= 2.7) | python-argparse (>= 1.1), python-irc (>= 3.0), python-pkg-resources, python-stemmer (>= 1.2) Description: Markov chain based text generator library and chatbot Cobe is a Markov chain based text generator. It provides a command line learning/replying interface, an IRC client, and a low-level API for writing your own text generation tools. It uses SQLite as its data store. debian/watch0000644000000000000000000000011412175223201010206 0ustar version=3 https://pypi.python.org/packages/source/c/cobe/cobe-(.*)\.tar\.gz debian/patches/0000755000000000000000000000000012244437405010622 5ustar debian/patches/series0000644000000000000000000000021012244437405012030 0ustar 01_remove-argparse-from-install-requires.patch 02_relaxed-versioned-dependencies.patch 03_use_python-irc_instead_of_python-irclib.patch debian/patches/03_use_python-irc_instead_of_python-irclib.patch0000644000000000000000000000570612244437405022163 0ustar Description: Use python-irc instead of python-irclib python-irc is not listed in install_requires because right now pkg_resources.get_distribution('irc').version will give something like '0.0.08.3.1' Author: Daniele Tricoli Last-Update: 2013-11-23 --- a/cobe/irc.py +++ b/cobe/irc.py @@ -1,16 +1,18 @@ # Copyright (C) 2010 Peter Teichman -import irclib +from __future__ import absolute_import + +import irc.client import logging import re log = logging.getLogger("cobe.irc") -class Bot(irclib.SimpleIRCClient): +class Bot(irc.client.SimpleIRCClient): def __init__(self, brain, nick, channel, log_channel, ignored_nicks, only_nicks): - irclib.SimpleIRCClient.__init__(self) + irc.client.SimpleIRCClient.__init__(self) self.brain = brain self.nick = nick @@ -27,9 +29,9 @@ logging.root.addHandler(handler) def _dispatcher(self, c, e): - log.debug("on_%s %s", e.eventtype(), (e.source(), e.target(), - e.arguments())) - irclib.SimpleIRCClient._dispatcher(self, c, e) + log.debug("on_%s %s", e.type, (e.source, e.target, + e.arguments)) + irc.client.SimpleIRCClient._dispatcher(self, c, e) def _delayed_check(self, delay=120): self.connection.execute_delayed(delay, self._check_connection) @@ -46,7 +48,7 @@ conn.connect(conn.server, conn.port, conn.nickname, conn.password, conn.username, conn.ircname, conn.localaddress, conn.localport) - except irclib.ServerConnectionError: + except irc.client.ServerConnectionError: log.info("failed reconnection, rescheduling", exc_info=True) self._delayed_check() @@ -61,7 +63,7 @@ self.connection.join(self.log_channel) def on_pubmsg(self, conn, event): - user = irclib.nm_to_n(event.source()) + user = irc.client.NickMask(event.source()).nick if event.target() == self.log_channel: # ignore input in the log channel @@ -72,7 +74,7 @@ return # only respond on channels - if not irclib.is_channel(event.target()): + if not irc.client.is_channel(event.target()): return msg = event.arguments()[0] --- a/setup.py +++ b/setup.py @@ -17,16 +17,6 @@ install_requires = [ "PyStemmer>=1.2.0", - "python-irclib==0.4.8" - ], - - # The PyPI entry for python-irclib points at a SourceForge files - # page. These no longer work with pip's url discovery, as they - # append the string "/download" to each filename. I have uploaded - # python-irclib 0.4.8's zip file from SourceForge (unmodified) to - # the page below so that "pip install cobe" will work. - dependency_links = [ - "http://github.com/pteichman/python-irclib/downloads" ], classifiers = [ debian/patches/01_remove-argparse-from-install-requires.patch0000644000000000000000000000103112201525374021473 0ustar Description: Remove argparse from install_requires so dh_python2 shipped by python-defaults (2.7.2-10) won't generate dependencies of the form "python (>= 2.7) | python-argparse" since anyway only from python 2.7.3~rc2-1 egg-info metadata for argparse are shipped. Author: Daniele Tricoli Forwarded: not-needed Last-Update: 2013-08-09 --- a/setup.py +++ b/setup.py @@ -17,7 +17,6 @@ install_requires = [ "PyStemmer==1.2.0", - "argparse==1.2.1", "python-irclib==0.4.8" ], debian/patches/02_relaxed-versioned-dependencies.patch0000644000000000000000000000052612244437405020213 0ustar Description: Relaxed versioned dependencies. Author: Daniele Tricoli Forwarded: not-needed Last-Update: 2013-08-09 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ test_suite = "tests", install_requires = [ - "PyStemmer==1.2.0", + "PyStemmer>=1.2.0", "python-irclib==0.4.8" ], debian/source/0000755000000000000000000000000011770437403010474 5ustar debian/source/format0000644000000000000000000000001411732130310011663 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000000233412244437463011053 0ustar python-cobe (2.1.0-1) unstable; urgency=low [ Jakub Wilk ] * Use canonical URIs for Vcs-* fields. [ Daniele Tricoli ] * New upstream release * Switched to pybuild - Disabled tests since they are not shipped in source package * debian/clean - Removed since pybuild already removes *.egg-info/* in clean target * debian/compat - Bumped debhelper compatibility level to 9 * debian/control - Bumped debhelper B-D to (>= 9) - Removed python-coverage and python-nose from B-D since tests are not shipped in source package - Bumped Standards-Version to 3.9.5 (no changes needed) * debian/copyright - Updated copyright years * debian/patches/01_remove-argparse-from-install-requires.patch - Refreshed * debian/patches/02_relaxed-versioned-dependencies.patch - Refreshed * debian/patches/03_use_python-irc_instead_of_python-irclib.patch - Use python-irc instead of python-irclib (Closes: #719113) * debian/watch - Switched download URL to https -- Daniele Tricoli Sat, 23 Nov 2013 18:27:31 +0100 python-cobe (2.0.2-1) unstable; urgency=low * Initial release (Closes: #600515) -- Daniele Tricoli Mon, 07 May 2012 23:16:30 +0200 debian/docs0000644000000000000000000000000711732130310010025 0ustar README