id
int64
0
458k
file_name
stringlengths
4
119
file_path
stringlengths
14
227
content
stringlengths
24
9.96M
size
int64
24
9.96M
language
stringclasses
1 value
extension
stringclasses
14 values
total_lines
int64
1
219k
avg_line_length
float64
2.52
4.63M
max_line_length
int64
5
9.91M
alphanum_fraction
float64
0
1
repo_name
stringlengths
7
101
repo_stars
int64
100
139k
repo_forks
int64
0
26.4k
repo_open_issues
int64
0
2.27k
repo_license
stringclasses
12 values
repo_extraction_date
stringclasses
433 values
6,800
dictdlib.py
ilius_pyglossary/pyglossary/plugin_lib/dictdlib.py
# -*- coding: utf-8 -*- # # Dictionary creation library # Copyright (C) 2002 John Goerzen <jgoerzen@complete.org> # Copyright (C) 2020 Saeed Rasooli # # 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 Foundat...
11,149
Python
.py
341
29.560117
77
0.698259
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,801
ebook_length3.py
ilius_pyglossary/pyglossary/sort_modules/ebook_length3.py
from __future__ import annotations from typing import TYPE_CHECKING from pyglossary.sort_modules import ebook if TYPE_CHECKING: from .sort_keys_types import SortKeyType, SQLiteSortKeyType desc = "E-Book (prefix length: 3)" def normal(sortEncoding: str = "utf-8", **_options) -> SortKeyType: return ebook.normal(...
544
Python
.py
19
26.368421
67
0.771318
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,802
dicformids.py
ilius_pyglossary/pyglossary/sort_modules/dicformids.py
from __future__ import annotations import re from typing import TYPE_CHECKING if TYPE_CHECKING: from .sort_keys_types import SortKeyType, SQLiteSortKeyType desc = "DictionaryForMIDs" def normal(**_options) -> SortKeyType: re_punc = re.compile( r"""[!"$§%&/()=?´`\\{}\[\]^°+*~#'\-_.:,;<>@|]*""", # noqa: RUF001...
753
Python
.py
29
23.206897
68
0.632911
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,803
stardict.py
ilius_pyglossary/pyglossary/sort_modules/stardict.py
from __future__ import annotations from typing import TYPE_CHECKING if TYPE_CHECKING: from .sort_keys_types import SortKeyType, SQLiteSortKeyType desc = "StarDict" def normal(sortEncoding: str = "utf-8", **_options) -> SortKeyType: def sortKey(words: list[str]) -> tuple[bytes, bytes]: b_word = words[0].encode...
868
Python
.py
28
28.107143
73
0.705669
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,804
headword_lower.py
ilius_pyglossary/pyglossary/sort_modules/headword_lower.py
from __future__ import annotations from collections.abc import Callable from typing import TYPE_CHECKING if TYPE_CHECKING: from pyglossary.icu_types import T_Collator from .sort_keys_types import SortKeyType, SQLiteSortKeyType desc = "Lowercase Headword" def normal(sortEncoding: str = "utf-8", **_options) -> S...
1,233
Python
.py
38
29.947368
67
0.727891
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,805
headword_bytes_lower.py
ilius_pyglossary/pyglossary/sort_modules/headword_bytes_lower.py
from __future__ import annotations from typing import TYPE_CHECKING if TYPE_CHECKING: from .sort_keys_types import SortKeyType, SQLiteSortKeyType desc = "ASCII-Lowercase Headword" def normal( sortEncoding: str = "utf-8", **_options, ) -> SortKeyType: def sortKey(words: list[str]) -> bytes: return words[0].e...
782
Python
.py
26
27.653846
73
0.716398
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,806
ebook.py
ilius_pyglossary/pyglossary/sort_modules/ebook.py
from __future__ import annotations from typing import TYPE_CHECKING if TYPE_CHECKING: from .sort_keys_types import SortKeyType, SQLiteSortKeyType __all__ = ["normal", "sqlite"] desc = "E-Book (prefix length: 2)" def normal( sortEncoding: str = "utf-8", # noqa: ARG001 **options, ) -> SortKeyType: length = op...
1,171
Python
.py
46
22.565217
72
0.671467
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,807
headword.py
ilius_pyglossary/pyglossary/sort_modules/headword.py
from __future__ import annotations from collections.abc import Callable from typing import TYPE_CHECKING if TYPE_CHECKING: from pyglossary.icu_types import T_Collator from .sort_keys_types import SortKeyType, SQLiteSortKeyType desc = "Headword" def normal(sortEncoding: str = "utf-8", **_options) -> SortKeyType...
1,180
Python
.py
35
31.142857
73
0.730018
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,808
random.py
ilius_pyglossary/pyglossary/sort_modules/random.py
from __future__ import annotations from collections.abc import Callable from typing import TYPE_CHECKING if TYPE_CHECKING: from pyglossary.icu_types import T_Collator from .sort_keys_types import SortKeyType, SQLiteSortKeyType desc = "Random" def normal(**_options) -> SortKeyType: from random import random ...
881
Python
.py
36
21.861111
60
0.722222
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,809
iupac_goldbook.py
ilius_pyglossary/pyglossary/plugins/iupac_goldbook.py
# -*- coding: utf-8 -*- # mypy: ignore-errors from __future__ import annotations from collections.abc import Iterator from io import BytesIO from typing import TYPE_CHECKING if TYPE_CHECKING: from pyglossary.glossary_types import ( EntryType, GlossaryType, ) from pyglossary.lxml_types import Element from pygl...
7,188
Python
.py
265
23.384906
77
0.676026
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,810
info_plugin.py
ilius_pyglossary/pyglossary/plugins/info_plugin.py
# -*- coding: utf-8 -*- from __future__ import annotations from collections.abc import Iterator from typing import TYPE_CHECKING from pyglossary.info_writer import InfoWriter as Writer if TYPE_CHECKING: from pyglossary.glossary_types import ( EntryType, GlossaryType, ) from pyglossary.option import Option _...
1,269
Python
.py
53
21.830189
58
0.718802
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,811
ayandict_sqlite.py
ilius_pyglossary/pyglossary/plugins/ayandict_sqlite.py
# -*- coding: utf-8 -*- from __future__ import annotations from collections.abc import Generator, Iterator from typing import ( TYPE_CHECKING, ) if TYPE_CHECKING: import sqlite3 from pyglossary.glossary_types import EntryType, GlossaryType from pyglossary.xdxf.transform import XdxfTransformer from pyglossary.co...
5,764
Python
.py
206
24.635922
72
0.661717
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,812
yomichan.py
ilius_pyglossary/pyglossary/plugins/yomichan.py
# -*- coding: utf-8 -*- from __future__ import annotations import json import re from collections.abc import Generator, Sequence from typing import TYPE_CHECKING, Any from pyglossary import os_utils from pyglossary.flags import ALWAYS from pyglossary.option import ( BoolOption, IntOption, Option, StrOption, ) if...
12,771
Python
.py
373
30.407507
75
0.692598
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,813
formats_common.py
ilius_pyglossary/pyglossary/plugins/formats_common.py
import logging import os import sys from os.path import ( exists, isdir, isfile, join, split, splitext, ) from pprint import pformat from pyglossary.core import rootDir sys.path.insert(0, rootDir) # noqa: E402 from pyglossary import core from pyglossary.compression import ( compressionOpen, stdCompressions,...
1,806
Python
.py
109
14.825688
61
0.751924
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,814
jmnedict.py
ilius_pyglossary/pyglossary/plugins/jmnedict.py
# -*- coding: utf-8 -*- from __future__ import annotations import os import re from io import BytesIO from typing import TYPE_CHECKING, cast if TYPE_CHECKING: import io from collections.abc import Callable, Iterator from pyglossary.glossary_types import ( EntryType, GlossaryType, ) from pyglossary.lxml_type...
7,692
Python
.py
285
23.066667
78
0.656203
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,815
quickdic6.py
ilius_pyglossary/pyglossary/plugins/quickdic6.py
# -*- coding: utf-8 -*- from __future__ import annotations import datetime as dt import functools import gzip import io import math import pathlib import struct import typing import zipfile from typing import IO, TYPE_CHECKING, TypeVar if TYPE_CHECKING: from collections.abc import Callable from typing import Any, L...
23,295
Python
.py
763
27.580603
84
0.679886
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,816
xdxf_lax.py
ilius_pyglossary/pyglossary/plugins/xdxf_lax.py
# -*- coding: utf-8 -*- # from __future__ import annotations """Lax implementation of xdxf reader.""" # # Copyright © 2023 Saeed Rasooli # Copyright © 2016 ivan tkachenko me@ratijas.tk # # some parts of this file include code from: # Aard Dictionary Tools <http://aarddict.org>. # Copyright © 2008-2009 Igor Tkach # # ...
6,906
Python
.py
249
24.654618
72
0.688832
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,817
csv_plugin.py
ilius_pyglossary/pyglossary/plugins/csv_plugin.py
# -*- coding: utf-8 -*- # # Copyright © 2013-2019 Saeed Rasooli <saeed.gnu@gmail.com> (ilius) # This file is part of PyGlossary project, https://github.com/ilius/pyglossary # # This program is a free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by ...
7,457
Python
.py
282
23.37234
78
0.694281
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,818
wordnet.py
ilius_pyglossary/pyglossary/plugins/wordnet.py
# -*- coding: utf-8 -*- # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 # as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the...
9,455
Python
.py
313
26.846645
116
0.65105
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,819
aard2_slob.py
ilius_pyglossary/pyglossary/plugins/aard2_slob.py
# -*- coding: utf-8 -*- from __future__ import annotations import os import re import shutil from os.path import isfile, splitext from typing import TYPE_CHECKING if TYPE_CHECKING: from collections.abc import Generator, Iterator from pyglossary import slob from pyglossary.glossary_types import EntryType, Glossary...
11,269
Python
.py
396
25.222222
75
0.672215
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,820
dict_cc.py
ilius_pyglossary/pyglossary/plugins/dict_cc.py
# -*- coding: utf-8 -*- from __future__ import annotations import html from collections.abc import Callable, Iterator from operator import itemgetter from typing import TYPE_CHECKING, cast if TYPE_CHECKING: import sqlite3 from pyglossary.glossary_types import EntryType, GlossaryType from pyglossary.lxml_types imp...
5,567
Python
.py
208
23.495192
81
0.66798
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,821
dict_org.py
ilius_pyglossary/pyglossary/plugins/dict_org.py
# -*- coding: utf-8 -*- from __future__ import annotations import os import re from collections.abc import Generator, Iterator from os.path import isdir, splitext from typing import TYPE_CHECKING from pyglossary.core import log from pyglossary.flags import DEFAULT_NO from pyglossary.option import BoolOption, Option ...
5,036
Python
.py
162
28.271605
76
0.698823
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,822
dicformids.py
ilius_pyglossary/pyglossary/plugins/dicformids.py
# -*- coding: utf-8 -*- # mypy: ignore-errors from __future__ import annotations import operator import os import re from collections.abc import Iterator from os.path import join from typing import TYPE_CHECKING from pyglossary.core import log from pyglossary.flags import ALWAYS from pyglossary.plugins.tabfile import...
7,407
Python
.py
256
25.828125
88
0.730136
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,823
testformat.py
ilius_pyglossary/pyglossary/plugins/testformat.py
from __future__ import annotations import typing # -*- coding: utf-8 -*- from typing import Generator, Iterator from pyglossary.glossary_types import EntryType, GlossaryType from pyglossary.option import Option __all__ = [ "enable", "lname", "format", "description", "extensions", "extensionCreate", "singleF...
3,561
Python
.py
106
30.886792
73
0.707594
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,824
almaany.py
ilius_pyglossary/pyglossary/plugins/almaany.py
# -*- coding: utf-8 -*- from __future__ import annotations import html from typing import TYPE_CHECKING if TYPE_CHECKING: import sqlite3 from collections.abc import Iterator from pyglossary.glossary_types import EntryType, GlossaryType from pyglossary.option import Option __all__ = [ "Reader", "description", ...
2,790
Python
.py
101
24.673267
72
0.688132
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,825
html_dir.py
ilius_pyglossary/pyglossary/plugins/html_dir.py
# -*- coding: utf-8 -*- from __future__ import annotations import html import os import re import time from collections.abc import Generator from functools import lru_cache from os.path import isdir, isfile, join from typing import TYPE_CHECKING if TYPE_CHECKING: import io from pyglossary.glossary_types import ( ...
12,985
Python
.py
473
23.496829
77
0.638382
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,826
sql.py
ilius_pyglossary/pyglossary/plugins/sql.py
# -*- coding: utf-8 -*- from __future__ import annotations from collections.abc import Generator from typing import TYPE_CHECKING from pyglossary.option import ( BoolOption, EncodingOption, ListOption, NewlineOption, Option, ) if TYPE_CHECKING: import io from pyglossary.glossary_types import EntryType, Gloss...
4,164
Python
.py
156
23.512821
74
0.65654
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,827
zimfile.py
ilius_pyglossary/pyglossary/plugins/zimfile.py
# -*- coding: utf-8 -*- from __future__ import annotations import os from collections.abc import Iterator from typing import TYPE_CHECKING if TYPE_CHECKING: from libzim.reader import Archive # type: ignore from pyglossary.glossary_types import EntryType, GlossaryType from pyglossary.option import Option from p...
5,728
Python
.py
190
26.742105
80
0.700073
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,828
dict_org_source.py
ilius_pyglossary/pyglossary/plugins/dict_org_source.py
# -*- coding: utf-8 -*- from __future__ import annotations from collections.abc import Generator from typing import TYPE_CHECKING from pyglossary.option import BoolOption, Option if TYPE_CHECKING: from pyglossary.glossary_types import EntryType, GlossaryType __all__ = [ "Writer", "description", "enable", "exte...
1,610
Python
.py
62
23.741935
69
0.719218
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,829
stardict.py
ilius_pyglossary/pyglossary/plugins/stardict.py
# -*- coding: utf-8 -*- from __future__ import annotations import gzip import os import re import typing from collections import Counter from collections.abc import Callable, Generator, Iterator, Sequence from os.path import ( dirname, getsize, isdir, isfile, join, realpath, split, splitext, ) from pprint impo...
33,286
Python
.py
1,111
26.39784
87
0.675456
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,830
edlin.py
ilius_pyglossary/pyglossary/plugins/edlin.py
# -*- coding: utf-8 -*- # edlin.py # # Copyright © 2016-2019 Saeed Rasooli <saeed.gnu@gmail.com> (ilius) # This file is part of PyGlossary project, https://github.com/ilius/pyglossary # # This program is a free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as pu...
7,747
Python
.py
278
24.521583
78
0.690681
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,831
jmdict.py
ilius_pyglossary/pyglossary/plugins/jmdict.py
# -*- coding: utf-8 -*- from __future__ import annotations import os import re import unicodedata from io import BytesIO from typing import TYPE_CHECKING, cast if TYPE_CHECKING: import io from collections.abc import Callable, Iterator from pyglossary.glossary_types import ( EntryType, GlossaryType, ) from p...
11,181
Python
.py
412
22.839806
81
0.645697
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,832
dictunformat.py
ilius_pyglossary/pyglossary/plugins/dictunformat.py
from __future__ import annotations from pyglossary.core import log from pyglossary.option import EncodingOption, Option, StrOption from pyglossary.text_reader import TextGlossaryReader __all__ = [ "Reader", "description", "enable", "extensionCreate", "extensions", "format", "kind", "lname", "optionsProp", "...
2,774
Python
.py
104
23.480769
75
0.689199
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,833
abc_medical_notes.py
ilius_pyglossary/pyglossary/plugins/abc_medical_notes.py
# -*- coding: utf-8 -*- from __future__ import annotations import html from typing import TYPE_CHECKING if TYPE_CHECKING: import sqlite3 from collections.abc import Iterator from pyglossary.glossary_types import EntryType, GlossaryType from pyglossary.option import Option __all__ = [ "Reader", "description", ...
2,119
Python
.py
77
25.090909
87
0.698866
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,834
lingoes_ldf.py
ilius_pyglossary/pyglossary/plugins/lingoes_ldf.py
# -*- coding: utf-8 -*- from __future__ import annotations from collections.abc import Generator from typing import TYPE_CHECKING from pyglossary.compression import ( # compressionOpen, stdCompressions, ) from pyglossary.core import log from pyglossary.file_utils import fileCountLines from pyglossary.option import ...
3,937
Python
.py
148
23.608108
74
0.692901
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,835
freedict.py
ilius_pyglossary/pyglossary/plugins/freedict.py
# -*- coding: utf-8 -*- from __future__ import annotations import re from io import BytesIO, IOBase from os.path import dirname, isfile, join from typing import TYPE_CHECKING, cast if TYPE_CHECKING: from collections.abc import Callable, Iterator from typing import Any from pyglossary.glossary_types import EntryTy...
23,490
Python
.py
898
22.423163
73
0.654474
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,836
tabfile.py
ilius_pyglossary/pyglossary/plugins/tabfile.py
# -*- coding: utf-8 -*- from __future__ import annotations from collections.abc import Generator from typing import TYPE_CHECKING from pyglossary.compression import stdCompressions from pyglossary.core import log from pyglossary.option import ( BoolOption, EncodingOption, FileSizeOption, Option, ) from pyglossar...
3,100
Python
.py
119
23.411765
72
0.723928
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,837
json_plugin.py
ilius_pyglossary/pyglossary/plugins/json_plugin.py
# -*- coding: utf-8 -*- from __future__ import annotations from collections.abc import Generator from typing import TYPE_CHECKING from pyglossary.compression import ( # compressionOpen, stdCompressions, ) from pyglossary.option import ( BoolOption, EncodingOption, Option, ) if TYPE_CHECKING: from pyglossary.g...
2,176
Python
.py
91
21.505495
70
0.713111
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,838
wiktextract.py
ilius_pyglossary/pyglossary/plugins/wiktextract.py
# -*- coding: utf-8 -*- from __future__ import annotations import collections from io import BytesIO, IOBase from json import loads as json_loads from typing import TYPE_CHECKING, cast if TYPE_CHECKING: from collections.abc import Callable, Iterator from typing import Any from pyglossary.glossary_types import Ent...
15,768
Python
.py
602
22.61794
72
0.644986
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,839
ebook_kobo.py
ilius_pyglossary/pyglossary/plugins/ebook_kobo.py
# -*- coding: utf-8 -*- # The MIT License (MIT) # Copyright © 2012-2016 Alberto Pettarin (alberto@albertopettarin.it) # Copyright © 2022 Saeed Rasooli <saeed.gnu@gmail.com> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software...
7,459
Python
.py
228
29.486842
96
0.697843
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,840
stardict_textual.py
ilius_pyglossary/pyglossary/plugins/stardict_textual.py
# -*- coding: utf-8 -*- from __future__ import annotations import os from os.path import dirname, isdir, join from typing import TYPE_CHECKING, cast if TYPE_CHECKING: import io from collections.abc import Generator, Iterator from lxml import builder from pyglossary.glossary_types import EntryType, GlossaryType ...
9,605
Python
.py
343
24.443149
70
0.670109
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,841
babylon_bdc.py
ilius_pyglossary/pyglossary/plugins/babylon_bdc.py
# -*- coding: utf-8 -*- from __future__ import annotations from typing import TYPE_CHECKING if TYPE_CHECKING: from pyglossary.option import Option __all__ = [ "description", "enable", "extensionCreate", "extensions", "format", "kind", "lname", "optionsProp", "singleFile", "website", "wiki", ] enable = ...
539
Python
.py
29
17
37
0.706931
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,842
dict_cc_split.py
ilius_pyglossary/pyglossary/plugins/dict_cc_split.py
# -*- coding: utf-8 -*- from __future__ import annotations import html from collections.abc import Iterator from typing import TYPE_CHECKING if TYPE_CHECKING: import sqlite3 from pyglossary.glossary_types import EntryType, GlossaryType from pyglossary.option import Option from pyglossary.core import log __all__...
2,641
Python
.py
98
24.255102
64
0.686981
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,843
ebook_kobo_dictfile.py
ilius_pyglossary/pyglossary/plugins/ebook_kobo_dictfile.py
# -*- coding: utf-8 -*- # The MIT License (MIT) # Copyright © 2020-2021 Saeed Rasooli <saeed.gnu@gmail.com> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including wit...
5,944
Python
.py
194
27.78866
81
0.700717
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,844
dikt_json.py
ilius_pyglossary/pyglossary/plugins/dikt_json.py
# -*- coding: utf-8 -*- # mypy: ignore-errors # from https://github.com/maxim-saplin/pyglossary from __future__ import annotations import re from collections.abc import Generator from typing import TYPE_CHECKING from pyglossary.compression import ( # compressionOpen, stdCompressions, ) from pyglossary.option impor...
2,699
Python
.py
100
24.37
70
0.676242
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,845
gettext_po.py
ilius_pyglossary/pyglossary/plugins/gettext_po.py
# -*- coding: utf-8 -*- from __future__ import annotations import os from collections.abc import Generator, Iterator from os.path import isdir from typing import TYPE_CHECKING from pyglossary.core import exc_note, log, pip from pyglossary.io_utils import nullTextIO from pyglossary.option import ( BoolOption, Optio...
4,143
Python
.py
163
22.257669
66
0.672654
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,846
ebook_mobi.py
ilius_pyglossary/pyglossary/plugins/ebook_mobi.py
# -*- coding: utf-8 -*- # The MIT License (MIT) # Copyright © 2012-2016 Alberto Pettarin (alberto@albertopettarin.it) # Copyright © 2016-2022 Saeed Rasooli <saeed.gnu@gmail.com> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Sof...
10,932
Python
.py
349
28.7851
79
0.726497
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,847
wordset.py
ilius_pyglossary/pyglossary/plugins/wordset.py
# -*- coding: utf-8 -*- from __future__ import annotations from collections.abc import Iterator from json import load from os import listdir from os.path import isfile, join, splitext from typing import TYPE_CHECKING from pyglossary.core import log from pyglossary.option import ( EncodingOption, Option, ) from pygl...
3,012
Python
.py
118
22.29661
68
0.671761
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,848
crawler_dir.py
ilius_pyglossary/pyglossary/plugins/crawler_dir.py
# mypy: ignore-errors from __future__ import annotations from collections.abc import Generator, Iterator from hashlib import sha1 from os import listdir, makedirs from os.path import dirname, isdir, isfile, join, splitext from typing import TYPE_CHECKING from pyglossary.compression import ( compressionOpenFunc, ) fr...
4,704
Python
.py
181
22.906077
69
0.684831
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,849
cc_kedict.py
ilius_pyglossary/pyglossary/plugins/cc_kedict.py
# -*- coding: utf-8 -*- # mypy: ignore-errors from __future__ import annotations from collections.abc import Callable, Iterator from io import BytesIO from os.path import isdir, join from typing import TYPE_CHECKING, Any if TYPE_CHECKING: import lxml from pyglossary.glossary_types import EntryType, GlossaryType f...
7,164
Python
.py
288
21.451389
62
0.663736
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,850
digitalnk.py
ilius_pyglossary/pyglossary/plugins/digitalnk.py
# -*- coding: utf-8 -*- from __future__ import annotations import html from collections.abc import Iterator from typing import TYPE_CHECKING if TYPE_CHECKING: import sqlite3 from pyglossary.glossary_types import EntryType, GlossaryType from pyglossary.option import Option __all__ = [ "Reader", "description", ...
2,017
Python
.py
77
23.766234
62
0.70109
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,851
ebook_epub2.py
ilius_pyglossary/pyglossary/plugins/ebook_epub2.py
# -*- coding: utf-8 -*- # The MIT License (MIT) # Copyright © 2012-2016 Alberto Pettarin (alberto@albertopettarin.it) # Copyright © 2016-2019 Saeed Rasooli <saeed.gnu@gmail.com> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Sof...
7,500
Python
.py
270
25.474074
81
0.703123
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,852
appledict_properties.py
ilius_pyglossary/pyglossary/plugins/appledict_bin/appledict_properties.py
# -*- coding: utf-8 -*- # Copyright © 2023 soshial <soshial@gmail.com> (soshial) # # This program is a 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 3 of the License. # # You can get a copy of GNU Gene...
3,328
Python
.py
81
38.839506
80
0.767492
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,853
__init__.py
ilius_pyglossary/pyglossary/plugins/appledict_bin/__init__.py
# -*- coding: utf-8 -*- # Copyright © 2019 Saeed Rasooli <saeed.gnu@gmail.com> (ilius) # # This program is a 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 3 of the License. # # You can get a copy of GN...
20,820
Python
.py
649
28.322034
77
0.70964
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,854
appledict_file_tools.py
ilius_pyglossary/pyglossary/plugins/appledict_bin/appledict_file_tools.py
# -*- coding: utf-8 -*- # Copyright © 2023 soshial <soshial@gmail.com> (soshial) # # This program is a 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 3 of the License. # # You can get a copy of GNU Gen...
1,905
Python
.py
50
36.26
72
0.749592
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,855
key_data.py
ilius_pyglossary/pyglossary/plugins/appledict_bin/key_data.py
# -*- coding: utf-8 -*- # Copyright © 2023 soshial <soshial@gmail.com> (soshial) # # This program is a 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 3 of the License. # # You can get a copy of GNU Gener...
4,273
Python
.py
119
33.210084
80
0.716581
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,856
article_address.py
ilius_pyglossary/pyglossary/plugins/appledict_bin/article_address.py
# -*- coding: utf-8 -*- # Copyright © 2023 soshial <soshial@gmail.com> (soshial) # # This program is a 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 3 of the License. # # You can get a copy of GNU Gen...
939
Python
.py
22
41.136364
72
0.768132
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,857
_types.py
ilius_pyglossary/pyglossary/plugins/dsl/_types.py
from __future__ import annotations import typing from collections.abc import Callable from typing import TYPE_CHECKING __all__ = [ "ErrorType", "LexType", "TitleLexType", "TitleTransformerType", "TransformerType", ] class TransformerType(typing.Protocol): start: int pos: int input: str output: str current...
1,176
Python
.py
54
19.296296
74
0.723481
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,858
test.py
ilius_pyglossary/pyglossary/plugins/dsl/test.py
import sys from os.path import dirname sys.path.insert(0, dirname(dirname(dirname(dirname(__file__))))) # noqa: E402 from pyglossary.plugins.dsl.transform import Transformer if __name__ == "__main__": input = sys.argv[1] tr = Transformer( input, currentKey="HEADWORD", ) result, err = tr.transform() if err:...
444
Python
.py
17
23.941176
78
0.709906
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,859
transform.py
ilius_pyglossary/pyglossary/plugins/dsl/transform.py
from __future__ import annotations import re from typing import TYPE_CHECKING, NamedTuple, cast from xml.sax.saxutils import escape from pyglossary.core import log from .lex import lexRoot if TYPE_CHECKING: from ._types import ErrorType, LexType, TransformerType __all__ = ["Transformer"] re_comment_block = re.c...
3,657
Python
.py
148
21.432432
68
0.63451
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,860
title.py
ilius_pyglossary/pyglossary/plugins/dsl/title.py
from __future__ import annotations from typing import TYPE_CHECKING, NamedTuple, cast from xml.sax.saxutils import escape from pyglossary.core import log from .transform import Transformer if TYPE_CHECKING: from ._types import ErrorType from ._types import TitleLexType as LexType from ._types import TitleTransfo...
2,908
Python
.py
114
22.508772
67
0.676225
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,861
__init__.py
ilius_pyglossary/pyglossary/plugins/dsl/__init__.py
# -*- coding: utf-8 -*- # dsl/__init__.py # Read ABBYY Lingvo DSL dictionary format # # Copyright © 2013-2020 Saeed Rasooli <saeed.gnu@gmail.com> # Copyright © 2016 ivan tkachenko me@ratijas.tk # Copyright © 2013 Xiaoqiang Wang <xiaoqiangwang AT gmail DOT com> # # This program is a free software; you can redistribute i...
9,794
Python
.py
349
24.939828
83
0.69393
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,862
lex.py
ilius_pyglossary/pyglossary/plugins/dsl/lex.py
from __future__ import annotations from os.path import splitext from typing import TYPE_CHECKING from xml.sax.saxutils import escape, quoteattr from pyglossary.core import log if TYPE_CHECKING: from ._types import ErrorType, LexType, TransformerType __all__ = ["lexRoot"] # rename to lexText? def lexRoot(tr: Tran...
7,362
Python
.py
304
21.519737
92
0.622604
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,863
__init__.py
ilius_pyglossary/pyglossary/plugins/xdxf_css/__init__.py
# -*- coding: utf-8 -*- # xdxf/__init__.py from __future__ import annotations """xdxf file format reader and utils to convert xdxf to html.""" # # Copyright © 2023 Saeed Rasooli # Copyright © 2016 ivan tkachenko me@ratijas.tk # # some parts of this file include code from: # Aard Dictionary Tools <http://aarddict.org>....
8,942
Python
.py
309
25.773463
77
0.676019
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,864
__init__.py
ilius_pyglossary/pyglossary/plugins/xdxf/__init__.py
# -*- coding: utf-8 -*- # xdxf/__init__.py from __future__ import annotations """xdxf file format reader and utils to convert xdxf to html.""" # # Copyright © 2023 Saeed Rasooli # Copyright © 2016 ivan tkachenko me@ratijas.tk # # some parts of this file include code from: # Aard Dictionary Tools <http://aarddict.org>....
7,809
Python
.py
286
24.167832
75
0.680118
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,865
__init__.py
ilius_pyglossary/pyglossary/plugins/octopus_mdict_new/__init__.py
# -*- coding: utf-8 -*- # Read Octopus MDict dictionary format, mdx(dictionary)/mdd(data) # # Copyright © 2013 Xiaoqiang Wang <xiaoqiangwang AT gmail DOT com> # Copyright © 2013-2021 Saeed Rasooli <saeed.gnu@gmail.com> # # This program is a free software; you can redistribute it and/or modify # it under the terms of th...
7,169
Python
.py
236
27.305085
79
0.685035
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,866
_dict.py
ilius_pyglossary/pyglossary/plugins/appledict/_dict.py
# -*- coding: utf-8 -*- # appledict/_dict.py # Output to Apple Dictionary xml sources for Dictionary Development Kit. # # Copyright © 2016-2019 Saeed Rasooli <saeed.gnu@gmail.com> (ilius) # Copyright © 2016 ivan tkachenko me@ratijas.tk # Copyright © 2012-2015 Xiaoqiang Wang <xiaoqiangwang AT gmail DOT com> # # This pro...
3,358
Python
.py
100
31
114
0.729889
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,867
_content.py
ilius_pyglossary/pyglossary/plugins/appledict/_content.py
# -*- coding: utf-8 -*- # # Copyright © 2016-2019 Saeed Rasooli <saeed.gnu@gmail.com> (ilius) # Copyright © 2016 ivan tkachenko me@ratijas.tk # Copyright © 2012-2015 Xiaoqiang Wang <xiaoqiangwang AT gmail DOT com> # # This program is a free software; you can redistribute it and/or modify # it under the terms of the GNU...
7,780
Python
.py
236
30.360169
75
0.658387
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,868
__init__.py
ilius_pyglossary/pyglossary/plugins/appledict/__init__.py
# -*- coding: utf-8 -*- # # Output to Apple Dictionary xml sources for Dictionary Development Kit. # # Copyright © 2016-2023 Saeed Rasooli <saeed.gnu@gmail.com> (ilius) # Copyright © 2016 ivan tkachenko <me@ratijas.tk> # Copyright © 2012-2015 Xiaoqiang Wang <xiaoqiangwang AT gmail DOT com> # # This program is a free so...
10,857
Python
.py
346
28.283237
78
0.714026
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,869
_normalize.py
ilius_pyglossary/pyglossary/plugins/appledict/_normalize.py
# -*- coding: utf-8 -*- # appledict/_normalize.py # Output to Apple Dictionary xml sources for Dictionary Development Kit. # # Copyright © 2016-2019 Saeed Rasooli <saeed.gnu@gmail.com> (ilius) # Copyright © 2016 ivan tkachenko me@ratijas.tk # Copyright © 2012-2015 Xiaoqiang Wang <xiaoqiangwang AT gmail DOT com> # # Thi...
3,534
Python
.py
132
24.469697
72
0.615931
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,870
__main__.py
ilius_pyglossary/pyglossary/plugins/appledict/jing/__main__.py
"""main entry point.""" import logging import os import sys sys.path.append(os.path.abspath(os.path.dirname(__file__))) # noqa: E402 from . import main log = logging.getLogger("root") console_output_handler = logging.StreamHandler(sys.stderr) console_output_handler.setFormatter( logging.Formatter( "%(asctime)s:...
420
Python
.py
16
24.6875
73
0.77193
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,871
__init__.py
ilius_pyglossary/pyglossary/plugins/appledict/jing/__init__.py
""" checking XML files with Apple Dictionary Schema. this module can be run from command line with only argument -- file to be checked. otherwise, you need to import this module and call `run` function with the filename as its only argument. """ __all__ = ["JingTestError", "run"] from .main import JingTestError, ru...
322
Python
.py
8
38.875
70
0.765273
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,872
main.py
ilius_pyglossary/pyglossary/plugins/appledict/jing/main.py
from __future__ import annotations """Jing, a validator for RELAX NG and other schema languages.""" import logging import subprocess import sys from os import path __all__ = ["JingTestError", "main", "run"] log = logging.getLogger("pyglossary") log.setLevel(logging.DEBUG) class JingTestError(subprocess.CalledProc...
2,219
Python
.py
75
27
76
0.707156
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,873
ru.py
ilius_pyglossary/pyglossary/plugins/appledict/indexes/ru.py
# -*- coding: utf-8 -*- # appledict/indexes/ru.py # # Copyright © 2016 ivan tkachenko me@ratijas.tk # # This program is a 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 3 of the License. # # You can get ...
2,585
Python
.py
73
32.835616
74
0.726138
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,874
zh.py
ilius_pyglossary/pyglossary/plugins/appledict/indexes/zh.py
# -*- coding: utf-8 -*- # appledict/indexes/zh.py # # Copyright © 2016 ivan tkachenko me@ratijas.tk # # This program is a 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 3 of the License. # # You can get ...
3,219
Python
.py
97
30.56701
77
0.73771
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,875
__init__.py
ilius_pyglossary/pyglossary/plugins/appledict/indexes/__init__.py
# -*- coding: utf-8 -*- # appledict/indexes/__init__.py # # Copyright © 2016 ivan tkachenko me@ratijas.tk # # This program is a 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 3 of the License. # # You c...
1,592
Python
.py
43
35.604651
80
0.760884
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,876
bgl_text.py
ilius_pyglossary/pyglossary/plugins/babylon_bgl/bgl_text.py
# -*- coding: utf-8 -*- # # Copyright © 2008-2021 Saeed Rasooli <saeed.gnu@gmail.com> (ilius) # Copyright © 2011-2012 kubtek <kubtek@gmail.com> # This file is part of PyGlossary project, http://github.com/ilius/pyglossary # Thanks to Raul Fernandes <rgfbr@yahoo.com.br> and Karl Grill for reverse # engineering as part o...
8,663
Python
.py
280
28.335714
78
0.675264
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,877
bgl_charset.py
ilius_pyglossary/pyglossary/plugins/babylon_bgl/bgl_charset.py
# -*- coding: utf-8 -*- # # Copyright © 2008-2020 Saeed Rasooli <saeed.gnu@gmail.com> (ilius) # # This program is a 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, or (at your option) # any lat...
1,327
Python
.py
34
37.558824
78
0.717273
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,878
bgl_reader.py
ilius_pyglossary/pyglossary/plugins/babylon_bgl/bgl_reader.py
# -*- coding: utf-8 -*- # mypy: ignore-errors # # Copyright © 2008-2021 Saeed Rasooli <saeed.gnu@gmail.com> (ilius) # Copyright © 2011-2012 kubtek <kubtek@gmail.com> # This file is part of PyGlossary project, http://github.com/ilius/pyglossary # Thanks to Raul Fernandes <rgfbr@yahoo.com.br> and Karl Grill for reverse #...
48,114
Python
.py
1,531
27.504246
84
0.66877
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,879
bgl_gzip.py
ilius_pyglossary/pyglossary/plugins/babylon_bgl/bgl_gzip.py
"""Functions that read and write gzipped files. The user of the file doesn't have to worry about the compression, but random access is not allowed. """ # based on Andrew Kuchling's minigzip.py distributed with the zlib module import logging import builtins import io import os import struct import time import zlib i...
17,571
Python
.py
429
30.582751
80
0.577611
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,880
bgl_pos.py
ilius_pyglossary/pyglossary/plugins/babylon_bgl/bgl_pos.py
# -*- coding: utf-8 -*- # # Copyright © 2008-2020 Saeed Rasooli <saeed.gnu@gmail.com> (ilius) # Copyright © 2011-2012 kubtek <kubtek@gmail.com> # This file is part of PyGlossary project, http://github.com/ilius/pyglossary # Thanks to Raul Fernandes <rgfbr@yahoo.com.br> and Karl Grill for reverse # engineering as part o...
2,348
Python
.py
69
31.550725
78
0.716344
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,881
bgl_language.py
ilius_pyglossary/pyglossary/plugins/babylon_bgl/bgl_language.py
# -*- coding: utf-8 -*- # # Copyright © 2008-2020 Saeed Rasooli <saeed.gnu@gmail.com> (ilius) # Copyright © 2011-2012 kubtek <kubtek@gmail.com> # This file is part of PyGlossary project, http://github.com/ilius/pyglossary # Thanks to Raul Fernandes <rgfbr@yahoo.com.br> and Karl Grill for reverse # engineering as part o...
14,129
Python
.py
563
22.648313
83
0.736248
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,882
bgl_reader_debug.py
ilius_pyglossary/pyglossary/plugins/babylon_bgl/bgl_reader_debug.py
# -*- coding: utf-8 -*- # mypy: ignore-errors # # Copyright © 2008-2021 Saeed Rasooli <saeed.gnu@gmail.com> (ilius) # # This program is a 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, or (at y...
14,600
Python
.py
473
27.298097
82
0.701522
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,883
bgl_internal_test.py
ilius_pyglossary/pyglossary/plugins/babylon_bgl/bgl_internal_test.py
import unittest from pyglossary.plugins.babylon_bgl.bgl_reader_debug import isASCII class BglInternalTest(unittest.TestCase): def test_isASCII(self): f = isASCII self.assertEqual(f(""), True) self.assertEqual(f("abc"), True) self.assertEqual(f("xyz"), True) self.assertEqual(f("ABC"), True) self.assertEq...
537
Python
.py
15
33.066667
67
0.726397
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,884
__init__.py
ilius_pyglossary/pyglossary/plugins/babylon_bgl/__init__.py
# -*- coding: utf-8 -*- # mypy: ignore-errors # # Copyright © 2008-2021 Saeed Rasooli <saeed.gnu@gmail.com> (ilius) # # This program is a 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, or (at ...
1,367
Python
.py
47
27.744681
78
0.74924
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,885
bgl_info.py
ilius_pyglossary/pyglossary/plugins/babylon_bgl/bgl_info.py
# -*- coding: utf-8 -*- # mypy: ignore-errors # # Copyright © 2008-2021 Saeed Rasooli <saeed.gnu@gmail.com> (ilius) # Copyright © 2011-2012 kubtek <kubtek@gmail.com> # This file is part of PyGlossary project, http://github.com/ilius/pyglossary # Thanks to Raul Fernandes <rgfbr@yahoo.com.br> and Karl Grill for reverse #...
7,052
Python
.py
241
26.929461
78
0.731711
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,886
summarize.py
ilius_pyglossary/pyglossary/plugins/edict2/summarize.py
from __future__ import annotations import re import string __all__ = ["summarize"] parenthetical = re.compile(r"\([^)]+?\)") punct_table = {ord(p): " " for p in string.punctuation if p not in "-'"} stops = { "i", "me", "my", "myself", "we", "our", "ours", "ourselves", "you", "your", "yours", "yourself", ...
1,860
Python
.py
169
9.023669
72
0.551008
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,887
conv.py
ilius_pyglossary/pyglossary/plugins/edict2/conv.py
from __future__ import annotations import re from collections.abc import Callable from io import BytesIO from typing import TYPE_CHECKING, NamedTuple, cast from lxml import etree as ET from pyglossary.core import log from .pinyin import convert from .summarize import summarize if TYPE_CHECKING: from collections.a...
3,114
Python
.py
95
29.957895
80
0.682959
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,888
__init__.py
ilius_pyglossary/pyglossary/plugins/edict2/__init__.py
from __future__ import annotations from collections.abc import Iterator from typing import TYPE_CHECKING from pyglossary.core import log from pyglossary.io_utils import nullTextIO from pyglossary.option import ( BoolOption, EncodingOption, Option, ) from . import conv if TYPE_CHECKING: import io from pyglossa...
3,309
Python
.py
122
24.311475
76
0.715783
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,889
pinyin.py
ilius_pyglossary/pyglossary/plugins/edict2/pinyin.py
# coding=utf-8 # based on https://github.com/zkoch/CEDICT_Parser from __future__ import annotations __all__ = ["convert"] TONES = { "a1": "ā", "a2": "á", "a3": "ǎ", "a4": "à", "e1": "ē", "e2": "é", "e3": "ě", "e4": "è", "i1": "ī", "i2": "í", "i3": "ǐ", "i4": "ì", "o1": "ō", "o2": "ó", "o3": "ǒ", "o4"...
867
Python
.py
44
17
60
0.510127
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,890
plugin-index.py
ilius_pyglossary/scripts/plugin-index.py
#!/usr/bin/python3 import json import sys from collections import OrderedDict as odict from os.path import abspath, dirname, join from pathlib import Path rootDir = dirname(dirname(abspath(__file__))) sys.path.insert(0, rootDir) from pyglossary.core import userPluginsDir from pyglossary.flags import DEFAULT_NO from ...
1,708
Python
.py
69
22.42029
81
0.730061
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,891
entry-filters-doc.py
ilius_pyglossary/scripts/entry-filters-doc.py
#!/usr/bin/python3 import sys from os.path import abspath, dirname, join from mako.template import Template rootDir = dirname(dirname(abspath(__file__))) sys.path.insert(0, rootDir) from pyglossary.entry_filters import entryFiltersRules from pyglossary.ui.base import UIBase ui = UIBase() ui.loadConfig(user=False) ...
1,950
Python
.py
78
22.653846
72
0.693889
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,892
config-doc.py
ilius_pyglossary/scripts/config-doc.py
#!/usr/bin/env python import json import re import sys from os.path import abspath, dirname, join from mako.template import Template rootDir = dirname(dirname(abspath(__file__))) sys.path.insert(0, rootDir) from pyglossary.ui.base import UIBase ui = UIBase() ui.loadConfig(user=False) # ui.configDefDict re_flag =...
4,205
Python
.py
140
27.585714
83
0.663098
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,893
tools-py2toml.py
ilius_pyglossary/scripts/tools-py2toml.py
#!/usr/bin/python3 import sys from collections import OrderedDict from os.path import abspath, dirname, join from pathlib import Path import toml rootDir = dirname(dirname(abspath(__file__))) sys.path.insert(0, rootDir) from pyglossary.core import userPluginsDir from pyglossary.glossary import Glossary Glossary.in...
870
Python
.py
29
28.103448
83
0.763571
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,894
create-conf-dir.py
ilius_pyglossary/scripts/create-conf-dir.py
#!/usr/bin/env python3 import os import sys from os.path import abspath, dirname rootDir = dirname(dirname(abspath(__file__))) sys.path.insert(0, rootDir) from pyglossary.core import confDir os.makedirs(confDir, mode=0o755, exist_ok=True)
243
Python
.py
8
28.875
47
0.796537
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,895
glos-find-bar-words.py
ilius_pyglossary/scripts/glos-find-bar-words.py
#!/usr/bin/python3 import sys from os.path import abspath, dirname rootDir = dirname(dirname(abspath(__file__))) sys.path.insert(0, rootDir) from pyglossary import Glossary def hasBar(entry): return any("|" in word for word in entry.l_word) Glossary.init( # usePluginsJson=False, ) for direct in (True, False):...
636
Python
.py
26
22.115385
55
0.68
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,896
wiki-formats.py
ilius_pyglossary/scripts/wiki-formats.py
#!/usr/bin/env python3 import os import sys from os.path import join from pathlib import Path from mako.template import Template rootDir = join( os.getenv("HOME"), "pyglossary", ) sys.path.insert(0, rootDir) from pyglossary.core import userPluginsDir from pyglossary.glossary import Glossary Glossary.init( # use...
3,012
Python
.py
145
18.848276
178
0.67842
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,897
plugin-doc.py
ilius_pyglossary/scripts/plugin-doc.py
#!/usr/bin/python3 import sys from collections import OrderedDict from os.path import abspath, dirname, join from pathlib import Path import toml from mako.template import Template rootDir = dirname(dirname(abspath(__file__))) sys.path.insert(0, rootDir) from pyglossary.core import userPluginsDir from pyglossary.gl...
7,430
Python
.py
292
22.739726
77
0.677036
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,898
plist-to-json.py
ilius_pyglossary/scripts/plist-to-json.py
#!/usr/bin/env python import json import sys import biplist plistPath = sys.argv[1] try: data = biplist.readPlist(plistPath) except (biplist.InvalidPlistException, biplist.NotBinaryPlistException): try: import plistlib with open(plistPath, mode="rb") as plist_file: data = plistlib.loads(plist_file.read())...
532
Python
.py
18
27.111111
72
0.75
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)
6,899
plugin-validate.py
ilius_pyglossary/scripts/plugin-validate.py
#!/usr/bin/python3 import sys from os.path import abspath, dirname from pathlib import Path rootDir = dirname(dirname(abspath(__file__))) sys.path.insert(0, rootDir) from pyglossary.core import userPluginsDir from pyglossary.glossary import Glossary Glossary.init( usePluginsJson=False, skipDisabledPlugins=False, ...
585
Python
.py
22
25
81
0.804309
ilius/pyglossary
2,176
238
22
GPL-3.0
9/5/2024, 5:10:09 PM (Europe/Amsterdam)