--- mueller-2002.02.27.orig/debian/mueller7-dict.postinst +++ mueller-2002.02.27/debian/mueller7-dict.postinst @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +case "$1" in + configure) + [ -x /usr/sbin/dictdconfig ] && dictdconfig -w + if [ -x /etc/init.d/dictd ]; then + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d dictd force-reload + fi + fi + ;; + abort-upgrade|abort-remove|abort-deconfigure) + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 --- mueller-2002.02.27.orig/debian/README.source +++ mueller-2002.02.27/debian/README.source @@ -0,0 +1,47 @@ +This package uses quilt to manage all modifications to the upstream +source. Changes are stored in the source package as diffs in +debian/patches and applied during the build. + +To get the fully patched source after unpacking the source package, cd to +the root level of the source package and run: + + quilt push -a + +The last patch listed in debian/patches/series will become the current +patch. + +To add a new set of changes, first run quilt push -a, and then run: + + quilt new + +where is a descriptive name for the patch, used as the filename in +debian/patches. Then, for every file that will be modified by this patch, +run: + + quilt add + +before editing those files. You must tell quilt with quilt add what files +will be part of the patch before making changes or quilt will not work +properly. After editing the files, run: + + quilt refresh + +to save the results as a patch. + +Alternately, if you already have an external patch and you just want to +add it to the build system, run quilt push -a and then: + + quilt import -P /path/to/patch + quilt push -a + +(add -p 0 to quilt import if needed). as above is the filename to +use in debian/patches. The last quilt push -a will apply the patch to +make sure it works properly. + +To remove an existing patch from the list of patches that will be applied, +run: + + quilt delete + +You may need to run quilt pop -a to unapply patches first before running +this command. --- mueller-2002.02.27.orig/debian/mueller7accent-dict.files +++ mueller-2002.02.27/debian/mueller7accent-dict.files @@ -0,0 +1,2 @@ +usr/share/dictd/mueller7accent.dict.dz +usr/share/dictd/mueller7accent.index --- mueller-2002.02.27.orig/debian/mueller7accent-dict.postrm +++ mueller-2002.02.27/debian/mueller7accent-dict.postrm @@ -0,0 +1,14 @@ +#!/bin/sh + +#DEBHELPER# + +set -e + +if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then + [ -x /usr/sbin/dictdconfig ] && dictdconfig -w + if [ -x /etc/init.d/dictd ]; then + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d dictd force-reload + fi + fi +fi --- mueller-2002.02.27.orig/debian/changelog +++ mueller-2002.02.27/debian/changelog @@ -0,0 +1,207 @@ +mueller (2002.02.27-8) unstable; urgency=low + + * debian/control: + - short description updated to make it more specific, + - ${misc:Depends} added, as suggested by Lintian. + - Standards-Version bumped to 3.8.0: + + debian/README.source added. + * Added quilt for patch management: + - fix-shopping.patch added, + - quilt added to Build-Depends, + - debian/rules adjusted. + * debian/copyright: + - changed (C) into ©, as suggested by Lintian. + * debian/watch: + - added empty watchfile to indicate missing upstream. + + -- Mikhail Gusarov Tue, 17 Feb 2009 13:52:45 +0600 + +mueller (2002.02.27-7) unstable; urgency=low + + * mueller7-mova and mueller7accent-mova packages are dropped. If you're + still using mova, you're advised to migrate to dict server + dict + client as they provide better functionality. + + * mueller7-dict and mueller7accent-dict now provide dictd-dictionary + virtual package (Closes: #466222) + * Copyright file updated to clarify information about copyright holders. + * 'Encoded in utf-8' is removed from packages' description. + * postinst and postrm maintainer scripts updated to force-reload dictd + instead of restarting it. + + -- Mikhail Gusarov Sun, 17 Feb 2008 16:10:32 +0600 + +mueller (2002.02.27-6) unstable; urgency=low + + * Dependencies cleaned up, using virtual packages dict-server and + dict-client. + * dict-server moved to Suggests, as mueller7-dict and + mueller7accent-dict may be used with OpenDict or OpenOffice.org. + * Added mueller7-dict.xml and mueller7accent-dict.xml as needed by + OpenDict (patch by Kęstutis Biliūnas) (Closes: #42592). + + -- Mikhail Gusarov Fri, 25 May 2007 22:53:01 +0700 + +mueller (2002.02.27-5) unstable; urgency=low + + * "The Unicode age" release + + [ dict-server interaction ] + * Bumped dictd dependency to 1.10.2. This dictd version no longer + requres --locale=ru_RU.UTF-8 configuration + * Dropped all the debconf stuff from the package. No longer necessary + with new dictd (Closes: #388938) + + [ dictionary ] + * Fixed broken 00-database-info entry (Closes: #250646) + * Fixed 'shop' entry in dictionary. (Closes: #263880) + * Transcription converted to IPA standard (Closes: #300831) + * Fixed indentation in dictionary entries. To achieve this 'mova->dict' + converter has been rewritten from scratch ('python' added to + Build-Depends, 'recode', 'locales' dropped from Build-Depends) + + [ packaging ] + * Boilerplate comments removed from maintainer scripts + * '-mova' packages priority changed to 'extra' to match override file. + * Added lintian overrides: 'mueller*-mova' packages use binaries and + icons from 'mova' package. + * copyright file updated + + -- Mikhail Gusarov Sat, 23 Sep 2006 13:40:08 +0700 + +mueller (2002.02.27-4) unstable; urgency=low + + * New maintainer. Thanks for your work, Yven! + * Acknowledging NMUs. Thanks, Mark and Christian! (Closes: #388019) + + * Added ${misc:Depends} to Depends instead of debconf (>= 0.5). Brings + missing debconf-2.0 dependency (Closes: #332039) + * Previous upload also fixes postrm breakage, but does not mention bug + (Closes: #360367) + * Fixed lintian warnings about duplicate conffiles + + * Added Czech translation. Thanks to Miroslav Kure (Closes: #308025) + * Added Vietnamese translation. Thanks to Clytie Siddall (Closes: #312986) + * Added Swedish translation. Thanks to Daniel Nylander (Closes: #341627) + + -- Mikhail Gusarov Thu, 21 Sep 2006 22:47:05 +0700 + +mueller (2002.02.27-3.3) unstable; urgency=low + + * NMU + * Bump dictfmt dependency to use --utf8 option + * Bump standards version to 3.7.2 + * Move debhelper dependency to Build-Depends as lintian suggests + * Cleaning up debian/rules: + - Unused garbage left from template file removed + - do not chmod to-dict.sh to avoid dpkg-source warning + * to-dict.sh updated to produce correct indexes (Closes: #318070, #186496) + - locale/ is no longer needed + * fixed typos in changelog dates to avoid lintian warnings + * postrm fixed to make package purging work again + + -- Mikhail Gusarov Sun, 17 Sep 2006 16:56:28 +0700 + +mueller (2002.02.27-3.2) unstable; urgency=low + + * Non-maintainer upload + * Correct templates to mention the dictionary is English-Russian + Closes: #236774, #239746 + * Lower priority of the debconf notes displayed when the locale + is non UTF-8. Closes: #283648 + + -- Christian Perrier Tue, 30 Nov 2004 15:02:05 +0100 + +mueller (2002.02.27-3.1) unstable; urgency=low + + * NMU + * Make debian/scripts/to-dict.sh executable. Patch by Goswin von Brederlow + , Thanks! (Closes: #238071) + * debian/*menu: Added some quotes to fix some lintian warnings. + * Translations: + + Updated the french debconf translations (Closes: #237192) + + -- Marc 'HE' Brockschmidt Sat, 1 May 2004 13:52:08 +0200 + +mueller (2002.02.27-3) unstable; urgency=low + + * Changed packaging to include an orig.tar.gz. + * Improved descriptions grammar-wise. + * Adapted and slightly improved locale detection and debconf stuff from + dict-de-en. (Closes: #235111) + * Added locales to Build-Depends-Indep. (Closes: #235083) + * Added dictd and debconf to Depends. + + -- Yven Johannes Leist Fri, 5 Mar 2004 03:45:29 +0100 + +mueller (2002.02.27-2) unstable; urgency=low + + * Applied patch from Bob Hilliard to convert the + dictionary to utf8. This fixes the problem of dictfmt refusing to + build under a non utf8 locale. (Closes: #191206) + + -- Yven Johannes Leist Tue, 24 Feb 2004 18:44:02 +0100 + +mueller (2002.02.27-1) unstable; urgency=low + + * New Maintainer. (Closes: #136812) + + -- Yven Johannes Leist Wed, 24 Apr 2002 11:00:26 +0200 + +mueller (2002.02.27) unstable; urgency=low + + * Add conffiles. (Closes: #132815) + * Changing maintainer to Debian QA Group, since the former maintainer + orphaned it. + + -- David Starner Wed, 27 Feb 2002 12:18:08 -0600 + +mueller (2001.12.29) unstable; urgency=low + + * Spelling errors fixed. (Closes: #125161, #125162, #125163, #125164) + * -dict packages don't depend on dictd now (Closes: #96434) + + -- Peter Novodvorsky Sat, 29 Dec 2001 17:49:45 +0300 + +mueller (2001.09.05) unstable; urgency=low + + * Fixed database info header, 3(C) included, abbr. list excluded + * Abbreviations as plain vocabulae, not in db header + * Fixed sorting order, words out of sort invisible + * All those (C) Oleg P. Philon, thanks Oleg. ;-) + + -- Peter Novodvorsky Wed, 5 Sep 2001 20:16:34 +0300 + +mueller (2001.04.11) unstable; urgency=low + + * Fixed description of mueller7-mova. (Closes: #92434) + + -- Peter Novodvorsky Wed, 11 Apr 2001 19:58:12 +0400 + +mueller (2001.02.05) unstable; urgency=low + + * Include menu and config files to be compatible with new mova. + * Dictionary without accents added. + * Restarting dictd in postinst and and postrm of *-dict. + + -- Peter Novodvorsky Tue, 6 Feb 2001 05:23:42 +0300 + +mueller (2001.02.01) unstable; urgency=low + + * Running dictdconfig and restarting dictd in postinst. + + -- Peter Novodvorsky Thu, 1 Feb 2001 23:27:22 +0300 + +mueller (2001.01.31) unstable; urgency=low + + * Splitted mova and mueller in two source packages, because Mueller's + dictionary don't have version. + * New mueller-dict package for dictd service. + + -- Peter Novodvorsky Wed, 31 Jan 2001 03:57:48 +0300 + +mueller (3.3-1) unstable; urgency=low + + * Initial version. + + -- Peter Novodvorsky Fri, 1 Sep 2000 19:38:11 +0400 --- mueller-2002.02.27.orig/debian/compat +++ mueller-2002.02.27/debian/compat @@ -0,0 +1 @@ +5 --- mueller-2002.02.27.orig/debian/mueller7-dict.postrm +++ mueller-2002.02.27/debian/mueller7-dict.postrm @@ -0,0 +1,14 @@ +#!/bin/sh + +#DEBHELPER# + +set -e + +if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then + [ -x /usr/sbin/dictdconfig ] && dictdconfig -w + if [ -x /etc/init.d/dictd ]; then + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d dictd force-reload + fi + fi +fi --- mueller-2002.02.27.orig/debian/mueller7-dict.files +++ mueller-2002.02.27/debian/mueller7-dict.files @@ -0,0 +1,3 @@ +usr/share/dictd/mueller7.dict.dz +usr/share/dictd/mueller7.index + --- mueller-2002.02.27.orig/debian/mueller7accent-dict.links +++ mueller-2002.02.27/debian/mueller7accent-dict.links @@ -0,0 +1,2 @@ +usr/share/dictd/mueller7accent.dict.dz usr/share/opendict/dictionaries/plain/mueller7accent.dict.dz/file/mueller7accent.dict.dz +usr/share/dictd/mueller7accent.index usr/share/opendict/dictionaries/plain/mueller7accent.dict.dz/file/mueller7accent.index --- mueller-2002.02.27.orig/debian/mueller7-dict.links +++ mueller-2002.02.27/debian/mueller7-dict.links @@ -0,0 +1,2 @@ +usr/share/dictd/mueller7.dict.dz usr/share/opendict/dictionaries/plain/mueller7.dict.dz/file/mueller7.dict.dz +usr/share/dictd/mueller7.index usr/share/opendict/dictionaries/plain/mueller7.dict.dz/file/mueller7.index --- mueller-2002.02.27.orig/debian/control +++ mueller-2002.02.27/debian/control @@ -0,0 +1,29 @@ +Source: mueller +Section: text +Priority: optional +Maintainer: Mikhail Gusarov +Build-Depends-Indep: dictfmt (>= 1.10.1), dictzip, python +Build-Depends: debhelper (>= 5), quilt (>= 0.40) +Standards-Version: 3.8.0 + +Package: mueller7accent-dict +Depends: ${misc:Depends} +Suggests: dict-server | opendict, dict-client +Provides: dictd-dictionary +Architecture: all +Description: Mueller English/Russian dictionary with accents in dict format + Electronic version of the English/Russian dictionary with accents by + V. K. Mueller, release 7. + . + This package contains accented version of the dictionary in dict format. + +Package: mueller7-dict +Depends: ${misc:Depends} +Suggests: dict-server | opendict, dict-client +Provides: dictd-dictionary +Architecture: all +Description: Mueller English/Russian dictionary in dict format + Electronic version of the English/Russian dictionary by V. K. Mueller, + release 7. + . + This package contains the dictionary in dict format. --- mueller-2002.02.27.orig/debian/mueller7-dict.xml +++ mueller-2002.02.27/debian/mueller7-dict.xml @@ -0,0 +1,15 @@ + + + dict + English-Russian (Mueller) + 7 + + + + + mueller7.dict.dz + UTF-8 + + + V.K.Mueller English-Russian Dictionary, 7 Edition; "State Publishing House of Foreign and National Dictionaries" Moscow 1961; Free Electronic Version by S.Starostin 196; Electronic Version by E.S.Cymbalyuk 1999 under GNU GPL, ver. 1.2 + --- mueller-2002.02.27.orig/debian/watch +++ mueller-2002.02.27/debian/watch @@ -0,0 +1 @@ +# Mueller dictionary has no apparent upstream. --- mueller-2002.02.27.orig/debian/mueller7accent-dict.xml +++ mueller-2002.02.27/debian/mueller7accent-dict.xml @@ -0,0 +1,15 @@ + + + dict + English-Russian with accents (Mueller) + 7 + + + + + mueller7accent.dict.dz + UTF-8 + + + V.K.Mueller English-Russian Dictionary, 7 Edition; "State Publishing House of Foreign and National Dictionaries" Moscow 1961; Free Electronic Version by S.Starostin 1996; Electronic Version by E.S.Cymbalyuk 1999 under GNU GPL, ver. 1.2 + --- mueller-2002.02.27.orig/debian/mueller7accent-dict.postinst +++ mueller-2002.02.27/debian/mueller7accent-dict.postinst @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +case "$1" in + configure) + [ -x /usr/sbin/dictdconfig ] && dictdconfig -w + if [ -x /etc/init.d/dictd ]; then + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d dictd force-reload + fi + fi + ;; + abort-upgrade|abort-remove|abort-deconfigure) + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 --- mueller-2002.02.27.orig/debian/mueller7-dict.dirs +++ mueller-2002.02.27/debian/mueller7-dict.dirs @@ -0,0 +1,2 @@ +usr/share/opendict/dictionaries/plain/mueller7.dict.dz/conf +usr/share/opendict/dictionaries/plain/mueller7.dict.dz/file --- mueller-2002.02.27.orig/debian/rules +++ mueller-2002.02.27/debian/rules @@ -0,0 +1,81 @@ +#!/usr/bin/make -f + +#export DH_VERBOSE=1 + +include /usr/share/quilt/quilt.make + +OVERRIDES_DIR=debian/tmp/usr/share/lintian/overrides + +DICT_URL="http://www.chat.ru/~mueller_dic" +DICT_NAME="Mueller English-Russian Dictionary" +ACC_DICT_NAME="Mueller English-Russian Dictionary (with accents)" + +OPENDICT_DIR=/usr/share/opendict/dictionaries/plain + +build: build-stamp + +build-stamp: debian/stamp-patched + dh_testdir + + python debian/scripts/to-dict.py < Mueller7accentGPL.koi > mueller7accent.data + echo "Creating mueller7accent.dict and mueller7accent.index" + dictfmt -p --allchars --utf8 --columns 0 -u ${DICT_URL} -s ${ACC_DICT_NAME} mueller7accent < mueller7accent.data + echo "Compressing mueller7accent.dict" + dictzip mueller7accent.dict + + python debian/scripts/to-dict.py < Mueller7GPL.koi > mueller7.data + echo "Creating mueller7.dict and mueller7.index" + dictfmt -p --allchars --utf8 --columns 0 -u ${DICT_URL} -s ${DICT_NAME} mueller7 < mueller7.data + echo "Compressing mueler7.dict" + dictzip mueller7.dict + + touch build-stamp + +clean: unpatch + dh_testdir + dh_testroot + rm -rf debian/tmp + rm -f build-stamp + + -rm -f *.dict.dz *.index *.data + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + mkdir -p debian/tmp/usr/share/dict + mkdir -p debian/tmp/usr/share/dictd + + install -m644 *.koi *.koi.hash debian/tmp/usr/share/dict + install -m644 *.dict.dz *.index debian/tmp/usr/share/dictd + + dh_movefiles + + install -m 644 debian/mueller7-dict.xml \ + $(CURDIR)/debian/mueller7-dict${OPENDICT_DIR}/mueller7.dict.dz/conf/config.xml + install -m 644 debian/mueller7accent-dict.xml \ + $(CURDIR)/debian/mueller7accent-dict${OPENDICT_DIR}/mueller7accent.dict.dz/conf/config.xml + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_installdocs + dh_installchangelogs + dh_link + dh_installmenu + dh_installdebconf + dh_compress + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture-dependent files here. +binary-arch: build install +# We have nothing to do by default. + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- mueller-2002.02.27.orig/debian/mueller7accent-dict.dirs +++ mueller-2002.02.27/debian/mueller7accent-dict.dirs @@ -0,0 +1,2 @@ +usr/share/opendict/dictionaries/plain/mueller7accent.dict.dz/conf +usr/share/opendict/dictionaries/plain/mueller7accent.dict.dz/file --- mueller-2002.02.27.orig/debian/copyright +++ mueller-2002.02.27/debian/copyright @@ -0,0 +1,35 @@ +This package was debianized by Peter Novodvorsky on +Fri, 1 Sep 2000 19:38:11 +0400 + +It was downloaded from http://www.geocities.com/mueller_dic/ + +Copyright Holders: S. Starostin, E.S.Cymbalyuk + +License: + + Copyright (C) 1996 S. Starostin + Copyright (C) 1999-2000 E.S.Cymbalyuk + + 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 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 + 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, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +On Debian systems, the complete text of the GNU General Public License +can be found in /usr/share/common-licenses/GPL-2 file. + +The Debian packaging is + +© 2001-2001 Peter Novodvorsky +© 2002-2004 Yven Johannes Leist +© 2006-2008 Mikhail Gusarov and +is licensed under the GPL 2 or any later version, see `/usr/share/common-licenses/GPL-2'. --- mueller-2002.02.27.orig/debian/scripts/to-dict.py +++ mueller-2002.02.27/debian/scripts/to-dict.py @@ -0,0 +1,169 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Conversion of Mueller dictionaries to the DICT format +# +# (c) 2006 Mikhail Gusarov +# Based on Andrew Comech work. +# +# GPLv2 +# + +import re, sys, textwrap + +# -- Transcription conversion -- + +# +# Mapping Mueller's transcription characters to IPA alphabet. +# +letters = { + '\x41' : u'\N{LATIN SMALL LETTER ALPHA}', # A + '\x44' : u'\N{LATIN SMALL LETTER ETH}', # D + '\x45' : u'e', #E + '\x49' : u'\N{LATIN LETTER SMALL CAPITAL I}', # I + '\x4E' : u'\N{LATIN SMALL LETTER ENG}', # N + '\x51' : u'\N{LATIN SMALL LETTER AE}', # Q + '\x53' : u'\N{LATIN SMALL LETTER ESH}', # S + '\x54' : u'\N{GREEK SMALL LETTER THETA}', # T + '\x5A' : u'\N{LATIN SMALL LETTER EZH}', # Z + '\x65' : u'\N{LATIN SMALL LETTER OPEN E}', # e + '\x75' : u'\N{LATIN SMALL LETTER UPSILON}', # u + '\x8D' : u'\N{LATIN SMALL LETTER REVERSED E}', + '\xAB' : u'\N{LATIN SMALL LETTER REVERSED OPEN E}', + '\xC3' : u'\N{LATIN SMALL LETTER TURNED V}', + '\xC7' : u'\N{SOUTH EAST ARROW}', + '\xC8' : u'\N{NORTH EAST ARROW}', + '\xF9' : u':', +} + +def transcription_to_ipa(s): + """Converts Mueller's transcription (bytestring) to the IPA one (Unicode)""" + return u''.join(map(lambda c: letters.get(c, c), s)) + +# -- Parsing the single word + +line_re = re.compile('^(.*?) (.*)') +transcription_re = re.compile('\[(.*?)\]') + +def parse_line(s): + """Given string from dictionary returns pair (word, article). + + word is the word defined (Unicode string). Article is the source + article as Unicode string, with transcription converted to IPA""" + + res = re.match(line_re, s) + if not res: + raise RuntimeError("Malformed line %s" % s.encode("UTF-8")) + + (word, article) = res.groups() + + # Splits article to the parts, converting transcription to Unicode + article_parts = [] + + last_processed = 0 + for r in re.finditer(transcription_re, article): + if r.start() > last_processed: + article_parts.append(article[last_processed:r.start()].decode("KOI8-R")) + article_parts.append(transcription_to_ipa(article[r.start():r.end()])) + last_processed = r.end() + + if last_processed != len(article): + article_parts.append(article[last_processed:len(article)].decode("KOI8-R")) + + return word.decode("KOI8-R"), u"".join(article_parts) + +# -- Formatting single text block with indentation + +TEXT_WIDTH = 75 +INDENT_WIDTH = 3 + +# list-name -> (head of list regexp, maximum length) +list_types = { 'r': (re.compile('_[IV]{1,3}'), 4), + 'd': (re.compile('\d{1,2}\.'), 3), + 'n': (re.compile('\d{1,2}>'), 3), + 'a': (re.compile(u'[а-я]>'), 3) } + +def format_block(s, indentation, header, header_width): + s = s.strip() + header = header + + first_line = ((INDENT_WIDTH*indentation) * u' ') + header.ljust(header_width) + other_lines = (INDENT_WIDTH*indentation + header_width) * u' ' + + w = textwrap.TextWrapper(width = TEXT_WIDTH, + initial_indent = first_line, + subsequent_indent = other_lines) + + return u"\n".join(w.wrap(s)) + +# -- Converting the word into DICT-formed article + +def convert_line(s): + """Given the line from dictionary, format the article with newlines + and indentation, convert everything to UTF-8, and wrap to page + width""" + + (word, article) = parse_line(s) + + # Find all list heads occurences + list_heads = [] + for list_name, (list_re, list_header_width) in list_types.iteritems(): + for i in re.finditer(list_re, article): + head = i.group() + if head.endswith(u'>'): + head = head[:-1] + u')' + list_heads.append((i.start(), i.end(), list_name, head)) + + list_heads.sort(lambda x, y: cmp(x[0], y[0])) + + # Figure out the lists indentation + list_levels = {} + level = 0 + for list_head in list_heads: + if not list_levels.has_key(list_head[2]): + list_levels[list_head[2]] = level + level += 1 + + # Indent and encode each text block + result = [] + if len(list_heads) == 0: + result.append(format_block(article, 0, '', 0)) + else: + if list_heads[0][0] > 0: + result.append(format_block(article[0:list_heads[0][0]], 0, '', 0)) + for i in xrange(0, len(list_heads)-1): + list_type = list_heads[i][2] + result.append(format_block(article[list_heads[i][1]:list_heads[i+1][0]], + list_levels[list_type], + list_heads[i][3], list_types[list_type][1])) + list_type = list_heads[-1][2] + result.append(format_block(article[list_heads[-1][1]:len(s)], + list_levels[list_type], + list_heads[-1][3], list_types[list_type][1])) + + return word, result + +def convert_dictionary(): + previous_letter = '' + copyright_line = 1 + sys.stderr.write('Converting dictionary: ') + for s in sys.stdin: + if s[0].isalpha() and previous_letter != s[0].lower(): + previous_letter = s[0].lower() + sys.stderr.write(s[0].lower()) + if s.startswith(" (C)") and copyright_line: + copyright_line = 0 + sys.stdout.write("%h 00-database-info\n%d\n") + sys.stdout.write("\n".join(textwrap.wrap(s, 75))) + if s.startswith(" (C)"): + continue + (word, article_lines) = convert_line(s) + sys.stdout.write("%h " + word.encode("UTF-8") + "\n%d\n") + for l in article_lines: + sys.stdout.write(" ") + sys.stdout.write(l.encode("UTF-8")) + sys.stdout.write("\n") + sys.stderr.write('\ndone\n') + +if __name__ == '__main__': + convert_dictionary() --- mueller-2002.02.27.orig/debian/patches/fix-shopping.patch +++ mueller-2002.02.27/debian/patches/fix-shopping.patch @@ -0,0 +1,31 @@ +From #263880: + +The `shop' entry has an example phrase `go shop ping' at point 2.1, which I +believe should be `go shopping'. + +Index: mueller/Mueller7accentGPL.koi +=================================================================== +--- mueller.orig/Mueller7accentGPL.koi 2009-02-17 13:59:50.000000000 +0600 ++++ mueller/Mueller7accentGPL.koi 2009-02-17 13:59:56.000000000 +0600 +@@ -36860,7 +36860,7 @@ + shootinggallery [SutINgQlrI] _n. + shootingrange [SutINreIndZ] _n. , + shootingstick [SutINstIk] _n. - +-shop [Sp] 1. _n. 1> , 2> , ; closed shop _. , ; open shop _. , , 3> _. , , 4> , ; , , , -. ; stop thinking of shop! !; to talk shop , ( ..) 5> _attr. ; shop committee ; shop chairman _. ; all over the shop , ; to come to the wrong shop ; to get a shop _. ; to lift a shop ; to shut up shop ; 2. _v. 1> (. go shop ping) 2> _. , , 3> _. 4> _. (); shop around _. , ++shop [Sp] 1. _n. 1> , 2> , ; closed shop _. , ; open shop _. , , 3> _. , , 4> , ; , , , -. ; stop thinking of shop! !; to talk shop , ( ..) 5> _attr. ; shop committee ; shop chairman _. ; all over the shop , ; to come to the wrong shop ; to get a shop _. ; to lift a shop ; to shut up shop ; 2. _v. 1> (. go shopping) 2> _. , , 3> _. 4> _. (); shop around _. , + shop floor [Spfl] _n. ; ; on the shop floor , + shop hours [Spauz] _n. _pl. + shop window [SpwIndu] _n. ; to have everything in the shop window, to have all one's goods in the shop window > ; > ӳ +Index: mueller/Mueller7GPL.koi +=================================================================== +--- mueller.orig/Mueller7GPL.koi 2009-02-17 13:59:50.000000000 +0600 ++++ mueller/Mueller7GPL.koi 2009-02-17 13:59:56.000000000 +0600 +@@ -36860,7 +36860,7 @@ + shootinggallery [SutINgQlrI] _n. + shootingrange [SutINreIndZ] _n. , + shootingstick [SutINstIk] _n. - +-shop [Sp] 1. _n. 1> , 2> , ; closed shop _. , ; open shop _. , , 3> _. , , 4> , ; , , , -. ; stop thinking of shop! !; to talk shop , ( ..) 5> _attr. ; shop committee ; shop chairman _. ; all over the shop , ; to come to the wrong shop ; to get a shop _. ; to lift a shop ; to shut up shop ; 2. _v. 1> (. go shop ping) 2> _. , , 3> _. 4> _. (); shop around _. , ++shop [Sp] 1. _n. 1> , 2> , ; closed shop _. , ; open shop _. , , 3> _. , , 4> , ; , , , -. ; stop thinking of shop! !; to talk shop , ( ..) 5> _attr. ; shop committee ; shop chairman _. ; all over the shop , ; to come to the wrong shop ; to get a shop _. ; to lift a shop ; to shut up shop ; 2. _v. 1> (. go shopping) 2> _. , , 3> _. 4> _. (); shop around _. , + shop floor [Spfl] _n. ; ; on the shop floor , + shop hours [Spauz] _n. _pl. + shop window [SpwIndu] _n. ; to have everything in the shop window, to have all one's goods in the shop window > ; > ӣ --- mueller-2002.02.27.orig/debian/patches/series +++ mueller-2002.02.27/debian/patches/series @@ -0,0 +1 @@ +fix-shopping.patch