Cleanup in preparation for release. Add docstrings, remove basically empty _constants...
[python-collate.git] / README.txt
1 This module is unsuitable for real-world use at this time.
2
3 pycollate - Collation algorithms for Python
4 -------------------------------------------
5
6 pycollate is an interface to various collation algorithms for Python.
7
8 Supported backends:
9 - icu - Based on the IBM ICU toolkit and Jim Fulton's zope.ucol.
10 - syslocale - Native OS collation routines.
11 - codepoint - Raw Unicode codepoint comparison
12
13 The different backends have varying features and behaviors; which one
14 is best depends on your goals. A specific backend can be used, or a
15 "best" backend is chosen by default.
16
17 pycollate also provides tools to perform word-wise and numeric sorts.
18
19 pycollate, as with all Unicode collation tools, is a work in progress.
20
21 Installing
22 ----------
23 $ sudo apt-get install python-pyrex libicu-dev
24 $ ./setup.py build
25 $ sudo ./setup.py install
26
27 Example
28 -------
29 import collate
30 strings = file("contents.txt").read().decode("utf-8").splitlines()
31 strings.sort(key=collate.key)
32
33 License
34 -------
35
36 icu/_icu.pyx:
37
38 Copyright (c) 2004 Zope Corporation and Contributors.
39 All Rights Reserved.
40
41 This software is subject to the provisions of the Zope Public License,
42 Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
43 THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
44 WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
45 WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
46 FOR A PARTICULAR PURPOSE.
47
48 All else:
49
50 Copyright 2010 Joe Wreschnig
51
52 Permission is hereby granted, free of charge, to any person obtaining a copy
53 of this software and associated documentation files (the "Software"), to deal
54 in the Software without restriction, including without limitation the rights
55 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
56 copies of the Software, and to permit persons to whom the Software is
57 furnished to do so, subject to the following conditions:
58
59 The above copyright notice and this permission notice shall be included in
60 all copies or substantial portions of the Software.
61
62 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
63 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
64 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
65 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
66 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
67 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
68 THE SOFTWARE.