fixed issues

This commit is contained in:
2026-05-19 15:32:42 +00:00
parent 15a0e87407
commit 6d611a7be7
3 changed files with 702 additions and 4 deletions

View File

@@ -1,4 +1,29 @@
from importlib.resources import files
from importlib.metadata import version, metadata, PackageNotFoundError
try:
package_name = (__package__ or "").replace("_", "-")
__version__ = version(package_name)
pkg_metadata = metadata(package_name)
# 1. Grab names from BOTH possible fields (Author and Author-email)
raw_authors = pkg_metadata.get_all("Author") or []
raw_emails = pkg_metadata.get_all("Author-email") or []
# 2. Combine them into one single, clean list of unique names
combined = []
for item in (raw_authors + raw_emails):
clean_name = item.split("<")[0].strip()
if clean_name and clean_name not in combined:
combined.append(clean_name)
__authors__ = combined
except PackageNotFoundError:
__version__ = "0.0.0"
__authors__ = []
def get_pack_path():
return files(__name__) / "ta.json"
# CHANGED: Point to your Tamil JSON file
return files(__name__) / "ta.json"

View File

@@ -2,9 +2,7 @@
"meta": {
"name": "Tamil",
"native_name": "தமிழ்",
"code": "ta",
"version": "0.1.0",
"authors": []
"code": "ta"
},
"keywords": {
"ஆனால்": "if",