Skip to content

Commit cd52db0

Browse files
committed
Prepare v1.12.0 for release
1 parent 3d12af0 commit cd52db0

5 files changed

Lines changed: 76 additions & 61 deletions

File tree

Changes.md

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,55 @@
11
Revision history for the Python package RiveScript.
22

3+
1.12.0 May 10 2016
4+
- Add support for nested arrays, like `!array colors = @rgb white black`
5+
(PR #22)
6+
37
1.10.0 Feb 16 2016
4-
- Add configurable `unicode_punctuation` attribute to strip out punctuation
5-
when running in UTF-8 mode.
8+
- Add configurable `unicode_punctuation` attribute to strip out punctuation
9+
when running in UTF-8 mode.
610

711
1.8.1 Nov 19 2015
8-
- Add `@` to the list of characters that disqualifies a trigger from being
9-
considered "atomic"
12+
- Add `@` to the list of characters that disqualifies a trigger from being
13+
considered "atomic"
1014

1115
1.8.0 Oct 10 2015
12-
- New algorithm for handling variable tags (<get>, <set>, <add>, <sub>,
13-
<mult>, <div>, <bot> and <env>) that allows for iterative nesting of
14-
these tags (for example, <set copy=<get orig>> will work now).
15-
- Fix sorting algorithm, so triggers with matching word counts will be
16-
sorted by length descending.
17-
- stream() function can accept a multiline string instead of an array
18-
- Speed optimization by precompiling as many regexps as possible (what was
19-
especially helpful was to precompile substitution and simple trigger
20-
regexps), taking the time-to-reply for the default brain from ~0.19s down
21-
to ~0.04s
22-
- Add support for `! local concat` option to override concatenation mode
23-
(file scoped)
24-
- Fix the regexp used when matching optionals so that the triggers don't match
25-
on inputs where they shouldn't. (RiveScript-JS issue #46)
16+
- New algorithm for handling variable tags (<get>, <set>, <add>, <sub>,
17+
<mult>, <div>, <bot> and <env>) that allows for iterative nesting of
18+
these tags (for example, <set copy=<get orig>> will work now).
19+
- Fix sorting algorithm, so triggers with matching word counts will be
20+
sorted by length descending.
21+
- stream() function can accept a multiline string instead of an array
22+
- Speed optimization by precompiling as many regexps as possible (what was
23+
especially helpful was to precompile substitution and simple trigger
24+
regexps), taking the time-to-reply for the default brain from ~0.19s down
25+
to ~0.04s
26+
- Add support for `! local concat` option to override concatenation mode
27+
(file scoped)
28+
- Fix the regexp used when matching optionals so that the triggers don't match
29+
on inputs where they shouldn't. (RiveScript-JS issue #46)
2630

2731
1.06 Nov 25 2014
28-
- Change package name from python-rivescript to simply rivescript.
29-
- Change from the GPLv2 license to the MIT license.
30-
- Add compatibility with Python 3.
31-
- Add Unicode support for RiveScript documents.
32-
- Prefer the .rive extension for RS documents over the old .rs extension.
33-
- Track filenames and line numbers when parsing RiveScript documents.
34-
- Add Perl object handler example.
35-
- Add current_user() method accessible from inside an object macro.
36-
- Add unit tests.
37-
- Add deparse() function that dumps the active memory state of the bot.
38-
- Add write() method that writes the active memory state back to disk as a
39-
.rive file (uses deparse()).
40-
- Bugfix with substitution placeholders.
41-
- Bugfix with the <input> and <reply> tags.
32+
- Change package name from python-rivescript to simply rivescript.
33+
- Change from the GPLv2 license to the MIT license.
34+
- Add compatibility with Python 3.
35+
- Add Unicode support for RiveScript documents.
36+
- Prefer the .rive extension for RS documents over the old .rs extension.
37+
- Track filenames and line numbers when parsing RiveScript documents.
38+
- Add Perl object handler example.
39+
- Add current_user() method accessible from inside an object macro.
40+
- Add unit tests.
41+
- Add deparse() function that dumps the active memory state of the bot.
42+
- Add write() method that writes the active memory state back to disk as a
43+
.rive file (uses deparse()).
44+
- Bugfix with substitution placeholders.
45+
- Bugfix with the <input> and <reply> tags.
4246

4347
1.01 May 20 2013
44-
- Small bugfix in _rot13 that caused crashes under certain circumstances.
45-
- Small bugfix regarding the {weight} tag and atomic triggers.
46-
- Restructure the RiveScript library (move rivescript.py into a package
47-
folder named 'rivescript', separate the interactive mode code into
48-
interactive.py)
48+
- Small bugfix in _rot13 that caused crashes under certain circumstances.
49+
- Small bugfix regarding the {weight} tag and atomic triggers.
50+
- Restructure the RiveScript library (move rivescript.py into a package
51+
folder named 'rivescript', separate the interactive mode code into
52+
interactive.py)
4953

5054
1.00 Apr 22 2012
51-
- Initial version of rivescript.py
55+
- Initial version of rivescript.py

README.md

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
[![Build Status](https://travis-ci.org/aichaos/rivescript-python.svg?branch=master)](https://travis-ci.org/aichaos/rivescript-python)
44

5-
## INTRODUCTION
5+
## Introduction
66

77
This is a RiveScript interpreter for the Python programming language. RiveScript
88
is a scripting language for chatterbots, making it easy to write
99
trigger/response pairs for building up a bot's intelligence.
1010

1111
This library is compatible with both Python 2 and Python 3.
1212

13-
## INSTALLATION
13+
## Installation
1414

1515
This module is available on [PyPI](https://pypi.python.org/) and can be
1616
installed via pip:
@@ -20,15 +20,15 @@ installed via pip:
2020
To install manually, download or clone the git repository and run
2121
`python setup.py install`
2222

23-
## EXAMPLES
23+
## Examples
2424

2525
There are examples available in the
2626
[eg/](https://github.com/aichaos/rivescript-python/tree/master/eg) directory of
2727
this project on GitHub that show how to interface with a RiveScript bot in a
2828
variety of ways--such as through the Twilio SMS API--and other code snippets and
2929
useful tricks.
3030

31-
## USAGE
31+
## Usage
3232

3333
The `rivescript` module can be executed as a stand-alone Python script, or
3434
included in other Python code. When executed directly, it launches an
@@ -57,7 +57,7 @@ while True:
5757
The scripts `example.py` and `example3.py` provide simple examples for using
5858
RiveScript as a library for Python 2 and 3, respectively.
5959

60-
## UTF-8 SUPPORT
60+
## UTF-8 Support
6161

6262
RiveScript supports Unicode but it is not enabled by default. Enable it by
6363
passing a `True` value for the `utf8` option in the constructor, or by using the
@@ -82,7 +82,7 @@ are converted (if needed) to Python's `unicode` data type. So, while it's
8282
good practice to make sure you're providing Unicode strings to the bot, the
8383
library will have you covered if you forget.
8484

85-
## JSON MODE
85+
## JSON Mode
8686

8787
The `rivescript` package, when run stand-alone, supports "JSON Mode", where
8888
you communicate with the bot using JSON. This is useful for third-party
@@ -94,13 +94,13 @@ Just run it like: `python rivescript --json /path/to/brain`
9494
Print a JSON encoded data structure into the standard input. The format should
9595
look like this:
9696

97-
{
98-
"username": "localuser",
99-
"message": "Hello bot!",
100-
"vars": {
101-
"name": "Aiden"
102-
}
103-
}
97+
{
98+
"username": "localuser",
99+
"message": "Hello bot!",
100+
"vars": {
101+
"name": "Aiden"
102+
}
103+
}
104104

105105
After sending this, you can send an `EOF` signal and the bot will respond with
106106
a JSON response and then exit. Or, you can keep the session open, by sending
@@ -110,18 +110,27 @@ interactions.
110110

111111
The bot's response will be formatted like so:
112112

113-
{
114-
"status": "ok",
115-
"reply": "Hello, human!",
116-
"vars": {
117-
"name": "Aiden"
118-
}
119-
}
113+
{
114+
"status": "ok",
115+
"reply": "Hello, human!",
116+
"vars": {
117+
"name": "Aiden"
118+
}
119+
}
120120

121121
The `status` will be `ok` on success, or `error` if there was an error. The
122122
`reply` is the bot's response (or an error message on error).
123123

124-
## LICENSE
124+
## Contributors
125+
126+
* [Noah Petherbridge](https://github.com/kirsle)
127+
* [Danilo Bargen](https://github.com/dbrgn)
128+
* [FujiMakoto](https://github.com/FujiMakoto)
129+
* [Julien Syx](https://github.com/Seraf)
130+
* [Pablo](https://github.com/flogiston)
131+
* [Peixuan (Shawn) Ding](https://github.com/dinever)
132+
133+
## License
125134

126135
```
127136
The MIT License (MIT)

python-rivescript.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
%global desc A scripting language to make it easy to write responses for a chatterbot.
44

55
Name: python-%{srcname}
6-
Version: 1.10.0
6+
Version: 1.12.0
77
Release: 1%{?dist}
88
Summary: %{sum}
99

rivescript/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
__docformat__ = 'plaintext'
4040

4141
__all__ = ['rivescript']
42-
__version__ = '1.10.0'
42+
__version__ = '1.12.0'
4343

4444
from .rivescript import RiveScript, RiveScriptError, NoMatchError, NoReplyError,\
4545
ObjectError, DeepRecursionError, NoDefaultRandomTopicError, RepliesNotSortedError

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
classifiers = [
1919
'License :: OSI Approved :: MIT License',
2020
'Programming Language :: Python',
21+
'Programming Language :: Python :: 2',
22+
'Programming Language :: Python :: 3',
2123
'Development Status :: 5 - Production/Stable',
2224
'Intended Audience :: Developers',
2325
'Topic :: Scientific/Engineering :: Artificial Intelligence',

0 commit comments

Comments
 (0)