diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..15a15b2
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/goarch_api.iml b/.idea/goarch_api.iml
index 41f6a8a..b9a3e1e 100644
--- a/.idea/goarch_api.iml
+++ b/.idea/goarch_api.iml
@@ -5,7 +5,7 @@
-
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 9d22ba4..13ad8c2 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 960b14f..68f5c9c 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,9 +2,14 @@
+
+
+
+
+
@@ -14,52 +19,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -69,8 +28,8 @@
-
-
+
+
@@ -80,8 +39,8 @@
-
-
+
+
@@ -96,15 +55,19 @@
-
-
+
+
+
+
+
+
-
-
+
+
@@ -112,27 +75,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -140,8 +84,8 @@
-
-
+
+
@@ -149,11 +93,8 @@
-
-
-
-
-
+
+
@@ -161,12 +102,8 @@
-
-
-
-
-
-
+
+
@@ -209,27 +146,29 @@
-
-
+
-
+
+
-
-
-
-
+
+
+
+
+
+
-
+
@@ -242,17 +181,16 @@
-
-
-
-
-
+
+
+
+
@@ -395,10 +333,9 @@
-
-
+
-
+
@@ -410,7 +347,7 @@
-
+
@@ -418,22 +355,18 @@
-
-
-
-
-
-
+
+
-
-
+
+
@@ -446,72 +379,52 @@
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
diff --git a/goarch_api/client.py b/goarch_api/client.py
index 473c11a..f85fe85 100644
--- a/goarch_api/client.py
+++ b/goarch_api/client.py
@@ -1,3 +1,21 @@
+"""
+ Copyright (c) 2018-2019 Elliott Pardee
+ This file is part of goarch_api.
+
+ goarch_api is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ goarch_api is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with goarch_api. If not, see .
+"""
+
import requests
import sys
@@ -6,8 +24,8 @@ class HTTPClient:
def __init__(self):
self.session = requests.session()
- user_agent = 'goarch_api (https://github.com/Oikonomia/goarch_api 1.0.8), Python/'
- self.user_agent = f"{user_agent}{sys.version_info[0]}.{sys.version_info[1]}"
+ base_ua = 'goarch_api (https://github.com/vypr/goarch_api 1.0.9), Python/'
+ self.user_agent = f"{base_ua}{sys.version_info[0]}.{sys.version_info[1]}"
def request(self, method, path):
base_url = "https://onlinechapel.goarch.org"
@@ -35,4 +53,4 @@ class HTTPClient:
return resp.text
def get(self, url):
- return self.request("GET", url)
\ No newline at end of file
+ return self.request("GET", url)
diff --git a/goarch_api/daily.py b/goarch_api/daily.py
index 74c2806..7b1d225 100644
--- a/goarch_api/daily.py
+++ b/goarch_api/daily.py
@@ -1,3 +1,21 @@
+"""
+ Copyright (c) 2018-2019 Elliott Pardee
+ This file is part of goarch_api.
+
+ goarch_api is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ goarch_api is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with goarch_api. If not, see .
+"""
+
from lxml import etree
from goarch_api.client import HTTPClient
@@ -15,6 +33,14 @@ class Daily:
self._path += f"?date={date}"
self.public_url += f"?date={date}"
+ self.formatted_date = None
+ self.icon = None
+ self.fasting = None
+ self.tone = None
+ self.readings = []
+ self.lectionary_title = None
+ self.saints = []
+
def get_data(self):
client = HTTPClient()
@@ -30,8 +56,6 @@ class Daily:
self.fasting = tree.find("fasting").text
self.tone = tree.find("tone").text
- self.readings = []
-
for reading in tree.find("readings").iterchildren():
_id = reading.get("id")
_type = reading.find("type").text
diff --git a/goarch_api/lectionary.py b/goarch_api/lectionary.py
index 0655f85..707550d 100644
--- a/goarch_api/lectionary.py
+++ b/goarch_api/lectionary.py
@@ -1,3 +1,21 @@
+"""
+ Copyright (c) 2018-2019 Elliott Pardee
+ This file is part of goarch_api.
+
+ goarch_api is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ goarch_api is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with goarch_api. If not, see .
+"""
+
import re
import html
@@ -27,6 +45,11 @@ class Lectionary:
self._path += f"&date={date}"
self.public_url += f"&date={date}"
+ self.display_title = None
+ self.prokeimenon = None
+ self.icon = None
+ self.translations = []
+
def get_data(self):
client = HTTPClient()
diff --git a/goarch_api/models.py b/goarch_api/models.py
index 7fb2439..88671ae 100644
--- a/goarch_api/models.py
+++ b/goarch_api/models.py
@@ -1,3 +1,22 @@
+"""
+ Copyright (c) 2018-2019 Elliott Pardee
+ This file is part of goarch_api.
+
+ goarch_api is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ goarch_api is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with goarch_api. If not, see .
+"""
+
+
class Reading:
def __init__(self, _id, _type, type_bb, event, translation=None, date=None):
self.id = _id
@@ -39,11 +58,11 @@ class Translation:
class Icon:
- def __init__(self, file_path, copyright, _id=None):
+ def __init__(self, file_path, _copyright, _id=None):
self.id = _id
self.file_path = file_path
self.url = f"https://onlinechapel.goarch.org/images/{file_path}"
- self.copyright = copyright
+ self.copyright = _copyright
# this is like a Reading/Translation hybrid
@@ -61,4 +80,4 @@ class Hymn:
self.title = title
self.short_title = short_title
self.tone = tone
- self.translation = translation
\ No newline at end of file
+ self.translation = translation
diff --git a/goarch_api/saint.py b/goarch_api/saint.py
index 9244012..6c7a492 100644
--- a/goarch_api/saint.py
+++ b/goarch_api/saint.py
@@ -1,3 +1,21 @@
+"""
+ Copyright (c) 2018-2019 Elliott Pardee
+ This file is part of goarch_api.
+
+ goarch_api is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ goarch_api is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with goarch_api. If not, see .
+"""
+
import re
from lxml import etree
@@ -18,6 +36,14 @@ class Saint:
self._path = f"/saints.asp?contentid={_id}"
self.public_url = f"https://www.goarch.org/chapel/saints?contentid={_id}"
+ self.title = None
+ self.display_date = None
+ self.date = None
+ self.icons = []
+ self.lectionary = []
+ self.readings = []
+ self.hymns = []
+
def get_data(self):
client = HTTPClient()
diff --git a/setup.py b/setup.py
index 90934f5..4a837da 100644
--- a/setup.py
+++ b/setup.py
@@ -2,10 +2,10 @@ from setuptools import setup
setup(
name="goarch_api",
- version="1.0.8",
+ version="1.0.9",
author="Elliott Pardee",
author_email="me@vypr.xyz",
- url="https://github.com/Oikonomia/goarch_api",
+ url="https://github.com/vypr/goarch_api",
license="GPLv3",
packages=["goarch_api"],
description="A Python interface for the Greek Orthodox Archdiocese of America's Chapel API.",