debian/0000775000000000000000000000000011770067254007201 5ustar debian/compat0000664000000000000000000000000211710335763010374 0ustar 7 debian/control0000664000000000000000000000206311722454230010574 0ustar Source: greekocr4gamera Section: python Priority: optional Maintainer: Jakub Wilk Uploaders: Debian Python Modules Team Vcs-Svn: svn://svn.debian.org/python-modules/packages/greekocr4gamera/trunk/ Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/greekocr4gamera/trunk/ Build-Depends: debhelper (>= 7), python-all (>= 2.5), python-support, python-gamera, python-gamera.toolkits.ocr, python-docutils (>= 0.6), python-pygments (>= 0.6) Standards-Version: 3.9.3 Homepage: http://gamera.informatik.hsnr.de/addons/greekocr4gamera/ Package: python-gamera.toolkits.greekocr Architecture: all Depends: ${misc:Depends}, ${python:Depends}, python-gamera, python-gamera.toolkits.ocr Enhances: python-gamera Description: toolkit for building OCR systems for polytonal Greek The Gamera GreekOCR Toolkit provides methods and a ready-to-run script for recognizing polytonal Greek texts, i.e. classical Greek with variable use of accents. . Note that the toolkit does not include any training data. debian/patches/0000775000000000000000000000000011770067254010630 5ustar debian/patches/series0000664000000000000000000000002511716325517012041 0ustar doc-build-local.diff debian/patches/doc-build-local.diff0000664000000000000000000000265211716325517014420 0ustar Description: Allow to build documentation from local source. Normally it's only possible to build documentation is the toolkit is installed system-wide. This patch allows the documentation to be built from local source. . Also, remove spurious warning. Author: Jakub Wilk Forwarded: not-needed Last-Update: 2012-02-14 --- a/doc/gendoc.py +++ b/doc/gendoc.py @@ -1,24 +1,20 @@ #!/usr/bin/env python +import os +import sys + from gamera import gendoc if __name__ == '__main__': - # Step 1: - # Import all of the plugins to document. - # Be careful not to load the core plugins, or they - # will be documented here, too. - # If the plugins are not already installed, we'll just ignore - # them and generate the narrative documentation. - try: - from gamera.toolkits.greekocr.plugins import clear - except ImportError: - print "WARNING:" - print "This `greekocr` toolkit must be installed before generating" - print "the documentation. For now, the system will skip generating" - print "documentation for the plugins." - print - # Step 2: + import gamera.toolkits + gamera.toolkits.__path__[:0] = [os.path.join( + sys.path[0], + os.pardir, + 'gamera', + 'toolkits' + )] + # Generate documentation for this toolkit # This will handle any commandline arguments if necessary gendoc.gendoc(classes=[("gamera.toolkits.greekocr.greekocr", debian/copyright0000664000000000000000000000271611722454230011131 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: greekocr4gamera Upstream-Contact: Christoph Dalitz Source: http://gamera.informatik.hsnr.de/addons/greekocr4gamera/ Files: * Copyright: 2010-2011, Christian Brandt License: GPL-2+ This toolkit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 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 file LICENSE for more details. . On Debian systems, the complete text of the GNU General Public License version 2 can be found in the /usr/share/common-licenses/GPL-2 file. Files: debian/* Copyright: 2012, Jakub Wilk License: GPL-2 This package 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; version 2 dated June, 1991. . This package 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. . On Debian systems, the complete text of the GNU General Public License version 2 can be found in the /usr/share/common-licenses/GPL-2 file. debian/watch0000664000000000000000000000014011710335763010222 0ustar version=3 http://gamera.informatik.hsnr.de/addons/greekocr4gamera/greekocr-([0-9.]+)[.]tar[.]gz debian/links0000664000000000000000000000014411710335763010240 0ustar usr/share/doc/python-gamera.toolkits.greekocr/src usr/share/doc/python-gamera.toolkits.greekocr/rst debian/greekocr4gamera.rst0000664000000000000000000000153711710340352012766 0ustar =============== greekocr4gamera =============== --------------------------------------------------------- OCR system using the Gamera framework for polytonal Greek --------------------------------------------------------- :Manual section: 1 Usage ----- **greekocr4gamera** -x `` [`options`] `` Options ------- -w, --wholistic Use wholistic segmentation mode. This is the default. -s, --separatistic Use separatistic segmentation mode. -u , --unicode Use this filename for Unicode output. -t , --teubner Use this filename for teubner TeX output. --deskew Do a skew correction (recommended). --filter Filter out very large (images) and very small components (noise). -d, --debug Save debug-images: debug_lines.png debug_words.png debug_chars.png -h, --help Display help and exit. debian/docs0000664000000000000000000000003011710335763010042 0ustar README doc/html doc/src debian/changelog0000664000000000000000000000227511770067250011055 0ustar greekocr4gamera (1.0.1-4) unstable; urgency=low * Don't include *.egg-info in the binary package, as distribution name is too generic. * Do not pass explicit debian/control path to pyversions. -- Jakub Wilk Tue, 19 Jun 2012 14:20:55 +0200 greekocr4gamera (1.0.1-3) unstable; urgency=low * Upload to unstable. * Run dh_testdir in the clean target. * Bump standards version to 3.9.3. + Update debian/copyright URI. -- Jakub Wilk Sun, 26 Feb 2012 17:09:39 +0100 greekocr4gamera (1.0.1-2) experimental; urgency=low * Use xargs to iterate over all Python versions. * Use build-stamp in build* targets. * Build documentation from source. + Update debian/rules. + Add doc/html/ directory to dpkg-source's extend-diff-ignore. + Add python-pygments to Build-Depends. + Add python-gamera.toolkits.ocr to Build-Depends. + Patch gendoc script to use local copy of sources. (doc-build-local.diff) -- Jakub Wilk Tue, 14 Feb 2012 01:36:30 +0100 greekocr4gamera (1.0.1-1) experimental; urgency=low * Initial release (closes: #648851). -- Jakub Wilk Thu, 26 Jan 2012 22:09:07 +0100 debian/source/0000775000000000000000000000000011770067254010501 5ustar debian/source/format0000664000000000000000000000001411710335763011704 0ustar 3.0 (quilt) debian/source/options0000664000000000000000000000004011716320202012072 0ustar extend-diff-ignore = ^doc/html/ debian/symlink-helper0000775000000000000000000000310011710335763012061 0ustar #!/usr/bin/python import hashlib import os import sys def file_hash(path): hashsum = hashlib.sha256() file = open(path, 'rb') try: hashsum.update(file.read()) finally: file.close() return hashsum.digest() def main(): data = {} if len(sys.argv) != 3: print >>sys.stderr, 'Usage: %s ' sys.exit(1) _, src_dir, dst_dir = sys.argv for root, dirs, files in os.walk(src_dir): for filename in files: path = os.path.join(root, filename) path = os.path.normpath(path) data[file_hash(path)] = path for root, dirs, files in os.walk(dst_dir): for filename in files: if not '_generic' in filename: continue path = os.path.join(root, filename) path = os.path.normpath(path) data[file_hash(path)] = path for root, dirs, files in os.walk(dst_dir): for filename in files: if '_generic' in filename: continue path = os.path.join(root, filename) path = os.path.normpath(path) try: sympath = data[file_hash(path)] except LookupError: pass else: sympath = os.path.join('../' * root.count('/'), sympath) sympath = os.path.normpath(sympath) print >>sys.stderr, 'symlinking %s -> %s' % (path, sympath) os.unlink(path) os.symlink(sympath, path) if __name__ == '__main__': main() # vim:ts=4 sw=4 et debian/rules0000775000000000000000000000211311770066362010255 0ustar #!/usr/bin/make -f python_all = pyversions -r | tr ' ' '\n' | xargs -t -I {} env {} .PHONY: clean clean: dh_testdir dh_clean rm -rf build *.egg-info/ debian/*.[1-9] find -name '*.py[co]' -delete .PHONY: build build-arch build-indep build build-indep: build-stamp build-stamp: dh_testdir $(python_all) setup.py build rst2man debian/greekocr4gamera.rst > debian/greekocr4gamera.1 rm -rf doc/html/ cd doc && python gendoc.py touch $(@) .PHONY: binary binary-arch binary-indep binary binary-indep: build-stamp dh_testdir dh_testroot dh_prep $(python_all) setup.py install --prefix=/usr --root=debian/python-gamera.toolkits.greekocr/ find debian/*/ -name '*.egg-info' -delete cd debian/*/usr/bin/ && \ rename.ul '.py' '' greekocr4gamera.py && \ sed -i -e '1s,^#!.*,#!/usr/bin/python,' greekocr4gamera dh_installdocs cd debian/*/usr/share/doc/*/html/ && \ $(CURDIR)/debian/symlink-helper ../src/ . dh_installchangelogs dh_installman debian/*.[1-9] dh_pysupport dh_link dh_compress dh_fixperms dh_installdeb dh_gencontrol dh_md5sums dh_builddeb # vim:ts=4 sw=4 noet debian/doc-base0000664000000000000000000000076311710336335010600 0ustar Document: greekocr4gamera-documentation Title: GreekOCR toolkit for Gamera Author: Christian Brandt, Christoph Dalitz Section: Programming Format: HTML Index: /usr/share/doc/python-gamera.toolkits.greekocr/html/index.html Files: /usr/share/doc/python-gamera.toolkits.greekocr/html/*.html Format: Text Index: /usr/share/doc/python-gamera.toolkits.greekocr/rst/index.txt.gz Files: /usr/share/doc/python-gamera.toolkits.greekocr/rst/*.txt /usr/share/doc/python-gamera.toolkits.greekocr/rst/*.txt.gz