New Upstream Snapshot - freedict-tools
Ready changes
Summary
Merged new upstream version: 0.6.0+git20221206.1.15f31c1 (was: 0.6.0).
Resulting package
Built on 2023-02-26T11:12 (took 2m13s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-snapshots freedict-tools
Lintian Result
Diff
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 354c0d9..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,12 +0,0 @@
-# keep that alphabetical please
-*~
-*.bak
-build
-*/build/*
-*.egg-info
-freedict-database.xml
-*.mo
-*__pycache__*
-*.pyc
-*.swo
-*.swp
diff --git a/README.md b/README.md
index 482e09d..147af3b 100644
--- a/README.md
+++ b/README.md
@@ -29,7 +29,7 @@ Git and a XML-capable editor are recommended.
If you use Debian/Ubuntu, you should install the following packages:
- sudo apt-get install make xsltproc libicu-dev python3 python3-icu virtualenv python3-virtualenv espeak-ng git
+ sudo apt-get install make xsltproc libicu-dev python3 python3-icu virtualenv python3-virtualenv espeak-ng git dictfmt
#### Windows
diff --git a/debian/changelog b/debian/changelog
index 1b94f02..b452db6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+freedict-tools (0.6.0+git20221206.1.15f31c1-1) UNRELEASED; urgency=low
+
+ * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk> Sun, 26 Feb 2023 11:11:12 -0000
+
freedict-tools (0.6.0-2) unstable; urgency=medium
* Fix fetchdictdata.py to correctly determine the licence of dictionaries.
diff --git a/debian/patches/add_debian_management_script b/debian/patches/add_debian_management_script
index 5f41c7e..fc02fa7 100644
--- a/debian/patches/add_debian_management_script
+++ b/debian/patches/add_debian_management_script
@@ -4,10 +4,10 @@ Description: Add debian maintainer assistant
Author: Sebastian Humenda <shumenda@gmx.de>
Last-Update: 2018-10-28
-Index: freedict-tools/fetchdictdata.py
+Index: freedict-tools.git/fetchdictdata.py
===================================================================
--- /dev/null
-+++ freedict-tools/fetchdictdata.py
++++ freedict-tools.git/fetchdictdata.py
@@ -0,0 +1,519 @@
+#!/usr/bin/env python3
+"""This script is designed to help with the Debian FreeDict packaging. It can
diff --git a/debian/patches/fix_install_path b/debian/patches/fix_install_path
index ded19ae..386a890 100644
--- a/debian/patches/fix_install_path
+++ b/debian/patches/fix_install_path
@@ -3,10 +3,10 @@ Description: Install teiaddphonetics
Author: Sebastian Humenda <shumenda@gmx.de>
Last-Update: 2020-12-31
-Index: freedict-tools/Makefile
+Index: freedict-tools.git/Makefile
===================================================================
---- freedict-tools.orig/Makefile
-+++ freedict-tools/Makefile
+--- freedict-tools.git.orig/Makefile
++++ freedict-tools.git/Makefile
@@ -124,6 +124,7 @@ mk_venv: #! initialise a new (Python) vi
# NOTE: the directories below HAVE to be on one line
INSTALL_DIRS := mk xquery xsl/inc
diff --git a/debian/patches/remove_api_from_install b/debian/patches/remove_api_from_install
index 3e207cc..f8c7d60 100644
--- a/debian/patches/remove_api_from_install
+++ b/debian/patches/remove_api_from_install
@@ -6,10 +6,10 @@ Description: strip unused scripts and targets from installation
Author: Sebastian Humenda <shumenda@gmx.de>
Last-Update: 2020-12-31
-Index: freedict-tools/Makefile
+Index: freedict-tools.git/Makefile
===================================================================
---- freedict-tools.orig/Makefile
-+++ freedict-tools/Makefile
+--- freedict-tools.git.orig/Makefile
++++ freedict-tools.git/Makefile
@@ -10,37 +10,13 @@ PREFIX ?= usr
DESTDIR ?=
INSTALLDIR ?= $(abspath $(DESTDIR)/$(PREFIX)/share/freedict)
diff --git a/debian/patches/remove_slob_support b/debian/patches/remove_slob_support
index ff67326..5cc9589 100644
--- a/debian/patches/remove_slob_support
+++ b/debian/patches/remove_slob_support
@@ -4,10 +4,10 @@ Description: set "slob" as non-available platform
Author: Sebastian Humenda <shumenda@gmx.de>
Last-Update: 2018-08-02
-Index: freedict-tools/mk/dicts.mk
+Index: freedict-tools.git/mk/dicts.mk
===================================================================
---- freedict-tools.orig/mk/dicts.mk
-+++ freedict-tools/mk/dicts.mk
+--- freedict-tools.git.orig/mk/dicts.mk
++++ freedict-tools.git/mk/dicts.mk
@@ -22,7 +22,7 @@ UNSUPPORTED_PLATFORMS = evolutionary
endif
diff --git a/fd_tool/fd_tool/api/releases.py b/fd_tool/fd_tool/api/releases.py
index 77221bf..243179f 100644
--- a/fd_tool/fd_tool/api/releases.py
+++ b/fd_tool/fd_tool/api/releases.py
@@ -169,11 +169,14 @@ def get_latest_tools_release():
# validate format
date = datetime.strptime(commit_meta['date'].split('T')[0], '%Y-%m-%d')
date = date.strftime('%Y-%m-%d')
- request = urllib.request.Request(latest['tarball_url'],
+ # We don't use the API-provided download URL (latest['tarball']), as it
+ # contains a funny number in the unpacked directory.
+ github_uri = f"https://github.com/freedict/tools/archive/refs/tags/{latest['name']}.tar.gz"
+ request = urllib.request.Request(github_uri,
headers={'User-Agent': USER_AGENT})
with urllib.request.urlopen(request) as f:
checksum = hashlib.sha512(f.read()).hexdigest()
return {'version': latest['name'],
'date': date,
- 'URL': latest['tarball_url'],
+ 'URL': github_uri,
'checksum': checksum}
diff --git a/importers/epo-eng/epo-eng-import.py b/importers/epo-eng/epo-eng-import.py
index ee440d5..25d1b26 100644
--- a/importers/epo-eng/epo-eng-import.py
+++ b/importers/epo-eng/epo-eng-import.py
@@ -1,4 +1,5 @@
"""This file imports the epo-eng dictionary from
+#!/usr/bin/env python3
<http://www.denisowski.org/Esperanto/ESPDIC/espdic_readme.htm>. Please see the
README for more information."""
@@ -188,7 +189,7 @@ def translations_to_xml(translations):
return xml
def write_output(input_file, base_dir, tei_skeleton, body_xml):
- """This writes the dictionary import into the specified directory."""
+ """This writes the imported dictionary into the specified directory."""
print("Writing TEI dictionary…")
with open(tei_skeleton, 'r', encoding='utf-8') as f:
header = f.read()
@@ -228,16 +229,21 @@ def main(input_file, tei_skeleton, output_directory):
if wp.strip() and not wp.startswith(" "))
word_list = []
- for word_pair in words:
- head, trans = word_pair.split(' : ')
- translations = tokenize(trans)
- translations = structure_translations(translations)
- head = tokenize(head)
- if len(head) == 2: # headword with definition
- head = HeadWord(head[0][1], head[1][1])
- else:
- head = HeadWord(head[0][1])
- word_list.append((head, translations))
+ for lnum, word_pair in enumerate(words):
+ if word_pair.lstrip().startswith("#"):
+ continue
+ try:
+ head, trans = word_pair.split(' : ')
+ translations = tokenize(trans)
+ translations = structure_translations(translations)
+ head = tokenize(head)
+ if len(head) == 2: # headword with definition
+ head = HeadWord(head[0][1], head[1][1])
+ else:
+ head = HeadWord(head[0][1])
+ word_list.append((head, translations))
+ except ValueError as v:
+ raise ValueError(f"line {lnum+1}: {''.join(v.args)}")
# enrich words with grammatical info, strip "to" and other words *and*
# convert to XML
diff --git a/importers/setup.py b/importers/setup.py
index 417d93b..6068493 100644
--- a/importers/setup.py
+++ b/importers/setup.py
@@ -1,13 +1,3 @@
-# This script installs fd_import, it does not and should not install the importer
-# scripts.
from setuptools import setup
-setup(name='fd_import',
- version='0.2.0',
- description='FreeDict parser and dictionary import helpers',
- author='The FreeDict Developers',
- author_email='freedict@freelists.org',
- url='https://github.com/freedict/tools',
- license='GPL3',
- py_modules=['fd_import'],
-)
+setup()
diff --git a/importers/wikdict/import_wikdict.py b/importers/wikdict/import_wikdict.py
index 613261a..cac68a7 100755
--- a/importers/wikdict/import_wikdict.py
+++ b/importers/wikdict/import_wikdict.py
@@ -21,7 +21,7 @@ import shutil
import xml.etree.ElementTree as ET
from datetime import date
-SOURCE_URL = 'https://download.wikdict.com/dictionaries/tei/recommended/'
+SOURCE_URL = 'https://download.wikdict.com/dictionaries/tei/no-infl/'
# minimal number of words to consider a dictionary for inclusion
MIN_WORD_COUNT = 10000
DOWNLOAD_PREFIX = 'http://{0.netloc}{0.path}'.format(urllib.parse.urlsplit(SOURCE_URL))
Debdiff
File lists identical (after any substitutions)
No differences were encountered in the control files