argos-translate-files-main 1.4.1__py3-none-any.whl

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,65 @@
1
+ Metadata-Version: 2.4
2
+ Name: argos-translate-files-main
3
+ Version: 1.4.1
4
+ Summary: Translate files with Argos Translate
5
+ Home-page: https://github.com/LibreTranslate/argos-translate-files
6
+ Author: S. Thuret
7
+ Author-email: contact@sebastien-thuret.fr
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: beautifulsoup4>=4.9.3
11
+ Requires-Dist: lxml>=4.9.2
12
+ Requires-Dist: argostranslatemain>=1.5.1
13
+ Requires-Dist: translatehtml>=1.5.1
14
+ Requires-Dist: pysrt>=1.1.2
15
+ Requires-Dist: PyMuPDF>=1.24.11
16
+ Dynamic: author
17
+ Dynamic: author-email
18
+ Dynamic: description
19
+ Dynamic: description-content-type
20
+ Dynamic: home-page
21
+ Dynamic: license-file
22
+ Dynamic: requires-dist
23
+ Dynamic: summary
24
+
25
+ # Argos Translate Files
26
+
27
+ Translate files using [Argos Translate](https://github.com/argosopentech/argos-translate).
28
+
29
+ ## Supported file format
30
+
31
+ .txt, .odt, .odp, .docx, .pptx, .epub, .html, .srt, .pdf
32
+
33
+ ## Install
34
+
35
+ ```
36
+ pip install argos-translate-files
37
+ ```
38
+
39
+
40
+ ## Example
41
+
42
+ ```python
43
+ import os.path
44
+
45
+ import argostranslate.package, argostranslate.translate
46
+
47
+
48
+ import argostranslatefiles
49
+ from argostranslatefiles import argostranslatefiles
50
+
51
+ from_code = "fr"
52
+ to_code = "en"
53
+
54
+ installed_languages = argostranslate.translate.get_installed_languages()
55
+ from_lang = list(filter(
56
+ lambda x: x.code == from_code,
57
+ installed_languages))[0]
58
+ to_lang = list(filter(
59
+ lambda x: x.code == to_code,
60
+ installed_languages))[0]
61
+ underlying_translation = from_lang.get_translation(to_lang)
62
+
63
+ argostranslatefiles.translate_file(underlying_translation, os.path.abspath('path/to/file.txt'))
64
+
65
+ ```
@@ -0,0 +1,23 @@
1
+ argos_translate_files_main-1.4.1.dist-info/licenses/LICENSE,sha256=iLTEVI2OsEaBbopI0YAntysbaq5T_sdGMIB0_yOd2Rs,34498
2
+ argostranslatefiles/__init__.py,sha256=T0ahsHLbHg2WfvkEQemFCuWSAGC_EwdiOF9eUKgFNKA,54
3
+ argostranslatefiles/abstract_file.py,sha256=nk7Bz0IOwct4vZnSLJU9JLTvmvIKJq15NXmkv8QaOB4,839
4
+ argostranslatefiles/argostranslatefiles.py,sha256=eA17P4Mfuln0hHUbxVkYxMzA79hy7uhs9s9vN_ej6BI,1563
5
+ argostranslatefiles/formats/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
6
+ argostranslatefiles/formats/abstract_xml.py,sha256=CsFEzzaYNacHNYD86UZxbNsQTpVaFlaG0YrKVjTRvgw,1340
7
+ argostranslatefiles/formats/epub.py,sha256=aKSCs8B7Nr9SkH0D5PKGn2B2haoqMnoOv7XncTLYHn8,3226
8
+ argostranslatefiles/formats/html.py,sha256=cj55uvhZfqXFvRTB_DyovTaHWzRs12RnYxE_euXZEHQ,1159
9
+ argostranslatefiles/formats/pdf.py,sha256=g9fRs89EKdod1NAeAolfYDdG9A_fJTcJqG16CH7E4SE,11053
10
+ argostranslatefiles/formats/srt.py,sha256=ati5rpstmHICBAlK5JJVJC7DICd8WDehpjslpf1xmfI,896
11
+ argostranslatefiles/formats/txt.py,sha256=zRAZGxkzt5JWoHy-ZqZUlu9NvbND9aK2qivo3MiP2W0,698
12
+ argostranslatefiles/formats/opendocument/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ argostranslatefiles/formats/opendocument/odp.py,sha256=EmkbAxWmBMxGajrp7Zq0QItnrGQlynlKeolNP7kedHU,120
14
+ argostranslatefiles/formats/opendocument/odt.py,sha256=qklQHc7Vy00KL5B-0kce1rhoNYiqeyDVB7l6thp2V_o,1690
15
+ argostranslatefiles/formats/openxml/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
16
+ argostranslatefiles/formats/openxml/docx.py,sha256=nYoBTQm6Qr1LjPFtPf5jcJsfCmsO4fS2gqB7c4Gpwk0,2026
17
+ argostranslatefiles/formats/openxml/pptx.py,sha256=l3neBU_wWoCEYfm6gph0EaW0PsptiL27WfdFCatDDtw,1756
18
+ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
+ tests/test_init.py,sha256=VmOIM9Zw5AAHZAXC3b97STO2MF5VUST-sZQMuP9QPYE,164
20
+ argos_translate_files_main-1.4.1.dist-info/METADATA,sha256=MZ4-FQLfDERjS2TBpyPsgnr5IbGFhZUYQNxQ6n9gfmo,1556
21
+ argos_translate_files_main-1.4.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
+ argos_translate_files_main-1.4.1.dist-info/top_level.txt,sha256=H2-Nav_Fg6dGaIChlLbDv4Bf8mZ-pLh3iSlKs7MDatQ,26
23
+ argos_translate_files_main-1.4.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+