diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c60cd8f..0df1d96 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -45,7 +45,7 @@ - + @@ -53,7 +53,7 @@ - + @@ -114,8 +114,8 @@ - - + + @@ -138,8 +138,8 @@ - - + + @@ -156,11 +156,11 @@ - - + + - + @@ -203,9 +203,9 @@ @@ -436,27 +436,20 @@ - - - - - - - - - + + - - + + - + @@ -467,12 +460,19 @@ - - + + + + + + + + + diff --git a/goarch_api/client.py b/goarch_api/client.py index cf217ed..e5c0fd2 100644 --- a/goarch_api/client.py +++ b/goarch_api/client.py @@ -6,7 +6,7 @@ class HTTPClient: def __init__(self): self.session = requests.session() - user_agent = 'goarch_api (https://github.com/Oikonomia/goarch_api 1.0.6), Python/' + user_agent = 'goarch_api (https://github.com/Oikonomia/goarch_api 1.0.7), Python/' self.user_agent = f"{user_agent}{sys.version_info[0]}.{sys.version_info[1]}" def request(self, method, path): diff --git a/goarch_api/lectionary.py b/goarch_api/lectionary.py index 8f4f3ae..c5e858b 100644 --- a/goarch_api/lectionary.py +++ b/goarch_api/lectionary.py @@ -49,23 +49,25 @@ class Lectionary: for translation in tree.findall("translation"): lang = translation.get("xml:lang") - title = translation.find("title").text - short_title = translation.find("shorttitle").text - clip = translation.find("clip").text.strip() - body = remove_html_tags(translation.find("body").text).strip() - if self.type == "epistle": - prok_mode = translation.find("prokmode").text - prok_psalm = translation.find("prokpsalm").text.replace(": ", ":") - prok_prokeimenon = translation.find("prokprokeimenon").text - prok_verse = translation.find("prokverse").text + if lang != "ar": # because arabic and the html escape stuff doesn't really work + title = translation.find("title").text + short_title = translation.find("shorttitle").text + clip = translation.find("clip").text.strip() + body = remove_html_tags(translation.find("body").text).strip() - converted_translation = Translation(lang=lang, title=title, short_title=short_title, - clip=clip, body=body, prok_mode=prok_mode, - prok_psalm=prok_psalm, prok_prokeimenon=prok_prokeimenon, - prok_verse=prok_verse) - else: - converted_translation = Translation(lang=lang, title=title, short_title=short_title, - clip=clip, body=body) + if self.type == "epistle": + prok_mode = translation.find("prokmode").text + prok_psalm = translation.find("prokpsalm").text.replace(": ", ":") + prok_prokeimenon = translation.find("prokprokeimenon").text + prok_verse = translation.find("prokverse").text - self.translations.append(converted_translation) + converted_translation = Translation(lang=lang, title=title, short_title=short_title, + clip=clip, body=body, prok_mode=prok_mode, + prok_psalm=prok_psalm, prok_prokeimenon=prok_prokeimenon, + prok_verse=prok_verse) + else: + converted_translation = Translation(lang=lang, title=title, short_title=short_title, + clip=clip, body=body) + + self.translations.append(converted_translation) diff --git a/setup.py b/setup.py index b82272e..709ae06 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup( name="goarch_api", - version="1.0.6", + version="1.0.7", author="Elliott Pardee", author_email="me@vypr.xyz", url="https://github.com/Oikonomia/goarch_api", @@ -19,7 +19,6 @@ setup( "Intended Audience :: Developers", "Intended Audience :: Religion", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", - "Natural Language :: Arabic", "Natural Language :: English", "Natural Language :: Greek", "Operating System :: OS Independent",