Version 1.0.0
This commit is contained in:
commit
d1cbd44289
204
.gitignore
vendored
Normal file
204
.gitignore
vendored
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
|
||||||
|
# Created by https://www.gitignore.io/api/python
|
||||||
|
|
||||||
|
### Python ###
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
MANIFEST
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
*.cover
|
||||||
|
.hypothesis/
|
||||||
|
.pytest_cache/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
db.sqlite3
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
.python-version
|
||||||
|
|
||||||
|
# celery beat schedule file
|
||||||
|
celerybeat-schedule
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
*.sage.py
|
||||||
|
|
||||||
|
# Environments
|
||||||
|
.env
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
env.bak/
|
||||||
|
venv.bak/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
.spyproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
|
||||||
|
# mkdocs documentation
|
||||||
|
/site
|
||||||
|
|
||||||
|
# mypy
|
||||||
|
.mypy_cache/
|
||||||
|
|
||||||
|
### Python Patch ###
|
||||||
|
.venv/
|
||||||
|
|
||||||
|
### Python.VirtualEnv Stack ###
|
||||||
|
# Virtualenv
|
||||||
|
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
|
||||||
|
[Bb]in
|
||||||
|
[Ii]nclude
|
||||||
|
[Ll]ib
|
||||||
|
[Ll]ib64
|
||||||
|
[Ll]ocal
|
||||||
|
[Ss]cripts
|
||||||
|
pyvenv.cfg
|
||||||
|
pip-selfcheck.json
|
||||||
|
|
||||||
|
|
||||||
|
# End of https://www.gitignore.io/api/python
|
||||||
|
|
||||||
|
# Created by https://www.gitignore.io/api/pycharm
|
||||||
|
|
||||||
|
### PyCharm ###
|
||||||
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
||||||
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
|
# User-specific stuff
|
||||||
|
.idea/**/workspace.xml
|
||||||
|
.idea/**/tasks.xml
|
||||||
|
.idea/**/usage.statistics.xml
|
||||||
|
.idea/**/dictionaries
|
||||||
|
.idea/**/shelf
|
||||||
|
|
||||||
|
# Sensitive or high-churn files
|
||||||
|
.idea/**/dataSources/
|
||||||
|
.idea/**/dataSources.ids
|
||||||
|
.idea/**/dataSources.local.xml
|
||||||
|
.idea/**/sqlDataSources.xml
|
||||||
|
.idea/**/dynamic.xml
|
||||||
|
.idea/**/uiDesigner.xml
|
||||||
|
.idea/**/dbnavigator.xml
|
||||||
|
|
||||||
|
# Gradle
|
||||||
|
.idea/**/gradle.xml
|
||||||
|
.idea/**/libraries
|
||||||
|
|
||||||
|
# Gradle and Maven with auto-import
|
||||||
|
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||||
|
# since they will be recreated, and may cause churn. Uncomment if using
|
||||||
|
# auto-import.
|
||||||
|
# .idea/modules.xml
|
||||||
|
# .idea/*.iml
|
||||||
|
# .idea/modules
|
||||||
|
|
||||||
|
# CMake
|
||||||
|
cmake-build-*/
|
||||||
|
|
||||||
|
# Mongo Explorer plugin
|
||||||
|
.idea/**/mongoSettings.xml
|
||||||
|
|
||||||
|
# File-based project format
|
||||||
|
*.iws
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
out/
|
||||||
|
|
||||||
|
# mpeltonen/sbt-idea plugin
|
||||||
|
.idea_modules/
|
||||||
|
|
||||||
|
# JIRA plugin
|
||||||
|
atlassian-ide-plugin.xml
|
||||||
|
|
||||||
|
# Cursive Clojure plugin
|
||||||
|
.idea/replstate.xml
|
||||||
|
|
||||||
|
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||||
|
com_crashlytics_export_strings.xml
|
||||||
|
crashlytics.properties
|
||||||
|
crashlytics-build.properties
|
||||||
|
fabric.properties
|
||||||
|
|
||||||
|
# Editor-based Rest Client
|
||||||
|
.idea/httpRequests
|
||||||
|
|
||||||
|
### PyCharm Patch ###
|
||||||
|
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
|
||||||
|
|
||||||
|
# *.iml
|
||||||
|
# modules.xml
|
||||||
|
# .idea/misc.xml
|
||||||
|
# *.ipr
|
||||||
|
|
||||||
|
# Sonarlint plugin
|
||||||
|
.idea/sonarlint
|
||||||
|
|
||||||
|
|
||||||
|
# End of https://www.gitignore.io/api/pycharm
|
14
.idea/goarch_api.iml
generated
Normal file
14
.idea/goarch_api.iml
generated
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="PYTHON_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
<component name="TestRunnerService">
|
||||||
|
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
|
||||||
|
</component>
|
||||||
|
</module>
|
12
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
12
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoredIdentifiers">
|
||||||
|
<list>
|
||||||
|
<option value="lxml.*" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</inspection_tool>
|
||||||
|
</profile>
|
||||||
|
</component>
|
4
.idea/misc.xml
generated
Normal file
4
.idea/misc.xml
generated
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6 (goarch_api)" project-jdk-type="Python SDK" />
|
||||||
|
</project>
|
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/goarch_api.iml" filepath="$PROJECT_DIR$/.idea/goarch_api.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
524
.idea/workspace.xml
generated
Normal file
524
.idea/workspace.xml
generated
Normal file
@ -0,0 +1,524 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ChangeListManager">
|
||||||
|
<list default="true" id="c8edefbc-71df-41a9-9878-b830c52cd7b5" name="Default Changelist" comment="">
|
||||||
|
<change afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/.idea/goarch_api.iml" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/LICENSE.txt" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/goarch_api/__init__.py" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/goarch_api/client.py" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/goarch_api/daily.py" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/goarch_api/lectionary.py" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/goarch_api/models.py" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/goarch_api/saint.py" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/setup.py" afterDir="false" />
|
||||||
|
</list>
|
||||||
|
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||||
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||||
|
</component>
|
||||||
|
<component name="FUSProjectUsageTrigger">
|
||||||
|
<session id="1829562699">
|
||||||
|
<usages-collector id="statistics.lifecycle.project">
|
||||||
|
<counts>
|
||||||
|
<entry key="project.open.time.4" value="1" />
|
||||||
|
<entry key="project.opened" value="1" />
|
||||||
|
</counts>
|
||||||
|
</usages-collector>
|
||||||
|
<usages-collector id="statistics.file.extensions.open">
|
||||||
|
<counts>
|
||||||
|
<entry key="MANIFEST" value="1" />
|
||||||
|
<entry key="gitignore" value="2" />
|
||||||
|
<entry key="md" value="1" />
|
||||||
|
<entry key="py" value="14" />
|
||||||
|
<entry key="txt" value="3" />
|
||||||
|
</counts>
|
||||||
|
</usages-collector>
|
||||||
|
<usages-collector id="statistics.file.types.open">
|
||||||
|
<counts>
|
||||||
|
<entry key="Markdown" value="1" />
|
||||||
|
<entry key="PLAIN_TEXT" value="6" />
|
||||||
|
<entry key="Python" value="14" />
|
||||||
|
</counts>
|
||||||
|
</usages-collector>
|
||||||
|
<usages-collector id="statistics.file.extensions.edit">
|
||||||
|
<counts>
|
||||||
|
<entry key="Python Console" value="62" />
|
||||||
|
<entry key="dummy" value="14" />
|
||||||
|
<entry key="gitignore" value="1" />
|
||||||
|
<entry key="md" value="538" />
|
||||||
|
<entry key="py" value="11407" />
|
||||||
|
<entry key="txt" value="122" />
|
||||||
|
</counts>
|
||||||
|
</usages-collector>
|
||||||
|
<usages-collector id="statistics.file.types.edit">
|
||||||
|
<counts>
|
||||||
|
<entry key="Markdown" value="538" />
|
||||||
|
<entry key="PLAIN_TEXT" value="137" />
|
||||||
|
<entry key="Python" value="11469" />
|
||||||
|
</counts>
|
||||||
|
</usages-collector>
|
||||||
|
</session>
|
||||||
|
</component>
|
||||||
|
<component name="FavoritesManager">
|
||||||
|
<favorites_list name="goarch_api" />
|
||||||
|
</component>
|
||||||
|
<component name="FileEditorManager">
|
||||||
|
<leaf>
|
||||||
|
<file pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/README.md">
|
||||||
|
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||||
|
<state split_layout="SPLIT">
|
||||||
|
<first_editor relative-caret-position="92">
|
||||||
|
<caret line="4" selection-start-line="3" selection-end-line="4" />
|
||||||
|
</first_editor>
|
||||||
|
<second_editor />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/setup.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="230">
|
||||||
|
<caret line="10" column="35" selection-start-line="10" selection-start-column="35" selection-end-line="10" selection-end-column="35" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file pinned="false" current-in-tab="true">
|
||||||
|
<entry file="file://$PROJECT_DIR$/.gitignore">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="153">
|
||||||
|
<caret line="26" column="11" lean-forward="true" selection-start-line="26" selection-start-column="11" selection-end-line="26" selection-end-column="11" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/MANIFEST">
|
||||||
|
<provider selected="true" editor-type-id="text-editor" />
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/LICENSE.txt">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="316">
|
||||||
|
<caret line="401" column="57" selection-start-line="401" selection-start-column="57" selection-end-line="401" selection-end-column="57" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/goarch_api/client.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="736">
|
||||||
|
<caret line="32" column="65" selection-start-line="32" selection-start-column="65" selection-end-line="32" selection-end-column="65" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#0#15#0" expanded="true" />
|
||||||
|
<marker date="1535020635656" expanded="true" signature="46:47" ph="..." />
|
||||||
|
<marker date="1535020635656" expanded="true" signature="46:51" ph="..." />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/goarch_api/daily.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="92">
|
||||||
|
<caret line="4" column="34" selection-start-line="4" selection-start-column="34" selection-end-line="4" selection-end-column="34" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#0#22#0" expanded="true" />
|
||||||
|
<marker date="1535019752828" expanded="true" signature="1780:1785" ph="..." />
|
||||||
|
<marker date="1535019752828" expanded="true" signature="1815:2051" ph="..." />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/goarch_api/models.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="759">
|
||||||
|
<caret line="33" column="70" selection-start-line="33" selection-start-column="70" selection-end-line="33" selection-end-column="70" />
|
||||||
|
<folding>
|
||||||
|
<marker date="1535019724660" expanded="true" signature="2037:2271" ph="..." />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/goarch_api/saint.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="943">
|
||||||
|
<caret line="41" column="39" selection-start-line="41" selection-start-column="39" selection-end-line="41" selection-end-column="39" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#0#9#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/goarch_api/lectionary.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="1702">
|
||||||
|
<caret line="74" selection-start-line="74" selection-end-line="74" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#0#9#0" expanded="true" />
|
||||||
|
<marker date="1535020618448" expanded="true" signature="246:2121" ph="..." />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
</leaf>
|
||||||
|
</component>
|
||||||
|
<component name="FileTemplateManagerImpl">
|
||||||
|
<option name="RECENT_TEMPLATES">
|
||||||
|
<list>
|
||||||
|
<option value="Python Script" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="FindInProjectRecents">
|
||||||
|
<findStrings>
|
||||||
|
<find>translation</find>
|
||||||
|
</findStrings>
|
||||||
|
</component>
|
||||||
|
<component name="Git.Settings">
|
||||||
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||||
|
</component>
|
||||||
|
<component name="IdeDocumentHistory">
|
||||||
|
<option name="CHANGED_PATHS">
|
||||||
|
<list>
|
||||||
|
<option value="$PROJECT_DIR$/LICENSE.txt" />
|
||||||
|
<option value="$PROJECT_DIR$/src/api.py" />
|
||||||
|
<option value="$PROJECT_DIR$/src/client.py" />
|
||||||
|
<option value="$PROJECT_DIR$/src/reading.py" />
|
||||||
|
<option value="$PROJECT_DIR$/src/goarch_api/translation.py" />
|
||||||
|
<option value="$PROJECT_DIR$/src/goarch_api/reading.py" />
|
||||||
|
<option value="$PROJECT_DIR$/src/goarch_api/models.py" />
|
||||||
|
<option value="$PROJECT_DIR$/src/goarch_api/saint.py" />
|
||||||
|
<option value="$PROJECT_DIR$/src/goarch_api/daily.py" />
|
||||||
|
<option value="$PROJECT_DIR$/src/goarch_api/lectionary.py" />
|
||||||
|
<option value="$PROJECT_DIR$/src/goarch_api/client.py" />
|
||||||
|
<option value="$PROJECT_DIR$/src/test_all.py" />
|
||||||
|
<option value="$PROJECT_DIR$/README.md" />
|
||||||
|
<option value="$PROJECT_DIR$/setup.py" />
|
||||||
|
<option value="$PROJECT_DIR$/.gitignore" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="ProjectFrameBounds" extendedState="6">
|
||||||
|
<option name="x" value="11" />
|
||||||
|
<option name="y" value="47" />
|
||||||
|
<option name="width" value="1346" />
|
||||||
|
<option name="height" value="701" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||||
|
<component name="ProjectView">
|
||||||
|
<navigator proportions="" version="1">
|
||||||
|
<foldersAlwaysOnTop value="true" />
|
||||||
|
</navigator>
|
||||||
|
<panes>
|
||||||
|
<pane id="ProjectPane">
|
||||||
|
<subPane>
|
||||||
|
<expand>
|
||||||
|
<path>
|
||||||
|
<item name="goarch_api" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="goarch_api" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="goarch_api" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="goarch_api" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="goarch_api" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
|
</expand>
|
||||||
|
<select />
|
||||||
|
</subPane>
|
||||||
|
</pane>
|
||||||
|
<pane id="Scope" />
|
||||||
|
</panes>
|
||||||
|
</component>
|
||||||
|
<component name="RecentsManager">
|
||||||
|
<key name="MoveFile.RECENT_KEYS">
|
||||||
|
<recent name="$PROJECT_DIR$" />
|
||||||
|
<recent name="$PROJECT_DIR$/src" />
|
||||||
|
<recent name="$PROJECT_DIR$/src/goarch_api" />
|
||||||
|
</key>
|
||||||
|
</component>
|
||||||
|
<component name="RunDashboard">
|
||||||
|
<option name="ruleStates">
|
||||||
|
<list>
|
||||||
|
<RuleState>
|
||||||
|
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
||||||
|
</RuleState>
|
||||||
|
<RuleState>
|
||||||
|
<option name="name" value="StatusDashboardGroupingRule" />
|
||||||
|
</RuleState>
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="RunManager" selected="Python.lectionary">
|
||||||
|
<configuration name="daily" type="PythonConfigurationType" factoryName="Python" temporary="true">
|
||||||
|
<module name="goarch_api" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/src/goarch_api" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/goarch_api/daily.py" />
|
||||||
|
<option name="PARAMETERS" value="" />
|
||||||
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
|
<option name="INPUT_FILE" value="" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
<configuration name="lectionary" type="PythonConfigurationType" factoryName="Python" temporary="true">
|
||||||
|
<module name="goarch_api" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/src/goarch_api" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/goarch_api/lectionary.py" />
|
||||||
|
<option name="PARAMETERS" value="" />
|
||||||
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
|
<option name="INPUT_FILE" value="" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
<configuration name="reading" type="PythonConfigurationType" factoryName="Python" temporary="true">
|
||||||
|
<module name="goarch_api" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/src" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/goarch_api/reading.py" />
|
||||||
|
<option name="PARAMETERS" value="" />
|
||||||
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
|
<option name="INPUT_FILE" value="" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
<list>
|
||||||
|
<item itemvalue="Python.reading" />
|
||||||
|
<item itemvalue="Python.daily" />
|
||||||
|
<item itemvalue="Python.lectionary" />
|
||||||
|
</list>
|
||||||
|
<recent_temporary>
|
||||||
|
<list>
|
||||||
|
<item itemvalue="Python.lectionary" />
|
||||||
|
<item itemvalue="Python.daily" />
|
||||||
|
<item itemvalue="Python.reading" />
|
||||||
|
</list>
|
||||||
|
</recent_temporary>
|
||||||
|
</component>
|
||||||
|
<component name="SvnConfiguration">
|
||||||
|
<configuration />
|
||||||
|
</component>
|
||||||
|
<component name="TaskManager">
|
||||||
|
<task active="true" id="Default" summary="Default task">
|
||||||
|
<changelist id="c8edefbc-71df-41a9-9878-b830c52cd7b5" name="Default Changelist" comment="" />
|
||||||
|
<created>1535007356554</created>
|
||||||
|
<option name="number" value="Default" />
|
||||||
|
<option name="presentableId" value="Default" />
|
||||||
|
<updated>1535007356554</updated>
|
||||||
|
</task>
|
||||||
|
<servers />
|
||||||
|
</component>
|
||||||
|
<component name="TodoView">
|
||||||
|
<todo-panel id="selected-file">
|
||||||
|
<is-autoscroll-to-source value="true" />
|
||||||
|
</todo-panel>
|
||||||
|
<todo-panel id="all">
|
||||||
|
<are-packages-shown value="true" />
|
||||||
|
<is-autoscroll-to-source value="true" />
|
||||||
|
</todo-panel>
|
||||||
|
</component>
|
||||||
|
<component name="ToolWindowManager">
|
||||||
|
<frame x="54" y="27" width="1312" height="741" extended-state="6" />
|
||||||
|
<editor active="true" />
|
||||||
|
<layout>
|
||||||
|
<window_info id="Favorites" sideWeight="0.18271606" side_tool="true" weight="0.24980605" />
|
||||||
|
<window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.8172839" visible="true" weight="0.24980605" />
|
||||||
|
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
||||||
|
<window_info anchor="bottom" id="Thumbnails" weight="0.3294702" />
|
||||||
|
<window_info anchor="bottom" id="Version Control" />
|
||||||
|
<window_info anchor="bottom" id="Python Console" weight="0.3294702" />
|
||||||
|
<window_info anchor="bottom" id="Terminal" visible="true" weight="0.3305648" />
|
||||||
|
<window_info anchor="bottom" id="Event Log" side_tool="true" />
|
||||||
|
<window_info anchor="bottom" id="Message" order="0" />
|
||||||
|
<window_info anchor="bottom" id="Find" order="1" />
|
||||||
|
<window_info anchor="bottom" id="Run" order="2" weight="0.3294702" />
|
||||||
|
<window_info anchor="bottom" id="Debug" order="3" weight="0.39900663" />
|
||||||
|
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
||||||
|
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
||||||
|
<window_info anchor="bottom" id="TODO" order="6" weight="0.3294702" />
|
||||||
|
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
|
||||||
|
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
||||||
|
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
||||||
|
</layout>
|
||||||
|
</component>
|
||||||
|
<component name="VcsContentAnnotationSettings">
|
||||||
|
<option name="myLimit" value="2678400000" />
|
||||||
|
</component>
|
||||||
|
<component name="editorHistoryManager">
|
||||||
|
<entry file="file://$PROJECT_DIR$/venv/lib/python3.6/site-packages/aiohttp/client.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="120">
|
||||||
|
<caret line="70" column="6" selection-start-line="70" selection-start-column="6" selection-end-line="70" selection-end-column="6" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/venv/lib/python3.6/site-packages/lxml/__init__.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor" />
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/goarch_api/translation.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="138">
|
||||||
|
<caret line="6" column="24" lean-forward="true" selection-end-line="14" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/goarch_api/reading.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="431">
|
||||||
|
<caret line="22" lean-forward="true" selection-start-line="22" selection-end-line="22" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/test_all.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="46">
|
||||||
|
<caret line="2" column="29" selection-start-line="2" selection-start-column="29" selection-end-line="2" selection-end-column="29" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#0#34#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/goarch_api/client.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="736">
|
||||||
|
<caret line="32" column="65" selection-start-line="32" selection-start-column="65" selection-end-line="32" selection-end-column="65" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#0#15#0" expanded="true" />
|
||||||
|
<marker date="1535020635656" expanded="true" signature="46:47" ph="..." />
|
||||||
|
<marker date="1535020635656" expanded="true" signature="46:51" ph="..." />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/goarch_api/daily.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="92">
|
||||||
|
<caret line="4" column="34" selection-start-line="4" selection-start-column="34" selection-end-line="4" selection-end-column="34" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#0#22#0" expanded="true" />
|
||||||
|
<marker date="1535019752828" expanded="true" signature="1780:1785" ph="..." />
|
||||||
|
<marker date="1535019752828" expanded="true" signature="1815:2051" ph="..." />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/goarch_api/models.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="759">
|
||||||
|
<caret line="33" column="70" selection-start-line="33" selection-start-column="70" selection-end-line="33" selection-end-column="70" />
|
||||||
|
<folding>
|
||||||
|
<marker date="1535019724660" expanded="true" signature="2037:2271" ph="..." />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/goarch_api/saint.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="943">
|
||||||
|
<caret line="41" column="39" selection-start-line="41" selection-start-column="39" selection-end-line="41" selection-end-column="39" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#0#9#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/goarch_api/lectionary.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="1702">
|
||||||
|
<caret line="74" selection-start-line="74" selection-end-line="74" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#0#9#0" expanded="true" />
|
||||||
|
<marker date="1535020618448" expanded="true" signature="246:2121" ph="..." />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/LICENSE.txt">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="316">
|
||||||
|
<caret line="401" column="57" selection-start-line="401" selection-start-column="57" selection-end-line="401" selection-end-column="57" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/README.md">
|
||||||
|
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||||
|
<state split_layout="SPLIT">
|
||||||
|
<first_editor relative-caret-position="92">
|
||||||
|
<caret line="4" selection-start-line="3" selection-end-line="4" />
|
||||||
|
</first_editor>
|
||||||
|
<second_editor />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/MANIFEST">
|
||||||
|
<provider selected="true" editor-type-id="text-editor" />
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/setup.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="230">
|
||||||
|
<caret line="10" column="35" selection-start-line="10" selection-start-column="35" selection-end-line="10" selection-end-column="35" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/.gitignore">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="153">
|
||||||
|
<caret line="26" column="11" lean-forward="true" selection-start-line="26" selection-start-column="11" selection-end-line="26" selection-end-column="11" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</component>
|
||||||
|
</project>
|
402
LICENSE.txt
Normal file
402
LICENSE.txt
Normal file
@ -0,0 +1,402 @@
|
|||||||
|
Attribution-NonCommercial-NoDerivatives 4.0 International
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
|
||||||
|
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
||||||
|
does not provide legal services or legal advice. Distribution of
|
||||||
|
Creative Commons public licenses does not create a lawyer-client or
|
||||||
|
other relationship. Creative Commons makes its licenses and related
|
||||||
|
information available on an "as-is" basis. Creative Commons gives no
|
||||||
|
warranties regarding its licenses, any material licensed under their
|
||||||
|
terms and conditions, or any related information. Creative Commons
|
||||||
|
disclaims all liability for damages resulting from their use to the
|
||||||
|
fullest extent possible.
|
||||||
|
|
||||||
|
Using Creative Commons Public Licenses
|
||||||
|
|
||||||
|
Creative Commons public licenses provide a standard set of terms and
|
||||||
|
conditions that creators and other rights holders may use to share
|
||||||
|
original works of authorship and other material subject to copyright
|
||||||
|
and certain other rights specified in the public license below. The
|
||||||
|
following considerations are for informational purposes only, are not
|
||||||
|
exhaustive, and do not form part of our licenses.
|
||||||
|
|
||||||
|
Considerations for licensors: Our public licenses are
|
||||||
|
intended for use by those authorized to give the public
|
||||||
|
permission to use material in ways otherwise restricted by
|
||||||
|
copyright and certain other rights. Our licenses are
|
||||||
|
irrevocable. Licensors should read and understand the terms
|
||||||
|
and conditions of the license they choose before applying it.
|
||||||
|
Licensors should also secure all rights necessary before
|
||||||
|
applying our licenses so that the public can reuse the
|
||||||
|
material as expected. Licensors should clearly mark any
|
||||||
|
material not subject to the license. This includes other CC-
|
||||||
|
licensed material, or material used under an exception or
|
||||||
|
limitation to copyright. More considerations for licensors:
|
||||||
|
wiki.creativecommons.org/Considerations_for_licensors
|
||||||
|
|
||||||
|
Considerations for the public: By using one of our public
|
||||||
|
licenses, a licensor grants the public permission to use the
|
||||||
|
licensed material under specified terms and conditions. If
|
||||||
|
the licensor's permission is not necessary for any reason--for
|
||||||
|
example, because of any applicable exception or limitation to
|
||||||
|
copyright--then that use is not regulated by the license. Our
|
||||||
|
licenses grant only permissions under copyright and certain
|
||||||
|
other rights that a licensor has authority to grant. Use of
|
||||||
|
the licensed material may still be restricted for other
|
||||||
|
reasons, including because others have copyright or other
|
||||||
|
rights in the material. A licensor may make special requests,
|
||||||
|
such as asking that all changes be marked or described.
|
||||||
|
Although not required by our licenses, you are encouraged to
|
||||||
|
respect those requests where reasonable. More considerations
|
||||||
|
for the public:
|
||||||
|
wiki.creativecommons.org/Considerations_for_licensees
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
|
||||||
|
Creative Commons Attribution-NonCommercial-NoDerivatives 4.0
|
||||||
|
International Public License
|
||||||
|
|
||||||
|
By exercising the Licensed Rights (defined below), You accept and agree
|
||||||
|
to be bound by the terms and conditions of this Creative Commons
|
||||||
|
Attribution-NonCommercial-NoDerivatives 4.0 International Public
|
||||||
|
License ("Public License"). To the extent this Public License may be
|
||||||
|
interpreted as a contract, You are granted the Licensed Rights in
|
||||||
|
consideration of Your acceptance of these terms and conditions, and the
|
||||||
|
Licensor grants You such rights in consideration of benefits the
|
||||||
|
Licensor receives from making the Licensed Material available under
|
||||||
|
these terms and conditions.
|
||||||
|
|
||||||
|
|
||||||
|
Section 1 -- Definitions.
|
||||||
|
|
||||||
|
a. Adapted Material means material subject to Copyright and Similar
|
||||||
|
Rights that is derived from or based upon the Licensed Material
|
||||||
|
and in which the Licensed Material is translated, altered,
|
||||||
|
arranged, transformed, or otherwise modified in a manner requiring
|
||||||
|
permission under the Copyright and Similar Rights held by the
|
||||||
|
Licensor. For purposes of this Public License, where the Licensed
|
||||||
|
Material is a musical work, performance, or sound recording,
|
||||||
|
Adapted Material is always produced where the Licensed Material is
|
||||||
|
synched in timed relation with a moving image.
|
||||||
|
|
||||||
|
b. Copyright and Similar Rights means copyright and/or similar rights
|
||||||
|
closely related to copyright including, without limitation,
|
||||||
|
performance, broadcast, sound recording, and Sui Generis Database
|
||||||
|
Rights, without regard to how the rights are labeled or
|
||||||
|
categorized. For purposes of this Public License, the rights
|
||||||
|
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
||||||
|
Rights.
|
||||||
|
|
||||||
|
c. Effective Technological Measures means those measures that, in the
|
||||||
|
absence of proper authority, may not be circumvented under laws
|
||||||
|
fulfilling obligations under Article 11 of the WIPO Copyright
|
||||||
|
Treaty adopted on December 20, 1996, and/or similar international
|
||||||
|
agreements.
|
||||||
|
|
||||||
|
d. Exceptions and Limitations means fair use, fair dealing, and/or
|
||||||
|
any other exception or limitation to Copyright and Similar Rights
|
||||||
|
that applies to Your use of the Licensed Material.
|
||||||
|
|
||||||
|
e. Licensed Material means the artistic or literary work, database,
|
||||||
|
or other material to which the Licensor applied this Public
|
||||||
|
License.
|
||||||
|
|
||||||
|
f. Licensed Rights means the rights granted to You subject to the
|
||||||
|
terms and conditions of this Public License, which are limited to
|
||||||
|
all Copyright and Similar Rights that apply to Your use of the
|
||||||
|
Licensed Material and that the Licensor has authority to license.
|
||||||
|
|
||||||
|
g. Licensor means the individual(s) or entity(ies) granting rights
|
||||||
|
under this Public License.
|
||||||
|
|
||||||
|
h. NonCommercial means not primarily intended for or directed towards
|
||||||
|
commercial advantage or monetary compensation. For purposes of
|
||||||
|
this Public License, the exchange of the Licensed Material for
|
||||||
|
other material subject to Copyright and Similar Rights by digital
|
||||||
|
file-sharing or similar means is NonCommercial provided there is
|
||||||
|
no payment of monetary compensation in connection with the
|
||||||
|
exchange.
|
||||||
|
|
||||||
|
i. Share means to provide material to the public by any means or
|
||||||
|
process that requires permission under the Licensed Rights, such
|
||||||
|
as reproduction, public display, public performance, distribution,
|
||||||
|
dissemination, communication, or importation, and to make material
|
||||||
|
available to the public including in ways that members of the
|
||||||
|
public may access the material from a place and at a time
|
||||||
|
individually chosen by them.
|
||||||
|
|
||||||
|
j. Sui Generis Database Rights means rights other than copyright
|
||||||
|
resulting from Directive 96/9/EC of the European Parliament and of
|
||||||
|
the Council of 11 March 1996 on the legal protection of databases,
|
||||||
|
as amended and/or succeeded, as well as other essentially
|
||||||
|
equivalent rights anywhere in the world.
|
||||||
|
|
||||||
|
k. You means the individual or entity exercising the Licensed Rights
|
||||||
|
under this Public License. Your has a corresponding meaning.
|
||||||
|
|
||||||
|
|
||||||
|
Section 2 -- Scope.
|
||||||
|
|
||||||
|
a. License grant.
|
||||||
|
|
||||||
|
1. Subject to the terms and conditions of this Public License,
|
||||||
|
the Licensor hereby grants You a worldwide, royalty-free,
|
||||||
|
non-sublicensable, non-exclusive, irrevocable license to
|
||||||
|
exercise the Licensed Rights in the Licensed Material to:
|
||||||
|
|
||||||
|
a. reproduce and Share the Licensed Material, in whole or
|
||||||
|
in part, for NonCommercial purposes only; and
|
||||||
|
|
||||||
|
b. produce and reproduce, but not Share, Adapted Material
|
||||||
|
for NonCommercial purposes only.
|
||||||
|
|
||||||
|
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||||||
|
Exceptions and Limitations apply to Your use, this Public
|
||||||
|
License does not apply, and You do not need to comply with
|
||||||
|
its terms and conditions.
|
||||||
|
|
||||||
|
3. Term. The term of this Public License is specified in Section
|
||||||
|
6(a).
|
||||||
|
|
||||||
|
4. Media and formats; technical modifications allowed. The
|
||||||
|
Licensor authorizes You to exercise the Licensed Rights in
|
||||||
|
all media and formats whether now known or hereafter created,
|
||||||
|
and to make technical modifications necessary to do so. The
|
||||||
|
Licensor waives and/or agrees not to assert any right or
|
||||||
|
authority to forbid You from making technical modifications
|
||||||
|
necessary to exercise the Licensed Rights, including
|
||||||
|
technical modifications necessary to circumvent Effective
|
||||||
|
Technological Measures. For purposes of this Public License,
|
||||||
|
simply making modifications authorized by this Section 2(a)
|
||||||
|
(4) never produces Adapted Material.
|
||||||
|
|
||||||
|
5. Downstream recipients.
|
||||||
|
|
||||||
|
a. Offer from the Licensor -- Licensed Material. Every
|
||||||
|
recipient of the Licensed Material automatically
|
||||||
|
receives an offer from the Licensor to exercise the
|
||||||
|
Licensed Rights under the terms and conditions of this
|
||||||
|
Public License.
|
||||||
|
|
||||||
|
b. No downstream restrictions. You may not offer or impose
|
||||||
|
any additional or different terms or conditions on, or
|
||||||
|
apply any Effective Technological Measures to, the
|
||||||
|
Licensed Material if doing so restricts exercise of the
|
||||||
|
Licensed Rights by any recipient of the Licensed
|
||||||
|
Material.
|
||||||
|
|
||||||
|
6. No endorsement. Nothing in this Public License constitutes or
|
||||||
|
may be construed as permission to assert or imply that You
|
||||||
|
are, or that Your use of the Licensed Material is, connected
|
||||||
|
with, or sponsored, endorsed, or granted official status by,
|
||||||
|
the Licensor or others designated to receive attribution as
|
||||||
|
provided in Section 3(a)(1)(A)(i).
|
||||||
|
|
||||||
|
b. Other rights.
|
||||||
|
|
||||||
|
1. Moral rights, such as the right of integrity, are not
|
||||||
|
licensed under this Public License, nor are publicity,
|
||||||
|
privacy, and/or other similar personality rights; however, to
|
||||||
|
the extent possible, the Licensor waives and/or agrees not to
|
||||||
|
assert any such rights held by the Licensor to the limited
|
||||||
|
extent necessary to allow You to exercise the Licensed
|
||||||
|
Rights, but not otherwise.
|
||||||
|
|
||||||
|
2. Patent and trademark rights are not licensed under this
|
||||||
|
Public License.
|
||||||
|
|
||||||
|
3. To the extent possible, the Licensor waives any right to
|
||||||
|
collect royalties from You for the exercise of the Licensed
|
||||||
|
Rights, whether directly or through a collecting society
|
||||||
|
under any voluntary or waivable statutory or compulsory
|
||||||
|
licensing scheme. In all other cases the Licensor expressly
|
||||||
|
reserves any right to collect such royalties, including when
|
||||||
|
the Licensed Material is used other than for NonCommercial
|
||||||
|
purposes.
|
||||||
|
|
||||||
|
|
||||||
|
Section 3 -- License Conditions.
|
||||||
|
|
||||||
|
Your exercise of the Licensed Rights is expressly made subject to the
|
||||||
|
following conditions.
|
||||||
|
|
||||||
|
a. Attribution.
|
||||||
|
|
||||||
|
1. If You Share the Licensed Material, You must:
|
||||||
|
|
||||||
|
a. retain the following if it is supplied by the Licensor
|
||||||
|
with the Licensed Material:
|
||||||
|
|
||||||
|
i. identification of the creator(s) of the Licensed
|
||||||
|
Material and any others designated to receive
|
||||||
|
attribution, in any reasonable manner requested by
|
||||||
|
the Licensor (including by pseudonym if
|
||||||
|
designated);
|
||||||
|
|
||||||
|
ii. a copyright notice;
|
||||||
|
|
||||||
|
iii. a notice that refers to this Public License;
|
||||||
|
|
||||||
|
iv. a notice that refers to the disclaimer of
|
||||||
|
warranties;
|
||||||
|
|
||||||
|
v. a URI or hyperlink to the Licensed Material to the
|
||||||
|
extent reasonably practicable;
|
||||||
|
|
||||||
|
b. indicate if You modified the Licensed Material and
|
||||||
|
retain an indication of any previous modifications; and
|
||||||
|
|
||||||
|
c. indicate the Licensed Material is licensed under this
|
||||||
|
Public License, and include the text of, or the URI or
|
||||||
|
hyperlink to, this Public License.
|
||||||
|
|
||||||
|
For the avoidance of doubt, You do not have permission under
|
||||||
|
this Public License to Share Adapted Material.
|
||||||
|
|
||||||
|
2. You may satisfy the conditions in Section 3(a)(1) in any
|
||||||
|
reasonable manner based on the medium, means, and context in
|
||||||
|
which You Share the Licensed Material. For example, it may be
|
||||||
|
reasonable to satisfy the conditions by providing a URI or
|
||||||
|
hyperlink to a resource that includes the required
|
||||||
|
information.
|
||||||
|
|
||||||
|
3. If requested by the Licensor, You must remove any of the
|
||||||
|
information required by Section 3(a)(1)(A) to the extent
|
||||||
|
reasonably practicable.
|
||||||
|
|
||||||
|
|
||||||
|
Section 4 -- Sui Generis Database Rights.
|
||||||
|
|
||||||
|
Where the Licensed Rights include Sui Generis Database Rights that
|
||||||
|
apply to Your use of the Licensed Material:
|
||||||
|
|
||||||
|
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
||||||
|
to extract, reuse, reproduce, and Share all or a substantial
|
||||||
|
portion of the contents of the database for NonCommercial purposes
|
||||||
|
only and provided You do not Share Adapted Material;
|
||||||
|
|
||||||
|
b. if You include all or a substantial portion of the database
|
||||||
|
contents in a database in which You have Sui Generis Database
|
||||||
|
Rights, then the database in which You have Sui Generis Database
|
||||||
|
Rights (but not its individual contents) is Adapted Material; and
|
||||||
|
|
||||||
|
c. You must comply with the conditions in Section 3(a) if You Share
|
||||||
|
all or a substantial portion of the contents of the database.
|
||||||
|
|
||||||
|
For the avoidance of doubt, this Section 4 supplements and does not
|
||||||
|
replace Your obligations under this Public License where the Licensed
|
||||||
|
Rights include other Copyright and Similar Rights.
|
||||||
|
|
||||||
|
|
||||||
|
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
||||||
|
|
||||||
|
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
||||||
|
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
||||||
|
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
||||||
|
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
||||||
|
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
||||||
|
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||||
|
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
||||||
|
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
||||||
|
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
||||||
|
|
||||||
|
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
||||||
|
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
||||||
|
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
||||||
|
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
||||||
|
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
||||||
|
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
||||||
|
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
||||||
|
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
||||||
|
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
||||||
|
|
||||||
|
c. The disclaimer of warranties and limitation of liability provided
|
||||||
|
above shall be interpreted in a manner that, to the extent
|
||||||
|
possible, most closely approximates an absolute disclaimer and
|
||||||
|
waiver of all liability.
|
||||||
|
|
||||||
|
|
||||||
|
Section 6 -- Term and Termination.
|
||||||
|
|
||||||
|
a. This Public License applies for the term of the Copyright and
|
||||||
|
Similar Rights licensed here. However, if You fail to comply with
|
||||||
|
this Public License, then Your rights under this Public License
|
||||||
|
terminate automatically.
|
||||||
|
|
||||||
|
b. Where Your right to use the Licensed Material has terminated under
|
||||||
|
Section 6(a), it reinstates:
|
||||||
|
|
||||||
|
1. automatically as of the date the violation is cured, provided
|
||||||
|
it is cured within 30 days of Your discovery of the
|
||||||
|
violation; or
|
||||||
|
|
||||||
|
2. upon express reinstatement by the Licensor.
|
||||||
|
|
||||||
|
For the avoidance of doubt, this Section 6(b) does not affect any
|
||||||
|
right the Licensor may have to seek remedies for Your violations
|
||||||
|
of this Public License.
|
||||||
|
|
||||||
|
c. For the avoidance of doubt, the Licensor may also offer the
|
||||||
|
Licensed Material under separate terms or conditions or stop
|
||||||
|
distributing the Licensed Material at any time; however, doing so
|
||||||
|
will not terminate this Public License.
|
||||||
|
|
||||||
|
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
||||||
|
License.
|
||||||
|
|
||||||
|
|
||||||
|
Section 7 -- Other Terms and Conditions.
|
||||||
|
|
||||||
|
a. The Licensor shall not be bound by any additional or different
|
||||||
|
terms or conditions communicated by You unless expressly agreed.
|
||||||
|
|
||||||
|
b. Any arrangements, understandings, or agreements regarding the
|
||||||
|
Licensed Material not stated herein are separate from and
|
||||||
|
independent of the terms and conditions of this Public License.
|
||||||
|
|
||||||
|
|
||||||
|
Section 8 -- Interpretation.
|
||||||
|
|
||||||
|
a. For the avoidance of doubt, this Public License does not, and
|
||||||
|
shall not be interpreted to, reduce, limit, restrict, or impose
|
||||||
|
conditions on any use of the Licensed Material that could lawfully
|
||||||
|
be made without permission under this Public License.
|
||||||
|
|
||||||
|
b. To the extent possible, if any provision of this Public License is
|
||||||
|
deemed unenforceable, it shall be automatically reformed to the
|
||||||
|
minimum extent necessary to make it enforceable. If the provision
|
||||||
|
cannot be reformed, it shall be severed from this Public License
|
||||||
|
without affecting the enforceability of the remaining terms and
|
||||||
|
conditions.
|
||||||
|
|
||||||
|
c. No term or condition of this Public License will be waived and no
|
||||||
|
failure to comply consented to unless expressly agreed to by the
|
||||||
|
Licensor.
|
||||||
|
|
||||||
|
d. Nothing in this Public License constitutes or may be interpreted
|
||||||
|
as a limitation upon, or waiver of, any privileges and immunities
|
||||||
|
that apply to the Licensor or You, including from the legal
|
||||||
|
processes of any jurisdiction or authority.
|
||||||
|
|
||||||
|
=======================================================================
|
||||||
|
|
||||||
|
Creative Commons is not a party to its public
|
||||||
|
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
||||||
|
its public licenses to material it publishes and in those instances
|
||||||
|
will be considered the “Licensor.” The text of the Creative Commons
|
||||||
|
public licenses is dedicated to the public domain under the CC0 Public
|
||||||
|
Domain Dedication. Except for the limited purpose of indicating that
|
||||||
|
material is shared under a Creative Commons public license or as
|
||||||
|
otherwise permitted by the Creative Commons policies published at
|
||||||
|
creativecommons.org/policies, Creative Commons does not authorize the
|
||||||
|
use of the trademark "Creative Commons" or any other trademark or logo
|
||||||
|
of Creative Commons without its prior written consent including,
|
||||||
|
without limitation, in connection with any unauthorized modifications
|
||||||
|
to any of its public licenses or any other arrangements,
|
||||||
|
understandings, or agreements concerning use of licensed material. For
|
||||||
|
the avoidance of doubt, this paragraph does not form part of the
|
||||||
|
public licenses.
|
||||||
|
|
||||||
|
Creative Commons may be contacted at creativecommons.org.
|
8
README.md
Normal file
8
README.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
goarch_api
|
||||||
|
===
|
||||||
|
|
||||||
|
A Python interface for the Greek Orthodox Archdiocese of America's Chapel API.
|
||||||
|
|
||||||
|
API used with written permission from GOArch's Department of Internet Ministries. Please seek approval before any use of the program by contacting `internet [at] goarch [dot] org`.
|
||||||
|
|
||||||
|
Depends on: requests, lxml (install via pip)
|
0
goarch_api/__init__.py
Normal file
0
goarch_api/__init__.py
Normal file
38
goarch_api/client.py
Normal file
38
goarch_api/client.py
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import requests
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
class HTTPClient:
|
||||||
|
def __init__(self):
|
||||||
|
self.session = requests.session()
|
||||||
|
|
||||||
|
user_agent = 'goarch_api (https://github.com/Oikonomia/goarch_api 1.0.0), Python/'
|
||||||
|
self.user_agent = f"{user_agent}{sys.version_info[0]}.{sys.version_info[1]}"
|
||||||
|
|
||||||
|
def request(self, method, path):
|
||||||
|
base_url = "https://onlinechapel.goarch.org"
|
||||||
|
|
||||||
|
headers = {
|
||||||
|
"User-Agent": self.user_agent
|
||||||
|
}
|
||||||
|
|
||||||
|
url = f"{base_url}{path}"
|
||||||
|
resp = self.session.request(method, url, headers=headers)
|
||||||
|
|
||||||
|
exception_strings = {
|
||||||
|
"400": "Bad Request",
|
||||||
|
"401": "Unauthorized",
|
||||||
|
"403": "Forbidden",
|
||||||
|
"500": "Internal Server Error",
|
||||||
|
"501": "Not Implemented",
|
||||||
|
"502": "Bad Gateway",
|
||||||
|
"503": "Service Unavailable"
|
||||||
|
}
|
||||||
|
|
||||||
|
if str(resp.status_code) in exception_strings.keys():
|
||||||
|
raise Exception(exception_strings[str(resp.status_code)])
|
||||||
|
else:
|
||||||
|
return resp.text
|
||||||
|
|
||||||
|
def get(self, url):
|
||||||
|
return self.request("GET", url)
|
70
goarch_api/daily.py
Normal file
70
goarch_api/daily.py
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
from lxml import etree
|
||||||
|
|
||||||
|
from goarch_api.client import HTTPClient
|
||||||
|
from goarch_api.models import Reading, Translation
|
||||||
|
from goarch_api.saint import Saint
|
||||||
|
|
||||||
|
|
||||||
|
def get_data(self):
|
||||||
|
client = HTTPClient()
|
||||||
|
|
||||||
|
resp = client.get(self.path)
|
||||||
|
|
||||||
|
if resp is not None:
|
||||||
|
tree = etree.fromstring(resp.encode())
|
||||||
|
date = tree.find("date").text
|
||||||
|
|
||||||
|
self.formatted_date = tree.find("formatteddate").text
|
||||||
|
|
||||||
|
self.icon = tree.find("icon").text
|
||||||
|
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
|
||||||
|
type_bb = reading.find("typebb").text
|
||||||
|
event = reading.find("event").text
|
||||||
|
|
||||||
|
translation = reading.find("translation")
|
||||||
|
t_lang = translation.get("xml:lang")
|
||||||
|
t_title = translation.find("title").text
|
||||||
|
t_short_title = translation.find("shorttitle").text
|
||||||
|
|
||||||
|
# more often than not, these things have a newline after the text in the element
|
||||||
|
t_clip = translation.find("clip").text.strip()
|
||||||
|
|
||||||
|
converted_translation = Translation(title=t_title, short_title=t_short_title, clip=t_clip, lang=t_lang)
|
||||||
|
|
||||||
|
converted_reading = Reading(_id, _type, type_bb, event, translation=converted_translation, date=date)
|
||||||
|
|
||||||
|
self.readings.append(converted_reading)
|
||||||
|
|
||||||
|
self.lectionary_title = tree.find("lectionarytitle").text.strip()
|
||||||
|
|
||||||
|
self.saints = []
|
||||||
|
|
||||||
|
for saint in tree.find("saintsfeasts").iterchildren():
|
||||||
|
_id = saint.find("id").text
|
||||||
|
converted_saint = Saint(_id)
|
||||||
|
|
||||||
|
self.saints.append(converted_saint)
|
||||||
|
|
||||||
|
|
||||||
|
class Daily:
|
||||||
|
def __init__(self, date=None):
|
||||||
|
self.date = date
|
||||||
|
self.path = "/daily.asp"
|
||||||
|
self.public_url = "https://www.goarch.org/chapel"
|
||||||
|
|
||||||
|
if date is not None:
|
||||||
|
self.path += f"?date={date}"
|
||||||
|
self.public_url += f"?date={date}"
|
||||||
|
|
||||||
|
get_data(self)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
daily = Daily(date="8/15/2018")
|
77
goarch_api/lectionary.py
Normal file
77
goarch_api/lectionary.py
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
import re
|
||||||
|
|
||||||
|
from lxml import etree
|
||||||
|
|
||||||
|
from goarch_api.client import HTTPClient
|
||||||
|
from goarch_api.models import Translation, Icon
|
||||||
|
|
||||||
|
|
||||||
|
def remove_html_tags(raw):
|
||||||
|
regex = re.compile('<.*?>')
|
||||||
|
return re.sub(regex, " ", raw)
|
||||||
|
|
||||||
|
|
||||||
|
def lect_get_data(self):
|
||||||
|
client = HTTPClient()
|
||||||
|
|
||||||
|
resp = client.get(self.path)
|
||||||
|
|
||||||
|
if resp is not None:
|
||||||
|
tree = etree.fromstring(resp.encode())
|
||||||
|
|
||||||
|
self.display_title = tree.find("displaytitle").text
|
||||||
|
self.event = tree.find("event").text
|
||||||
|
self.prokeimenon = tree.find("prokeimenon").text
|
||||||
|
|
||||||
|
icon = tree.find("icon")
|
||||||
|
i_file_path = icon.find("url").text.replace("http://onlinechapel.goarch.org/images/", "")
|
||||||
|
i_copyright = icon.find("copyright").text
|
||||||
|
|
||||||
|
self.icon = Icon(i_file_path, i_copyright)
|
||||||
|
|
||||||
|
self.translations = []
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
|
||||||
|
class Lectionary:
|
||||||
|
# this class will provide full readings from Reading objects
|
||||||
|
def __init__(self, _type, code, event, date=None):
|
||||||
|
self.type = _type
|
||||||
|
self.code = code
|
||||||
|
self.event = event
|
||||||
|
self.date = date
|
||||||
|
|
||||||
|
self.path = f"/lectionary.asp?type={_type}&code={str(code)}&event={str(event)}"
|
||||||
|
self.public_url = f"https://www.goarch.org/chapel/lectionary?type={_type}&code={str(code)}&event={str(event)}"
|
||||||
|
|
||||||
|
if date is not None:
|
||||||
|
self.path += f"&date={date}"
|
||||||
|
self.public_url += f"&date={date}"
|
||||||
|
|
||||||
|
lect_get_data(self)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
lect = Lectionary("MG", 370, 165)
|
65
goarch_api/models.py
Normal file
65
goarch_api/models.py
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
""" normal models """
|
||||||
|
|
||||||
|
|
||||||
|
class Reading:
|
||||||
|
def __init__(self, _id, _type, type_bb, event, translation=None, date=None):
|
||||||
|
self.id = _id
|
||||||
|
self.type = _type
|
||||||
|
self.type_bb = type_bb
|
||||||
|
self.event = event
|
||||||
|
self.translation = translation
|
||||||
|
self.date = date
|
||||||
|
|
||||||
|
is_gospel = (_type == "G" and type_bb == "gospel")
|
||||||
|
is_epistle = (_type == "E" and type_bb == "epistle")
|
||||||
|
is_matins = (_type == "MG" and type_bb == "mg")
|
||||||
|
|
||||||
|
if not (is_gospel ^ is_epistle ^ is_matins):
|
||||||
|
raise Exception("Invalid or mismatching reading types.")
|
||||||
|
|
||||||
|
if is_epistle:
|
||||||
|
if date is None:
|
||||||
|
raise Exception("Epistles must have the 'date' keyword argument.")
|
||||||
|
|
||||||
|
|
||||||
|
class Translation:
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
self.lang = kwargs["lang"] if "lang" in kwargs.keys() else None
|
||||||
|
|
||||||
|
self.title = kwargs["title"] if "title" in kwargs.keys() else None
|
||||||
|
self.short_title = kwargs["short_title"] if "short_title" in kwargs.keys() else None
|
||||||
|
|
||||||
|
self.clip = kwargs["clip"] if "clip" in kwargs.keys() else None
|
||||||
|
|
||||||
|
self.prok_mode = kwargs["prok_mode"] if "prok_mode" in kwargs.keys() else None
|
||||||
|
self.prok_psalm = kwargs["prok_psalm"] if "prok_psalm" in kwargs.keys() else None
|
||||||
|
self.prok_prokeimenon = kwargs["prok_prokeimenon"] if "prok_prokeimenon" in kwargs.keys() else None
|
||||||
|
self.prok_verse = kwargs["prok_verse"] if "prok_verse" in kwargs.keys() else None
|
||||||
|
|
||||||
|
self.body = kwargs["body"] if "body" in kwargs.keys() else None
|
||||||
|
|
||||||
|
self.copyright = kwargs["_copyright"] if "_copyright" in kwargs.keys() else None
|
||||||
|
|
||||||
|
|
||||||
|
class Icon:
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
# this is like a Reading/Translation hybrid
|
||||||
|
class LectionaryReading:
|
||||||
|
def __init__(self, _id, _type):
|
||||||
|
self.id = _id
|
||||||
|
self.type = _type
|
||||||
|
|
||||||
|
|
||||||
|
class Hymn:
|
||||||
|
def __init__(self, _type, title, short_title, tone, translation):
|
||||||
|
self.type = _type.title()
|
||||||
|
self.title = title
|
||||||
|
self.short_title = short_title
|
||||||
|
self.tone = tone
|
||||||
|
self.translation = translation
|
88
goarch_api/saint.py
Normal file
88
goarch_api/saint.py
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
import re
|
||||||
|
|
||||||
|
from lxml import etree
|
||||||
|
|
||||||
|
from goarch_api.client import HTTPClient
|
||||||
|
from goarch_api.models import Translation, LectionaryReading, Icon, Hymn
|
||||||
|
|
||||||
|
|
||||||
|
def remove_html_tags(raw):
|
||||||
|
regex = re.compile('<.*?>')
|
||||||
|
return re.sub(regex, " ", raw)
|
||||||
|
|
||||||
|
|
||||||
|
def saint_get_data(self):
|
||||||
|
client = HTTPClient()
|
||||||
|
|
||||||
|
resp = client.get(self.path)
|
||||||
|
|
||||||
|
if resp is not None:
|
||||||
|
tree = etree.fromstring(resp.encode())
|
||||||
|
self.date = tree.find("date").text
|
||||||
|
|
||||||
|
self.title = tree.find("title").text
|
||||||
|
self.display_date = tree.find("displaydate").text
|
||||||
|
self.date = tree.find("date").text
|
||||||
|
|
||||||
|
self.icons = []
|
||||||
|
|
||||||
|
for icon in tree.find("icons").iterchildren():
|
||||||
|
_id = icon.get("id")
|
||||||
|
file_path = icon.find("filepath").text
|
||||||
|
_copyright = icon.find("copyright").text
|
||||||
|
|
||||||
|
converted_icon = Icon(_id, file_path, _copyright)
|
||||||
|
|
||||||
|
self.icons.append(converted_icon)
|
||||||
|
|
||||||
|
self.lectionary = []
|
||||||
|
|
||||||
|
for reading in tree.find("lectionary").iterchildren():
|
||||||
|
_id = reading.find("id").text
|
||||||
|
_type = reading.get("type")
|
||||||
|
|
||||||
|
lectionary_reading = LectionaryReading(_id, _type)
|
||||||
|
|
||||||
|
self.lectionary.append(lectionary_reading)
|
||||||
|
|
||||||
|
self.readings = []
|
||||||
|
|
||||||
|
for reading in tree.find("readings").iterchildren():
|
||||||
|
lang = reading.get("xml:lang")
|
||||||
|
title = reading.find("title").text
|
||||||
|
short_title = reading.find("shorttitle").text
|
||||||
|
body = remove_html_tags(reading.find("body").text).strip()
|
||||||
|
_copyright = reading.find("copyright").text
|
||||||
|
|
||||||
|
converted_translation = Translation(title=title, short_title=short_title, lang=lang,
|
||||||
|
body=body, _copyright=_copyright)
|
||||||
|
|
||||||
|
self.readings.append(converted_translation)
|
||||||
|
|
||||||
|
self.hymns = []
|
||||||
|
|
||||||
|
for hymn in tree.find("hymns").iterchildren():
|
||||||
|
_type = hymn.find("type").text
|
||||||
|
title = hymn.find("title").text
|
||||||
|
short_title = hymn.find("shorttitle").text
|
||||||
|
tone = hymn.find("tone").text
|
||||||
|
|
||||||
|
translation = hymn.find("translation")
|
||||||
|
t_lang = translation.get("xml:lang")
|
||||||
|
t_body = translation.find("body").text
|
||||||
|
t_copyright = translation.find("copyright").text
|
||||||
|
|
||||||
|
converted_translation = Translation(lang=t_lang, body=t_body, _copyright=t_copyright)
|
||||||
|
|
||||||
|
converted_hymn = Hymn(_type, title, short_title, tone, converted_translation)
|
||||||
|
|
||||||
|
self.hymns.append(converted_hymn)
|
||||||
|
|
||||||
|
|
||||||
|
class Saint:
|
||||||
|
def __init__(self, _id):
|
||||||
|
self.id = _id
|
||||||
|
self.path = f"/saints.asp?contentid={_id}"
|
||||||
|
self.public_url = f"https://www.goarch.org/chapel/saints?contentid={_id}"
|
||||||
|
|
||||||
|
saint_get_data(self)
|
33
setup.py
Normal file
33
setup.py
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
from setuptools import setup
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name="goarch_api",
|
||||||
|
version="1.0.0",
|
||||||
|
author="Elliott Pardee",
|
||||||
|
author_email="me@vypr.xyz",
|
||||||
|
url="https://github.com/Oikonomia/goarch_api",
|
||||||
|
license="CC-BY-NC-ND 4.0",
|
||||||
|
packages=["goarch_api"],
|
||||||
|
description="A Python interface for the Greek Orthodox Archdiocese of America's Chapel API.",
|
||||||
|
long_description=open("README.md").read(),
|
||||||
|
long_description_content_type="text/markdown",
|
||||||
|
include_package_data=True,
|
||||||
|
install_requires=["lxml", "requests"],
|
||||||
|
python_requires=">=3.6.5",
|
||||||
|
classifiers=[
|
||||||
|
"Development Status :: 5 - Production/Stable",
|
||||||
|
"Intended Audience :: Developers",
|
||||||
|
"Intended Audience :: Religion",
|
||||||
|
"License :: Other/Proprietary License",
|
||||||
|
"Natural Language :: Arabic",
|
||||||
|
"Natural Language :: English",
|
||||||
|
"Natural Language :: Greek",
|
||||||
|
"Operating System :: OS Independent",
|
||||||
|
"Programming Language :: Python :: 3.6",
|
||||||
|
"Topic :: Internet",
|
||||||
|
"Topic :: Religion",
|
||||||
|
"Topic :: Software Development :: Libraries",
|
||||||
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
||||||
|
"Topic :: Utilities"
|
||||||
|
]
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user