Fix a bug where I forgot to use keyword args.
This commit is contained in:
parent
80717b6163
commit
a809176318
96
.idea/workspace.xml
generated
96
.idea/workspace.xml
generated
@ -2,7 +2,9 @@
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="c8edefbc-71df-41a9-9878-b830c52cd7b5" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/goarch_api/client.py" beforeDir="false" afterPath="$PROJECT_DIR$/goarch_api/client.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/goarch_api/saint.py" beforeDir="false" afterPath="$PROJECT_DIR$/goarch_api/saint.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/setup.py" beforeDir="false" afterPath="$PROJECT_DIR$/setup.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
@ -15,10 +17,10 @@
|
||||
<session id="1829562699">
|
||||
<usages-collector id="statistics.lifecycle.project">
|
||||
<counts>
|
||||
<entry key="project.closed" value="1" />
|
||||
<entry key="project.open.time.2" value="1" />
|
||||
<entry key="project.open.time.4" value="1" />
|
||||
<entry key="project.opened" value="2" />
|
||||
<entry key="project.closed" value="3" />
|
||||
<entry key="project.open.time.2" value="2" />
|
||||
<entry key="project.open.time.4" value="2" />
|
||||
<entry key="project.opened" value="4" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
<usages-collector id="statistics.file.extensions.open">
|
||||
@ -43,7 +45,7 @@
|
||||
<entry key="dummy" value="14" />
|
||||
<entry key="gitignore" value="1" />
|
||||
<entry key="md" value="690" />
|
||||
<entry key="py" value="11446" />
|
||||
<entry key="py" value="11483" />
|
||||
<entry key="txt" value="122" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
@ -51,7 +53,7 @@
|
||||
<counts>
|
||||
<entry key="Markdown" value="690" />
|
||||
<entry key="PLAIN_TEXT" value="137" />
|
||||
<entry key="Python" value="11508" />
|
||||
<entry key="Python" value="11545" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
</session>
|
||||
@ -108,12 +110,12 @@
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/goarch_api/client.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="161">
|
||||
<caret line="7" lean-forward="true" selection-start-line="7" selection-end-line="7" />
|
||||
<state relative-caret-position="36">
|
||||
<caret line="8" column="79" selection-start-line="8" selection-start-column="79" selection-end-line="8" selection-end-column="79" />
|
||||
<folding>
|
||||
<element signature="e#0#15#0" expanded="true" />
|
||||
<marker date="1535039169428" expanded="true" signature="46:47" ph="..." />
|
||||
<marker date="1535039169428" expanded="true" signature="46:51" ph="..." />
|
||||
<marker date="1535100009297" expanded="true" signature="46:47" ph="..." />
|
||||
<marker date="1535100009297" expanded="true" signature="46:51" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -122,7 +124,7 @@
|
||||
<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="174">
|
||||
<state relative-caret-position="289">
|
||||
<caret line="62" column="51" selection-start-line="62" selection-start-column="51" selection-end-line="62" selection-end-column="51" />
|
||||
<folding>
|
||||
<element signature="e#0#22#0" expanded="true" />
|
||||
@ -135,14 +137,18 @@
|
||||
</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" />
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="23">
|
||||
<caret line="41" column="23" lean-forward="true" selection-start-line="41" selection-start-column="23" selection-end-line="41" selection-end-column="23" />
|
||||
</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="220">
|
||||
<caret line="17" column="66" selection-start-line="17" selection-start-column="66" selection-end-line="17" selection-end-column="66" />
|
||||
<state relative-caret-position="138">
|
||||
<caret line="36" column="36" lean-forward="true" selection-start-line="36" selection-start-column="36" selection-end-line="36" selection-end-column="36" />
|
||||
<folding>
|
||||
<element signature="e#0#9#0" expanded="true" />
|
||||
</folding>
|
||||
@ -153,7 +159,7 @@
|
||||
<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="174">
|
||||
<state relative-caret-position="1472">
|
||||
<caret line="69" column="63" selection-start-line="69" selection-start-column="63" selection-end-line="69" selection-end-column="63" />
|
||||
<folding>
|
||||
<element signature="e#0#9#0" expanded="true" />
|
||||
@ -198,9 +204,9 @@
|
||||
<option value="$PROJECT_DIR$/goarch_api/models.py" />
|
||||
<option value="$PROJECT_DIR$/LICENSE.txt" />
|
||||
<option value="$PROJECT_DIR$/README.md" />
|
||||
<option value="$PROJECT_DIR$/goarch_api/saint.py" />
|
||||
<option value="$PROJECT_DIR$/goarch_api/lectionary.py" />
|
||||
<option value="$PROJECT_DIR$/goarch_api/daily.py" />
|
||||
<option value="$PROJECT_DIR$/goarch_api/saint.py" />
|
||||
<option value="$PROJECT_DIR$/setup.py" />
|
||||
<option value="$PROJECT_DIR$/goarch_api/client.py" />
|
||||
</list>
|
||||
@ -363,7 +369,7 @@
|
||||
<frame x="54" y="27" width="1312" height="741" extended-state="6" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info content_ui="combo" id="Project" order="0" sideWeight="0.8172839" visible="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 id="Favorites" order="2" sideWeight="0.18271606" side_tool="true" weight="0.24980605" />
|
||||
<window_info anchor="bottom" id="Message" order="0" />
|
||||
@ -375,7 +381,7 @@
|
||||
<window_info anchor="bottom" id="TODO" order="6" weight="0.3294702" />
|
||||
<window_info anchor="bottom" id="Thumbnails" order="7" weight="0.3294702" />
|
||||
<window_info anchor="bottom" id="Version Control" order="8" />
|
||||
<window_info active="true" anchor="bottom" id="Terminal" order="9" visible="true" weight="0.3305648" />
|
||||
<window_info anchor="bottom" id="Terminal" order="9" visible="true" weight="0.3305648" />
|
||||
<window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
|
||||
<window_info anchor="bottom" id="Python Console" order="11" weight="0.3294702" />
|
||||
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
|
||||
@ -394,16 +400,6 @@
|
||||
<entry file="file://$PROJECT_DIR$/src/goarch_api/translation.py" />
|
||||
<entry file="file://$PROJECT_DIR$/src/goarch_api/reading.py" />
|
||||
<entry file="file://$PROJECT_DIR$/src/test_all.py" />
|
||||
<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="161">
|
||||
<caret line="7" selection-start-line="7" selection-end-line="7" />
|
||||
</first_editor>
|
||||
<second_editor />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/.gitignore">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="3082">
|
||||
@ -421,12 +417,9 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/goarch_api/models.py">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/goarch_api/lectionary.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="174">
|
||||
<state relative-caret-position="1472">
|
||||
<caret line="69" column="63" selection-start-line="69" selection-start-column="63" selection-end-line="69" selection-end-column="63" />
|
||||
<folding>
|
||||
<element signature="e#0#9#0" expanded="true" />
|
||||
@ -435,19 +428,16 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/goarch_api/saint.py">
|
||||
<entry file="file://$PROJECT_DIR$/goarch_api/models.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="220">
|
||||
<caret line="17" column="66" selection-start-line="17" selection-start-column="66" selection-end-line="17" selection-end-column="66" />
|
||||
<folding>
|
||||
<element signature="e#0#9#0" expanded="true" />
|
||||
</folding>
|
||||
<state relative-caret-position="23">
|
||||
<caret line="41" column="23" lean-forward="true" selection-start-line="41" selection-start-column="23" selection-end-line="41" selection-end-column="23" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/goarch_api/daily.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="174">
|
||||
<state relative-caret-position="289">
|
||||
<caret line="62" column="51" selection-start-line="62" selection-start-column="51" selection-end-line="62" selection-end-column="51" />
|
||||
<folding>
|
||||
<element signature="e#0#22#0" expanded="true" />
|
||||
@ -457,6 +447,26 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/goarch_api/saint.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="138">
|
||||
<caret line="36" column="36" lean-forward="true" selection-start-line="36" selection-start-column="36" selection-end-line="36" selection-end-column="36" />
|
||||
<folding>
|
||||
<element signature="e#0#9#0" expanded="true" />
|
||||
</folding>
|
||||
</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="161">
|
||||
<caret line="7" selection-start-line="7" selection-end-line="7" />
|
||||
</first_editor>
|
||||
<second_editor />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/setup.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="92">
|
||||
@ -466,12 +476,12 @@
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/goarch_api/client.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="161">
|
||||
<caret line="7" lean-forward="true" selection-start-line="7" selection-end-line="7" />
|
||||
<state relative-caret-position="36">
|
||||
<caret line="8" column="79" selection-start-line="8" selection-start-column="79" selection-end-line="8" selection-end-column="79" />
|
||||
<folding>
|
||||
<element signature="e#0#15#0" expanded="true" />
|
||||
<marker date="1535039169428" expanded="true" signature="46:47" ph="..." />
|
||||
<marker date="1535039169428" expanded="true" signature="46:51" ph="..." />
|
||||
<marker date="1535100009297" expanded="true" signature="46:47" ph="..." />
|
||||
<marker date="1535100009297" expanded="true" signature="46:51" ph="..." />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -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.2), Python/'
|
||||
user_agent = 'goarch_api (https://github.com/Oikonomia/goarch_api 1.0.4), Python/'
|
||||
self.user_agent = f"{user_agent}{sys.version_info[0]}.{sys.version_info[1]}"
|
||||
|
||||
def request(self, method, path):
|
||||
|
@ -1,6 +1,7 @@
|
||||
import re
|
||||
|
||||
from lxml import etree
|
||||
import html
|
||||
|
||||
from goarch_api.client import HTTPClient
|
||||
from goarch_api.models import Translation, LectionaryReading, Icon, Hymn
|
||||
@ -8,7 +9,7 @@ from goarch_api.models import Translation, LectionaryReading, Icon, Hymn
|
||||
|
||||
def remove_html_tags(raw):
|
||||
regex = re.compile('<.*?>')
|
||||
return re.sub(regex, " ", raw)
|
||||
return html.unescape(re.sub(regex, " ", raw))
|
||||
|
||||
|
||||
class Saint:
|
||||
@ -37,7 +38,7 @@ class Saint:
|
||||
file_path = icon.find("filepath").text
|
||||
_copyright = icon.find("copyright").text
|
||||
|
||||
converted_icon = Icon(_id, file_path, _copyright)
|
||||
converted_icon = Icon(file_path, _copyright, _id=_id)
|
||||
|
||||
self.icons.append(converted_icon)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user