bijoy-unicode 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ node_modules/
2
+ dist/
3
+ *.tgz
4
+ python/.venv/
5
+ python/venv/
6
+ python/dist/
7
+ python/build/
8
+ python/**/__pycache__/
9
+ python/**/*.egg-info/
10
+ .pytest_cache/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 KovaPDF
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,59 @@
1
+ Metadata-Version: 2.5
2
+ Name: bijoy-unicode
3
+ Version: 1.0.0
4
+ Summary: Convert Bijoy (SutonnyMJ) Bangla text to Unicode and back. Pure Python, no dependencies. The engine behind kovapdf.com/bijoy-to-unicode.
5
+ Project-URL: Homepage, https://www.kovapdf.com/bijoy-to-unicode
6
+ Project-URL: Source, https://github.com/kovapdf/bijoy-unicode
7
+ Project-URL: Issues, https://github.com/kovapdf/bijoy-unicode/issues
8
+ Author-email: KovaPDF <support@kovapdf.com>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: bangla,bangladesh,bengali,bijoy,bijoy-to-unicode,converter,nikosh,sutonny,sutonnymj,unicode
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Natural Language :: Bengali
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Topic :: Text Processing :: Linguistic
18
+ Classifier: Typing :: Typed
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+
22
+ # bijoy-unicode (Python)
23
+
24
+ Convert Bangla text typed in **Bijoy** (the SutonnyMJ family of fonts) to **Unicode**, and Unicode back to Bijoy. Pure Python, no dependencies, works offline.
25
+
26
+ This is a port of the conversion engine that runs the Bijoy to Unicode tool on KovaPDF. Its tables are generated from that engine, and it passes the same test vectors as the JavaScript package (`@kovapdf/bijoy-unicode` on npm).
27
+
28
+ Need it for whole PDF or Word files? Use KovaPDF: https://www.kovapdf.com/bijoy-to-unicode
29
+
30
+ Built by KovaPDF, https://www.kovapdf.com
31
+
32
+ ```sh
33
+ pip install bijoy-unicode
34
+ ```
35
+
36
+ ```python
37
+ from bijoy_unicode import to_unicode, to_bijoy, convert_with_report, detect_encoding, is_bijoy_font
38
+
39
+ to_unicode("Avgvi †mvbvi evsjv") # 'আমার সোনার বাংলা'
40
+ to_bijoy("আমার সোনার বাংলা") # 'Avgvi †mvbvi evsjv'
41
+ to_unicode("GB file wU download Kiæb", keep_english=True) # 'এই file টি download করুন'
42
+ to_bijoy("শিক্ষা", flavour="classic") # 'wk¶v'
43
+ convert_with_report("Avwg 😀", "bijoy-to-unicode") # dict: text, keptEnglish, unknown, stats
44
+ detect_encoding("evsjv‡`k miKvi")["kind"] # 'bijoy'
45
+ is_bijoy_font("SutonnyMJ") # True
46
+ ```
47
+
48
+ Command line (stdin or a file in, stdout out):
49
+
50
+ ```sh
51
+ bijoy-unicode to-unicode < bijoy.txt > unicode.txt
52
+ python -m bijoy_unicode to-bijoy unicode.txt
53
+ ```
54
+
55
+ **SutonnyMJ** is a Bijoy font: it draws Bangla shapes on ordinary Latin codes, so its text reads as "Avgvi" without the font. **Nikosh** is a Unicode font: set converted text in Nikosh (or any Unicode Bangla font). No fonts are included in this package.
56
+
57
+ Full documentation: https://github.com/kovapdf/bijoy-unicode
58
+
59
+ The code is MIT licensed. The KovaPDF name, logo and website content are not covered by that licence.
@@ -0,0 +1,38 @@
1
+ # bijoy-unicode (Python)
2
+
3
+ Convert Bangla text typed in **Bijoy** (the SutonnyMJ family of fonts) to **Unicode**, and Unicode back to Bijoy. Pure Python, no dependencies, works offline.
4
+
5
+ This is a port of the conversion engine that runs the Bijoy to Unicode tool on KovaPDF. Its tables are generated from that engine, and it passes the same test vectors as the JavaScript package (`@kovapdf/bijoy-unicode` on npm).
6
+
7
+ Need it for whole PDF or Word files? Use KovaPDF: https://www.kovapdf.com/bijoy-to-unicode
8
+
9
+ Built by KovaPDF, https://www.kovapdf.com
10
+
11
+ ```sh
12
+ pip install bijoy-unicode
13
+ ```
14
+
15
+ ```python
16
+ from bijoy_unicode import to_unicode, to_bijoy, convert_with_report, detect_encoding, is_bijoy_font
17
+
18
+ to_unicode("Avgvi †mvbvi evsjv") # 'আমার সোনার বাংলা'
19
+ to_bijoy("আমার সোনার বাংলা") # 'Avgvi †mvbvi evsjv'
20
+ to_unicode("GB file wU download Kiæb", keep_english=True) # 'এই file টি download করুন'
21
+ to_bijoy("শিক্ষা", flavour="classic") # 'wk¶v'
22
+ convert_with_report("Avwg 😀", "bijoy-to-unicode") # dict: text, keptEnglish, unknown, stats
23
+ detect_encoding("evsjv‡`k miKvi")["kind"] # 'bijoy'
24
+ is_bijoy_font("SutonnyMJ") # True
25
+ ```
26
+
27
+ Command line (stdin or a file in, stdout out):
28
+
29
+ ```sh
30
+ bijoy-unicode to-unicode < bijoy.txt > unicode.txt
31
+ python -m bijoy_unicode to-bijoy unicode.txt
32
+ ```
33
+
34
+ **SutonnyMJ** is a Bijoy font: it draws Bangla shapes on ordinary Latin codes, so its text reads as "Avgvi" without the font. **Nikosh** is a Unicode font: set converted text in Nikosh (or any Unicode Bangla font). No fonts are included in this package.
35
+
36
+ Full documentation: https://github.com/kovapdf/bijoy-unicode
37
+
38
+ The code is MIT licensed. The KovaPDF name, logo and website content are not covered by that licence.
@@ -0,0 +1,45 @@
1
+ [build-system]
2
+ requires = ["hatchling==1.33.0"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "bijoy-unicode"
7
+ version = "1.0.0"
8
+ description = "Convert Bijoy (SutonnyMJ) Bangla text to Unicode and back. Pure Python, no dependencies. The engine behind kovapdf.com/bijoy-to-unicode."
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ license-files = ["LICENSE"]
12
+ requires-python = ">=3.10"
13
+ authors = [{ name = "KovaPDF", email = "support@kovapdf.com" }]
14
+ keywords = ["bangla", "bengali", "bijoy", "sutonnymj", "sutonny", "unicode", "converter", "bijoy-to-unicode", "nikosh", "bangladesh"]
15
+ classifiers = [
16
+ "Development Status :: 5 - Production/Stable",
17
+ "Intended Audience :: Developers",
18
+ "Natural Language :: Bengali",
19
+ "Operating System :: OS Independent",
20
+ "Programming Language :: Python :: 3",
21
+ "Topic :: Text Processing :: Linguistic",
22
+ "Typing :: Typed",
23
+ ]
24
+ dependencies = []
25
+
26
+ [project.urls]
27
+ Homepage = "https://www.kovapdf.com/bijoy-to-unicode"
28
+ Source = "https://github.com/kovapdf/bijoy-unicode"
29
+ Issues = "https://github.com/kovapdf/bijoy-unicode/issues"
30
+
31
+ [project.scripts]
32
+ bijoy-unicode = "bijoy_unicode.cli:main"
33
+
34
+ [tool.hatch.build.targets.wheel]
35
+ packages = ["src/bijoy_unicode"]
36
+
37
+ [tool.hatch.build.targets.sdist]
38
+ include = ["src/bijoy_unicode", "tests", "README.md", "LICENSE", "pyproject.toml"]
39
+
40
+ # the shared vectors live one folder up; ship a copy so the sdist tests run on their own
41
+ [tool.hatch.build.targets.sdist.force-include]
42
+ "../test/vectors.json" = "tests/vectors.json"
43
+
44
+ [tool.pytest.ini_options]
45
+ testpaths = ["tests"]
@@ -0,0 +1,33 @@
1
+ """Bijoy (SutonnyMJ) <-> Unicode Bangla converter.
2
+
3
+ Pure Python port of the engine behind https://www.kovapdf.com/bijoy-to-unicode.
4
+ Built by KovaPDF, https://www.kovapdf.com
5
+ """
6
+
7
+ from ._engine import (
8
+ bijoy_to_unicode,
9
+ convert_with_report,
10
+ detect_encoding,
11
+ is_bijoy_font,
12
+ unicode_to_bijoy,
13
+ )
14
+ from ._tables import BIJOY_FONT_NAMES
15
+
16
+ __version__ = "1.0.0"
17
+ ATTRIBUTION = "Done with KovaPDF (kovapdf.com)."
18
+
19
+ # short names
20
+ to_unicode = bijoy_to_unicode
21
+ to_bijoy = unicode_to_bijoy
22
+
23
+ __all__ = [
24
+ "ATTRIBUTION",
25
+ "BIJOY_FONT_NAMES",
26
+ "bijoy_to_unicode",
27
+ "convert_with_report",
28
+ "detect_encoding",
29
+ "is_bijoy_font",
30
+ "to_bijoy",
31
+ "to_unicode",
32
+ "unicode_to_bijoy",
33
+ ]
@@ -0,0 +1,3 @@
1
+ from .cli import main
2
+
3
+ raise SystemExit(main())