update api endpoints

This commit is contained in:
Wolfang Torres
2026-06-19 20:17:37 +08:00
parent dde819f1e6
commit 30dd8c8671
3 changed files with 120 additions and 23 deletions

View File

@@ -183,6 +183,17 @@ class ProcessFile:
def dictionary_resource_file(self):
"""The path for the resource tsv for dictionary files"""
return self.resources / f"dictionary.{self.language_id}.tsv"
@property
def relative_dictionary_resource_file(self):
"""The path for the resource tsv for dictionary files"""
path = self.resources / f"dictionary.{self.language_id}.tsv"
return path.relative_to(RESOURCES)
@property
def available_dictionary_languages(self):
"""for a Dictionary file loads the avaliable proceced languages"""
return [lan.suffixes[0][1:] for lan in self.resources.glob("dictionary.*.tsv")]
class TranslationResult: