[Python-modules-commits] [pygtkspellcheck] 06/19: Import pygtkspellcheck_4.0.5.orig.tar.gz

Raphaël Hertzog hertzog at moszumanska.debian.org
Mon Nov 21 21:02:37 UTC 2016


This is an automated email from the git hooks/post-receive script.

hertzog pushed a commit to branch master
in repository pygtkspellcheck.

commit c49a63efc56d8ce79ac00b994c15b5be9812353f
Author: Raphaël Hertzog <hertzog at debian.org>
Date:   Mon Nov 21 20:57:09 2016 +0100

    Import pygtkspellcheck_4.0.5.orig.tar.gz
---
 MANIFEST.in                                       |   7 +-
 PKG-INFO                                          |   6 +-
 README.md                                         |  38 ---
 README.rst                                        |  71 ++++++
 doc/metadata/documentation.rst                    |  62 +++++
 doc/metadata/metadata.py                          | 102 ++++++++
 doc/metadata/pypi.rst                             |  85 +++++++
 doc/metadata/readme.md                            |  25 ++
 doc/metadata/screenshot.png                       | Bin 0 -> 59743 bytes
 doc/metadata/website.md                           |  71 ++++++
 doc/pypi/page.rst                                 |  83 ++++--
 doc/screenshots/screenshot.png                    | Bin 0 -> 59743 bytes
 doc/source/conf.py                                |   2 +
 doc/source/index.rst                              | 139 ++++------
 doc/source/oxt_import.rst                         |   4 -
 doc/source/spellchecker.rst                       |   5 -
 l10n/compile_mo.py                                |  44 ----
 l10n/extract_strings.sh                           |   4 -
 l10n/msgfmt2.py                                   | 220 ----------------
 l10n/msgfmt3.py                                   | 236 -----------------
 l10n/pygtkspellcheck/de.po                        |  69 -----
 l10n/pygtkspellcheck/en.po                        |  70 ------
 l10n/pygtkspellcheck/es.po                        |  70 ------
 locale/de/pygtkspellcheck.mo                      | Bin 0 -> 1425 bytes
 locale/de/pygtkspellcheck.po                      |  58 +++++
 locale/en/pygtkspellcheck.mo                      | Bin 0 -> 513 bytes
 locale/en/pygtkspellcheck.po                      |  60 +++++
 locale/es/pygtkspellcheck.mo                      | Bin 0 -> 815 bytes
 locale/es/pygtkspellcheck.po                      |  56 +++++
 setup.cfg                                         |   5 +
 setup.py                                          | 184 ++++++++------
 src/gtkspellcheck/__init__.py                     |  32 ++-
 src/gtkspellcheck/oxt_extract.py                  | 294 ++++++++++++++++++++++
 src/gtkspellcheck/oxt_import.py                   | 190 --------------
 src/gtkspellcheck/spellcheck.py                   | 291 ++++++++++++++-------
 PKG-INFO => src/pygtkspellcheck.egg-info/PKG-INFO |   6 +-
 src/pygtkspellcheck.egg-info/SOURCES.txt          |  39 +++
 src/pygtkspellcheck.egg-info/dependency_links.txt |   1 +
 src/pygtkspellcheck.egg-info/requires.txt         |   4 +
 src/pygtkspellcheck.egg-info/top_level.txt        |   2 +
 src/pylocales/__init__.py                         |  34 ++-
 src/pylocales/locales.py                          |  54 ++--
 42 files changed, 1417 insertions(+), 1306 deletions(-)

diff --git a/MANIFEST.in b/MANIFEST.in
index 046d0a7..c970dff 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -3,8 +3,5 @@ include MANIFEST.in
 include README.md
 graft examples
 graft doc
-graft l10n
-prune l10n/mo
-prune l10n/isos
-recursive-exclude l10n *.pyc
-
+graft locale
+prune doc/build
\ No newline at end of file
diff --git a/PKG-INFO b/PKG-INFO
index 09da96a..5c8dcf4 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,13 +1,13 @@
 Metadata-Version: 1.1
 Name: pygtkspellcheck
-Version: 3.0
-Summary: A simple but quite powerful Python spell checking library for GtkTextViews based on Enchant.
+Version: 4.0.5
+Summary: a simple but quite powerful Python spell checking library for GtkTextViews based on Enchant
 Home-page: http://koehlma.github.com/projects/pygtkspellcheck.html
 Author: Maximilian Köhl & Carlos Jenkins
 Author-email: linuxmaxi at googlemail.com & carlos at jenkins.co.cr
 License: GPLv3+
 Download-URL: https://github.com/koehlma/pygtkspellcheck/tarball/master
-Description: It supports both Gtk's Python bindings, PyGObject andPyGtk, and for both Python 2 and 3 with automatic switchingand binding autodetection. For automatic translation of theuser interface it can use GEdit's translation files.
+Description: A simple but quite powerful spellchecking library written in pure Python for Gtk based on Enchant. It supports PyGObject as well as PyGtk for Python 2 and 3 with automatic switching and binding detection. For automatic translation of the user interface it can use Gedit’s translation files.
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Environment :: X11 Applications :: Gnome
diff --git a/README.md b/README.md
deleted file mode 100644
index 567a2cd..0000000
--- a/README.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# About
-PyGtkSpellCheck is a spellchecking library written in pure Python for Gtk based 
-on [Enchant](http://www.abisource.com/projects/enchant/).
-It supports both Gtk's Python bindings,
-[PyGObject](https://live.gnome.org/PyGObject/) and
-[PyGtk](http://www.pygtk.org/), and for both Python 
-2 and 3 with automatic switching and binding autodetection. For automatic 
-translation of the user interface it can use GEdit's translation files.
-
-# Features
-* Localized names of the available languages.
-* Supports word, line and multiline ignore regexes.
-* Support for ignore custom tags on Gtk's TextBuffer.
-* Enable and disable of spellchecking with preferences memory.
-* Support for hotswap of Gtk's TextBuffers.
-* PyGObject and PyGtk compatible with automatic detection.
-* Python 2 and 3 support.
-* As Enchant, support for Hunspell (LibreOffice) and Aspell (GNU) dictionaries.
-
-# Documentation
-You can find the documentation at http://pygtkspellcheck.readthedocs.org/ .
-
-# Homepage
-You can find the project page at http://koehlma.github.com/projects/pygtkspellcheck.html .
-
-# License 
-This program 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.
-
-This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..13d6551
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,71 @@
+Python GTK Spellcheck
+=====================
+
+|pypi| |docs|
+
+Python GTK Spellcheck is a simple but quite powerful spellchecking library for GTK written
+in pure Python. It's spellchecking component is based on Enchant_ and it supports both GTK
+bindings (PyGObject_, PyGTK_) as well as Python 3 and 2.
+
+
+Features
+--------
+- **spellchecking** based on Enchant_ for `GtkTextViews`
+- support for word, line and multiple line **ignore regular expressions**
+- PyGObject_ and PyGtk_ (automatic detection) as well as Python 3 and 2 compatible
+- localized names of the available languages based on ISO-Codes_
+- support for custom ignore tags and hot swap of `GtkTextBuffers`
+- enable and disable of spellchecking with preferences memory
+- support for Hunspell (LibreOffice) and Aspell (GNU) dictionaries
+- supports extraction of dictionaries out of LibreOffice extension files
+- legacy API for Python GtkSpell
+
+.. image:: https://raw.githubusercontent.com/koehlma/pygtkspellcheck/master/doc/screenshots/screenshot.png
+    :alt: Python GTK Spellcheck Screenshot
+    :align: center
+
+.. _Enchant: http://www.abisource.com/projects/enchant/
+.. _PyGObject: https://live.gnome.org/PyGObject/
+.. _PyGTK: http://www.pygtk.org/
+.. _ISO-Codes: http://pkg-isocodes.alioth.debian.org/
+
+
+Showcase
+--------
+- `Nested Editor`_: “Specialized editor for structured documents.”
+- `Cherry Tree`_: “A hierarchical note taking application, […].”
+- `Zim`_: “Zim is a graphical text editor used to maintain a collection of wiki pages.”
+- `REMARKABLE`_: “The best markdown editor for Linux and Windows.”
+- `RedNotebook`_: “RedNotebook is a modern journal.”
+- `Reportbug`_: “Reports bugs in the Debian distribution.”
+- `UberWriter`_: “UberWriter is a writing application for markdown.”
+
+.. _Nested Editor: http://nestededitor.sourceforge.net/about.html
+.. _Cherry Tree: http://www.giuspen.com/cherrytree/
+.. _Zim: http://zim-wiki.org/
+.. _REMARKABLE: http://remarkableapp.github.io/
+.. _RedNotebook: http://rednotebook.sourceforge.net/
+.. _Reportbug: https://packages.debian.org/stretch/reportbug
+.. _UberWriter: http://uberwriter.wolfvollprecht.de/
+
+
+Versions
+--------
+Version numbers follow `Semantic Versioning`_. However version change from 3 to 4 pertains
+only API incompatible changes in `oxt_extract` and not the spellchecking component.
+
+.. _Semantic Versioning: http://semver.org/
+
+
+Documentation
+-------------
+The documentation is available at `Read the Docs`_.
+
+.. _Read the Docs: http://pygtkspellcheck.readthedocs.org/
+
+
+.. |pypi| image:: https://img.shields.io/pypi/v/pygtkspellcheck.svg?style=flat-square&label=latest%20version
+    :target: https://pypi.python.org/pypi/pygtkspellcheck
+
+.. |docs| image:: https://readthedocs.org/projects/pygtkspellcheck/badge/?version=latest&style=flat-square
+    :target: https://pygtkspellcheck.readthedocs.org/en/latest/
diff --git a/doc/metadata/documentation.rst b/doc/metadata/documentation.rst
new file mode 100644
index 0000000..aa1ab72
--- /dev/null
+++ b/doc/metadata/documentation.rst
@@ -0,0 +1,62 @@
+{% names['full'] %}
+{% '=' * len(names['full']) %}
+{% linkify(description['long'], 'rst') %}
+
+Features
+--------
+{% '- ' + '\n- '.join(features) %}
+
+API Reference
+-------------
+.. autoclass:: gtkspellcheck.spellcheck.SpellChecker
+   :members:
+   
+.. autoclass:: gtkspellcheck.spellcheck.NoDictionariesFound
+
+.. autoclass:: gtkspellcheck.spellcheck.NoGtkBindingFound
+	
+.. autofunction:: pylocales.code_to_name
+
+.. autofunction:: gtkspellcheck.oxt_extract.extract
+
+.. autofunction:: gtkspellcheck.oxt_extract.batch_extract
+
+.. autoclass:: gtkspellcheck.oxt_extract.BadXml
+
+.. autoclass:: gtkspellcheck.oxt_extract.BadExtensionFile
+
+.. autoclass:: gtkspellcheck.oxt_extract.ExtractPathIsNoDirectory
+
+Development
+-----------
+Development happens at `GitHub`_.
+
+.. _GitHub: {% development %}
+
+	``git clone git://github.com/koehlma/pygtkspellcheck.git``
+
+Download last sources in a `ZIP`_ or `Tarball`_ file.
+
+.. _ZIP: https://github.com/koehlma/pygtkspellcheck/zipball/master
+.. _Tarball: https://github.com/koehlma/pygtkspellcheck/tarball/master
+
+Website
+-------
+Checkout the `official project website`_ for additional information.
+
+.. _official project website: {% homepage %}
+
+Examples
+--------
+- `PyGObject Simple Example`_
+- `PyGtk Simple Example`_
+
+.. _PyGObject Simple Example: https://github.com/koehlma/pygtkspellcheck/blob/master/examples/simple_pygobject.py
+.. _PyGtk Simple Example: https://github.com/koehlma/pygtkspellcheck/blob/master/examples/simple_pygtk.py
+
+
+License
+-------
+{% names['short'] %} is released under `GPLv3`_ or at your opinion any later version.
+
+.. _GPLv3: https://www.gnu.org/licenses/gpl-3.0.html    
\ No newline at end of file
diff --git a/doc/metadata/metadata.py b/doc/metadata/metadata.py
new file mode 100644
index 0000000..61bbff1
--- /dev/null
+++ b/doc/metadata/metadata.py
@@ -0,0 +1,102 @@
+# -*- coding:utf-8 -*-
+#
+# Copyright (C) 2012, Maximilian Köhl <linuxmaxi at googlemail.com>
+#
+# This program 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.
+#
+# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+
+import os.path
+import re
+
+__path__ = os.path.dirname(__file__)
+
+names = {'full': 'Python GTK Spellchecker',
+         'short': 'PyGtkSpellcheck',
+         'url': 'pygtkspellcheck'}
+
+features = ['localized names of the available languages',
+            'supports word, line and multiple line ignore regular expressions',
+            'supports ignore custom tags on GtkTextBuffer',
+            'enable and disable of spellchecking with preferences memory',
+            'supports hotswap of GtkTextBuffers',
+            'PyGObject and PyGtk compatible with automatic detection',
+            'Python 2 and 3 support'
+            'as Enchant, support for Hunspell (LibreOffice) and Aspell (GNU) dictionaries',
+            'extract dictionaries out of LibreOffice extension files',
+            'legacy API for Python GtkSpell']
+
+description = {'short': 'a simple but quite powerful Python spell checking library for GtkTextViews based on Enchant',
+               'long': ('A simple but quite powerful spellchecking library written '
+                        'in pure Python for Gtk based on Enchant. It supports PyGObject '
+                        'as well as PyGtk for Python 2 and 3 with automatic switching '
+                        'and binding detection. For automatic translation of the user '
+                        'interface it can use Gedit’s translation files.')}
+
+screenshot = os.path.join(__path__, 'screenshot.png')
+
+development = 'https://github.com/koehlma/pygtkspellcheck'
+
+documentation = 'http://pygtkspellcheck.readthedocs.org/'
+
+homepage = 'http://koehlma.github.com/projects/pygtkspellcheck.html'
+
+links = {'Enchant': 'http://www.abisource.com/projects/enchant/',
+         'PyGObject': 'https://live.gnome.org/PyGObject/',
+         'PyGtk': 'http://www.pygtk.org/'}
+
+with open(os.path.join(__path__, 'readme.md'), 'rb') as _readme:
+    readme = _readme.read().decode('utf-8')
+    
+with open(os.path.join(__path__, 'pypi.rst'), 'rb') as _pypi:
+    pypi = _pypi.read().decode('utf-8')
+    
+with open(os.path.join(__path__, 'documentation.rst'), 'rb') as _documentation:
+    docs = _documentation.read().decode('utf-8')
+
+with open(os.path.join(__path__, 'website.md'), 'rb') as _website:
+    website = _website.read().decode('utf-8')
+
+replace = re.compile('\{%\s*(.+?)\s*%\}')
+
+def linkify(text, format):
+    if format == 'markdown':
+        for name, url in links.items():
+            text = text.replace(name, '[{}]({})'.format(name, url))
+    elif format == 'rst':
+        for name in links:
+            text = text.replace(name, '`{}`_'.format(name))
+        text += '\n'
+        for name, url in links.items():
+            if text.find(name) > -1:
+                text += '\n.. _{}: {}'.format(name, url)            
+    return text
+
+def template(match):
+    code = match.group(1)
+    return str(eval(code))    
+
+if __name__ == '__main__':
+    print('creating readme')
+    with open(os.path.join(__path__, '..', '..', 'README.md'), 'wb') as _readme:
+        _readme.write(replace.sub(template, readme).encode('utf-8'))
+    print('creating pypi')
+    with open(os.path.join(__path__, '..', 'pypi', 'page.rst'), 'wb') as _pypi:
+        _pypi.write(replace.sub(template, pypi).encode('utf-8'))
+    print('creating documentation')
+    with open(os.path.join(__path__, '..', 'source', 'index.rst'), 'wb') as _documentation:
+        _documentation.write(replace.sub(template, docs).encode('utf-8'))
+    koehlma_github = os.path.join(__path__, '..', '..', '..', 'koehlma.github.com')
+    if os.path.exists(koehlma_github):
+        print('creating website')
+        with open(os.path.join(koehlma_github, 'projects', 'pygtkspellcheck.md'), 'wb') as _website:
+            _website.write(replace.sub(template, website).encode('utf-8'))
\ No newline at end of file
diff --git a/doc/metadata/pypi.rst b/doc/metadata/pypi.rst
new file mode 100644
index 0000000..aebb83c
--- /dev/null
+++ b/doc/metadata/pypi.rst
@@ -0,0 +1,85 @@
+{% names['full'] %}
+{% '=' * len(names['full']) %}
+{% linkify(description['long'], 'rst') %}
+
+Features
+========
+{% '- ' + '\n- '.join(features) %}
+
+Documentation
+=============
+The documentation is available at `Read the Docs`_.
+
+.. _Read the Docs: {% documentation %}
+
+Distribution
+============
+Cheeseshop
+^^^^^^^^^^
+`PyPI package`_ is available:
+
+.. _PyPI package: http://pypi.python.org/pypi/pygtkspellcheck/
+
+::
+
+    pip install pygtkspellcheck
+
+Archlinux - AUR
+^^^^^^^^^^^^^^^
+Python 3
+--------
+
+::
+    pacman -S python-gtkspellcheck
+
+Python 2
+--------
+
+::
+    pacman -S python2-gtkspellcheck
+
+Ubuntu / Debian
+^^^^^^^^^^^^^^^
+Ubuntu - Repository
+-------------------
+
+::
+
+    sudo add-apt-repository ppa:koehlma/packages
+    sudo apt-get update
+
+Debian - Repository
+-------------------
+
+::
+
+    sudo su
+    echo "deb http://ppa.launchpad.net/koehlma/packages/ubuntu precise main" >> /etc/apt/sources.list
+    apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 775B7DF6
+    apt-get update
+
+Python 2
+--------
+
+::
+    
+    sudo apt-get install python-gtkspellcheck
+
+Python 3
+--------
+
+::
+
+    sudo apt-get install python3-gtkspellcheck
+
+Development
+^^^^^^^^^^^
+Development happens at `GitHub`_.
+
+.. _GitHub: {% development %}
+
+License
+^^^^^^^
+{% names['short'] %} is released under `GPLv3`_ or at your opinion any later version.
+
+.. _GPLv3: https://www.gnu.org/licenses/gpl-3.0.html
diff --git a/doc/metadata/readme.md b/doc/metadata/readme.md
new file mode 100644
index 0000000..4c61641
--- /dev/null
+++ b/doc/metadata/readme.md
@@ -0,0 +1,25 @@
+## About
+{% linkify(description['long'], 'markdown') %}
+
+## Features
+{% '* ' + '\n* '.join(features) %}
+
+## Documentation
+The documentation is available at [Read the Docs]({% documentation %}).
+
+## Website
+Checkout the [official project website]({% homepage %}).
+
+## License
+This program 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.
+
+This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
diff --git a/doc/metadata/screenshot.png b/doc/metadata/screenshot.png
new file mode 100644
index 0000000..1075b12
Binary files /dev/null and b/doc/metadata/screenshot.png differ
diff --git a/doc/metadata/website.md b/doc/metadata/website.md
new file mode 100644
index 0000000..f5a02bb
--- /dev/null
+++ b/doc/metadata/website.md
@@ -0,0 +1,71 @@
+---
+layout: default
+title: Python GTK Spellchecker
+repository: pygtkspellcheck
+downloads:
+- class: archlinux
+  url: https://github.com/downloads/koehlma/pygtkspellcheck/python-gtkspellcheck-3.0-1-any.pkg.tar.xz
+  text: Python 3
+- class: archlinux
+  url: https://github.com/downloads/koehlma/pygtkspellcheck/python2-gtkspellcheck-3.0-1-any.pkg.tar.xz
+  text: Python 2
+- class: debian
+  url: https://github.com/downloads/koehlma/pygtkspellcheck/python3-gtkspellcheck_3.0-1_all.deb
+  text: Python 3
+- class: debian
+  url: https://github.com/downloads/koehlma/pygtkspellcheck/python-gtkspellcheck_3.0-1_all.deb
+  text: Python 2
+---
+
+{% linkify(description['long'], 'markdown') %}
+
+# Features
+{% '* ' + '\n* '.join(features) %}
+
+# Screenshots
+![Screenshot](/projects/pygtkspellcheck/screenshot.png)
+
+## Documentation
+The documentation is available at [Read the Docs]({% documentation %}).
+
+# Examples
+* [PyGObject Simple Example](https://github.com/koehlma/pygtkspellcheck/blob/master/examples/simple_pygobject.py)
+* [PyGtk Simple Example](https://github.com/koehlma/pygtkspellcheck/blob/master/examples/simple_pygtk.py)
+
+# Distribution
+## Cheeseshop
+[PyPI package](http://pypi.python.org/pypi/pygtkspellcheck/) is available: 
+
+    pip install pygtkspellcheck
+
+## Archlinux - AUR
+### Python 3
+[AUR Package](https://aur.archlinux.org/packages.php?ID=61200)
+
+    yaourt -S python-gtkspellcheck
+
+### Python 2
+[AUR Package](https://aur.archlinux.org/packages.php?ID=61199)
+
+    yaourt -S python2-gtkspellcheck
+
+## Ubuntu / Debian
+### Ubuntu - Repository
+
+    sudo add-apt-repository ppa:koehlma/packages
+    sudo apt-get update
+
+### Debian - Repository
+    
+    sudo su
+    echo "deb http://ppa.launchpad.net/koehlma/packages/ubuntu precise main" >> /etc/apt/sources.list
+    apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 775B7DF6
+    apt-get update
+
+### Python 2
+    
+    sudo apt-get install python-gtkspellcheck
+
+### Python 3
+
+    sudo apt-get install python3-gtkspellcheck
diff --git a/doc/pypi/page.rst b/doc/pypi/page.rst
index 0b0c66c..995c241 100644
--- a/doc/pypi/page.rst
+++ b/doc/pypi/page.rst
@@ -1,34 +1,73 @@
-Python GTK Spellcheck
-=====================
-PyGtkSpellcheck is a simple but quite powerful spellchecking library written in
-pure Python for Gtk based on Enchant_. 
-It supports PyGObject_ as well as PyGtk_ for Python 2 and 3 with automatic
-switching and binding detection.
-For automatic translation of the user interface it can use Gedit’s translation
-files.
+Python GTK Spellchecker
+=======================
+A simple but quite powerful spellchecking library written in pure Python for Gtk based on `Enchant`_. It supports `PyGObject`_ as well as `PyGtk`_ for Python 2 and 3 with automatic switching and binding detection. For automatic translation of the user interface it can use Gedit’s translation files.
 
-.. _Enchant: http://www.abisource.com/projects/enchant/
 .. _PyGObject: https://live.gnome.org/PyGObject/
+.. _Enchant: http://www.abisource.com/projects/enchant/
 .. _PyGtk: http://www.pygtk.org/
 
 Features
-^^^^^^^^
-- Localized names of the available languages.
-- Supports word, line and multiline ignore regexes.
-- Supports ignore custom tags on Gtk's TextBuffer.
-- Enable and disable of spellchecking with preferences memory.
-- Supports hotswap of Gtk's TextBuffers.
-- PyGObject and PyGtk compatible with automatic detection.
-- Python 2 and 3 support.
-- As Enchant, support for Hunspell (LibreOffice) and Aspell (GNU) dictionaries.
-
+========
+- localized names of the available languages
+- supports word, line and multiple line ignore regular expressions
+- supports ignore custom tags on GtkTextBuffer
+- enable and disable of spellchecking with preferences memory
+- supports hotswap of GtkTextBuffers
+- PyGObject and PyGtk compatible with automatic detection
+- Python 2 and 3 supportas Enchant, support for Hunspell (LibreOffice) and Aspell (GNU) dictionaries
+- extract dictionaries out of LibreOffice extension files
+- legacy API for Python GtkSpell
 
 Documentation
-^^^^^^^^^^^^^
-You can find the documentation at `Read the Docs`_.
+=============
+The documentation is available at `Read the Docs`_.
 
 .. _Read the Docs: http://pygtkspellcheck.readthedocs.org/
 
+Distribution
+============
+Cheeseshop
+^^^^^^^^^^
+`PyPI package`_ is available:
+
+.. _PyPI package: http://pypi.python.org/pypi/pygtkspellcheck/
+
+::
+
+    pip install pygtkspellcheck
+
+Archlinux - AUR
+^^^^^^^^^^^^^^^
+Python 3
+--------
+
+::
+
+    pacman -S python-gtkspellcheck
+
+Python 2
+--------
+
+::
+
+    pacman -S python2-gtkspellcheck
+
+Ubuntu / Debian
+^^^^^^^^^^^^^^^
+Python 2
+--------
+
+::
+    
+    sudo apt-get install python-gtkspellcheck
+
+Python 3
+--------
+
+::
+
+    sudo apt-get install python3-gtkspellcheck
+
 Development
 ^^^^^^^^^^^
 Development happens at `GitHub`_.
@@ -39,4 +78,4 @@ License
 ^^^^^^^
 PyGtkSpellcheck is released under `GPLv3`_ or at your opinion any later version.
 
-.. _GPLv3: https://www.gnu.org/licenses/gpl-3.0.html
\ No newline at end of file
+.. _GPLv3: https://www.gnu.org/licenses/gpl-3.0.html
diff --git a/doc/screenshots/screenshot.png b/doc/screenshots/screenshot.png
new file mode 100644
index 0000000..1075b12
Binary files /dev/null and b/doc/screenshots/screenshot.png differ
diff --git a/doc/source/conf.py b/doc/source/conf.py
index f2ba938..5810273 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -47,7 +47,9 @@ for mod_name in MOCK_MODULES:
     except:
         sys.modules[mod_name] = Mock()
 
+sys.modules['gtk'] = None
 import gtkspellcheck as m
+import pylocales
 
 start_file = 'index'
 
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 586c1d3..8cbd958 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -1,117 +1,74 @@
-Python GTK Spellcheck
-=====================
+Python GTK Spellchecker
+=======================
+A simple but quite powerful spellchecking library written in pure Python for Gtk based on `Enchant`_. It supports `PyGObject`_ as well as `PyGtk`_ for Python 2 and 3 with automatic switching and binding detection. For automatic translation of the user interface it can use Gedit’s translation files.
 
-PyGtkSpellCheck is a spellchecking library written in pure Python for Gtk based 
-on Enchant_.
-It supports both Gtk's Python bindings, PyGObject_ and PyGtk_, and for both
-Python 2 and 3 with automatic switching and binding autodetection. For
-automatic translation of the user interface it can use GEdit's translation
-files.
-
-.. _Enchant: http://www.abisource.com/projects/enchant/
 .. _PyGObject: https://live.gnome.org/PyGObject/
+.. _Enchant: http://www.abisource.com/projects/enchant/
 .. _PyGtk: http://www.pygtk.org/
 
-
 Features
 --------
+- localized names of the available languages
+- supports word, line and multiple line ignore regular expressions
+- supports ignore custom tags on GtkTextBuffer
+- enable and disable of spellchecking with preferences memory
+- supports hotswap of GtkTextBuffers
+- PyGObject and PyGtk compatible with automatic detection
+- Python 2 and 3 supportas Enchant, support for Hunspell (LibreOffice) and Aspell (GNU) dictionaries
+- extract dictionaries out of LibreOffice extension files
+- legacy API for Python GtkSpell
 
-- Localized names of the available languages.
-- Supports word, line and multiline ignore regexes.
-- Supports ignore custom tags on Gtk's TextBuffer.
-- Enable and disable of spellchecking with preferences memory.
-- Supports hotswap of Gtk's TextBuffers.
-- PyGObject and PyGtk compatible with automatic detection.
-- Python 2 and 3 support.
-- As Enchant, support for Hunspell (LibreOffice) and Aspell (GNU) dictionaries.
-
-
-Download
---------
-
-Source distribution
-^^^^^^^^^^^^^^^^^^^
-
-PyPI package available at: http://pypi.python.org/pypi/pygtkspellcheck/
+API Reference
+-------------
+.. autoclass:: gtkspellcheck.spellcheck.SpellChecker
+   :members:
+   
+.. autoclass:: gtkspellcheck.spellcheck.NoDictionariesFound
 
-    ``pip install pygtkspellcheck``
+.. autoclass:: gtkspellcheck.spellcheck.NoGtkBindingFound
 
-Ubuntu/Debian
-^^^^^^^^^^^^^
 
-Install packages:
+Deprecated API Reference
+------------------------
+.. warning::
 
-- Python 3:
-    - ``sudo apt-get install python3-gtkspellcheck``
-    - https://github.com/downloads/koehlma/pygtkspellcheck/python3-gtkspellcheck_3.0-1_all.deb
+   The following functions are deprecated since version 4.0.5, they will be removed
+   from "pygtkspellcheck" in 5.0.
 
-- Python 2:
-    - ``sudo apt-get install python-gtkspellcheck``
-    - https://github.com/downloads/koehlma/pygtkspellcheck/python-gtkspellcheck_3.0-1_all.deb
 
-- Documentation:
-    - ``sudo apt-get install python-gtkspellcheck-doc``
-    - https://github.com/downloads/koehlma/pygtkspellcheck/python-gtkspellcheck-doc_3.0-1_all.deb
+.. autofunction:: pylocales.code_to_name
 
-Archlinux
-^^^^^^^^^
+.. autofunction:: gtkspellcheck.oxt_extract.extract
 
-Available in the `Archlinux User Repository`_:
+.. autofunction:: gtkspellcheck.oxt_extract.batch_extract
 
-.. _Archlinux User Repository: https://aur.archlinux.org/
+.. autoclass:: gtkspellcheck.oxt_extract.BadXml
 
-- Python 3:
-    - ``yaourt -S python-gtkspellcheck``
-    - https://aur.archlinux.org/packages.php?ID=61200
-    - https://github.com/downloads/koehlma/pygtkspellcheck/python-gtkspellcheck-3.0-1-any.pkg.tar.xz
+.. autoclass:: gtkspellcheck.oxt_extract.BadExtensionFile
 
-- Python 2:
-    - ``yaourt -S python2-gtkspellcheck``
-    - https://aur.archlinux.org/packages.php?ID=61199
-    - https://github.com/downloads/koehlma/pygtkspellcheck/python2-gtkspellcheck-3.0-1-any.pkg.tar.xz
+.. autoclass:: gtkspellcheck.oxt_extract.ExtractPathIsNoDirectory
 
-Hacking
-^^^^^^^
+Development
+-----------
+Development happens at `GitHub`_.
 
-Development repository is available at: https://github.com/koehlma/pygtkspellcheck
+.. _GitHub: https://github.com/koehlma/pygtkspellcheck
 
-    ``git clone git://github.com/koehlma/pygtkspellcheck.git``
+	``git clone git://github.com/koehlma/pygtkspellcheck.git``
 
-Or download last sources in a `ZIP`_ or `Tarball`_ file.
+Download last sources in a `ZIP`_ or `Tarball`_ file.
 
 .. _ZIP: https://github.com/koehlma/pygtkspellcheck/zipball/master
 .. _Tarball: https://github.com/koehlma/pygtkspellcheck/tarball/master
 
+Website
+-------
+Checkout the `official project website`_ for additional information.
 
-API Reference
--------------
-
-The main object is called Spellchecker and can be associated with any
-GtkTextView:
-
-.. toctree::
-   :maxdepth: 1
-
-   spellchecker
-
-This library also includes a utility module to unpack `LibreOffice .oxt
-extension dictionaries`_ (Hunspell). This is especially useful for MS Windows
-users to include dictionaries for this library. Use this to extract the
-Hunspell dictionaries out of the extension and then pass to the Spellchecker
-the path to the location of the extraction in the params argument with the key
-``enchant.myspell.dictionary.path``.
-
-.. _LibreOffice .oxt extension dictionaries: http://extensions.services.openoffice.org/dictionary
-
-.. toctree::
-   :maxdepth: 1
-
-   oxt_import
-
+.. _official project website: http://koehlma.github.com/projects/pygtkspellcheck.html
 
 Examples
 --------
-
 - `PyGObject Simple Example`_
 - `PyGtk Simple Example`_
 
@@ -121,16 +78,6 @@ Examples
 
 License
 -------
+PyGtkSpellcheck is released under `GPLv3`_ or at your opinion any later version.
 
-This program 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.
-
-This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+.. _GPLv3: https://www.gnu.org/licenses/gpl-3.0.html    
\ No newline at end of file
diff --git a/doc/source/oxt_import.rst b/doc/source/oxt_import.rst
deleted file mode 100644
index 820183e..0000000
--- a/doc/source/oxt_import.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-oxt_import module reference
-===========================
-
-.. autofunction:: gtkspellcheck.oxt_import.deflate_oxt
diff --git a/doc/source/spellchecker.rst b/doc/source/spellchecker.rst
deleted file mode 100644
index 83f3a0b..0000000
--- a/doc/source/spellchecker.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-SpellChecker class reference
-============================
-
-.. autoclass:: gtkspellcheck.spellcheck.SpellChecker
-   :members:
diff --git a/l10n/compile_mo.py b/l10n/compile_mo.py
deleted file mode 100755
index 8bf0984..0000000
--- a/l10n/compile_mo.py
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import sys
-import shutil
-
-where_am_i = os.path.normpath(os.path.dirname(os.path.abspath(os.path.realpath(__file__))))
-os.chdir(where_am_i)
-
-if sys.version_info.major == 3:
-    import msgfmt3 as msgfmt
-else:
-    import msgfmt2 as msgfmt
-
-def build_mo_files():
-    """Compile available localization files"""
-    
-    APP = 'pygtkspellcheck'
-    locale_dir = 'mo'
-    po_dir = 'pygtkspellcheck'
-
-    if os.path.exists(locale_dir):
-        shutil.rmtree(locale_dir)
-    os.mkdir(locale_dir)
-
-    available_langs = [f[:-3] for f in os.listdir(po_dir) if f.endswith('.po')]
-
-    print('Languages: {langs}'.format(langs=str(available_langs)))
-
-    for lang in available_langs:
-        po_file = os.path.join(po_dir, lang + '.po')
-        lang_dir = os.path.join(locale_dir, lang)
-        mo_dir = os.path.join(lang_dir, 'LC_MESSAGES')
-        mo_file = os.path.join(mo_dir, APP + '.mo')
-        
-        if not os.path.exists(mo_dir):
-            os.makedirs(mo_dir)
-        
-        print('Compiling {0} to {1}'.format(po_file, mo_file))
-        msgfmt.make(po_file, mo_file)
-
-if __name__ == '__main__':
-    build_mo_files()
-
diff --git a/l10n/extract_strings.sh b/l10n/extract_strings.sh
deleted file mode 100755
index 274d13b..0000000
--- a/l10n/extract_strings.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-xgettext --keyword=translatable --sort-output -o pygtkspellcheck/en.po \
-../src/gtkspellcheck/spellcheck.py ../src/gtkspellcheck/oxt_import.py
-echo "Done!"
diff --git a/l10n/msgfmt2.py b/l10n/msgfmt2.py
deleted file mode 100644
index 685a32a..0000000
--- a/l10n/msgfmt2.py
+++ /dev/null
@@ -1,220 +0,0 @@
-#! /usr/bin/env python
-# -*- coding: iso-8859-1 -*-
-# Written by Martin v. L�wis <loewis at informatik.hu-berlin.de>
-
-"""Generate binary message catalog from textual translation description.
-
-This program converts a textual Uniforum-style message catalog (.po file) into
-a binary GNU catalog (.mo file).  This is essentially the same function as the
-GNU msgfmt program, however, it is a simpler implementation.
-
-Usage: msgfmt.py [OPTIONS] filename.po
-
-Options:
-    -o file
-    --output-file=file
-        Specify the output file to write to.  If omitted, output will go to a
-        file named filename.mo (based off the input file name).
... 2429 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pygtkspellcheck.git



More information about the Python-modules-commits mailing list