missionpanel 1.1.3__tar.gz → 1.1.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. {missionpanel-1.1.3 → missionpanel-1.1.5}/PKG-INFO +1 -1
  2. {missionpanel-1.1.3 → missionpanel-1.1.5}/missionpanel/example/rsshub.py +3 -3
  3. {missionpanel-1.1.3 → missionpanel-1.1.5}/missionpanel/example/ttrss.py +9 -8
  4. {missionpanel-1.1.3 → missionpanel-1.1.5}/missionpanel.egg-info/PKG-INFO +1 -1
  5. {missionpanel-1.1.3 → missionpanel-1.1.5}/setup.py +1 -1
  6. {missionpanel-1.1.3 → missionpanel-1.1.5}/LICENSE +0 -0
  7. {missionpanel-1.1.3 → missionpanel-1.1.5}/README.md +0 -0
  8. {missionpanel-1.1.3 → missionpanel-1.1.5}/missionpanel/__init__.py +0 -0
  9. {missionpanel-1.1.3 → missionpanel-1.1.5}/missionpanel/example/__init__.py +0 -0
  10. {missionpanel-1.1.3 → missionpanel-1.1.5}/missionpanel/handler/__init__.py +0 -0
  11. {missionpanel-1.1.3 → missionpanel-1.1.5}/missionpanel/handler/handler.py +0 -0
  12. {missionpanel-1.1.3 → missionpanel-1.1.5}/missionpanel/orm/__init__.py +0 -0
  13. {missionpanel-1.1.3 → missionpanel-1.1.5}/missionpanel/orm/core.py +0 -0
  14. {missionpanel-1.1.3 → missionpanel-1.1.5}/missionpanel/orm/handler.py +0 -0
  15. {missionpanel-1.1.3 → missionpanel-1.1.5}/missionpanel/submitter/__init__.py +0 -0
  16. {missionpanel-1.1.3 → missionpanel-1.1.5}/missionpanel/submitter/abc.py +0 -0
  17. {missionpanel-1.1.3 → missionpanel-1.1.5}/missionpanel/submitter/asynchronous.py +0 -0
  18. {missionpanel-1.1.3 → missionpanel-1.1.5}/missionpanel/submitter/submitter.py +0 -0
  19. {missionpanel-1.1.3 → missionpanel-1.1.5}/missionpanel.egg-info/SOURCES.txt +0 -0
  20. {missionpanel-1.1.3 → missionpanel-1.1.5}/missionpanel.egg-info/dependency_links.txt +0 -0
  21. {missionpanel-1.1.3 → missionpanel-1.1.5}/missionpanel.egg-info/requires.txt +0 -0
  22. {missionpanel-1.1.3 → missionpanel-1.1.5}/missionpanel.egg-info/top_level.txt +0 -0
  23. {missionpanel-1.1.3 → missionpanel-1.1.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: missionpanel
3
- Version: 1.1.3
3
+ Version: 1.1.5
4
4
  Summary: A mission panel
5
5
  Home-page: https://github.com/yindaheng98/missionpanel
6
6
  Author: yindaheng98
@@ -8,7 +8,7 @@ from missionpanel.submitter import AsyncSubmitter
8
8
  class RSSHubSubmitter(AsyncSubmitter, metaclass=abc.ABCMeta):
9
9
 
10
10
  @abc.abstractmethod
11
- async def parse_xml(self, xml: str) -> AsyncGenerator[Any, None]:
11
+ async def parse_xml(self, xml: str) -> AsyncGenerator[dict, Any]:
12
12
  pass
13
13
 
14
14
  async def derive_tags(self, mission_content) -> List[str]:
@@ -30,7 +30,7 @@ class RSSHubSubmitter(AsyncSubmitter, metaclass=abc.ABCMeta):
30
30
 
31
31
  class RSSHubRootSubmitter(RSSHubSubmitter):
32
32
 
33
- async def parse_xml(self, xml: str) -> AsyncGenerator[str, None]:
33
+ async def parse_xml(self, xml: str) -> AsyncGenerator[dict, Any]:
34
34
  root = ElementTree.XML(xml)
35
35
  yield {
36
36
  'url': root.find('channel/link').text,
@@ -40,7 +40,7 @@ class RSSHubRootSubmitter(RSSHubSubmitter):
40
40
 
41
41
  class RSSHubSubitemSubmitter(RSSHubSubmitter):
42
42
 
43
- async def parse_xml(self, xml: str) -> AsyncGenerator[str, None]:
43
+ async def parse_xml(self, xml: str) -> AsyncGenerator[dict, Any]:
44
44
  root = ElementTree.XML(xml)
45
45
  for item in root.find('channel').iter('item'):
46
46
  yield {'url': item.find('link').text}
@@ -71,7 +71,7 @@ class TTRSSClient(httpx.AsyncClient):
71
71
  class TTRSSSubmitter(AsyncSubmitter, metaclass=abc.ABCMeta):
72
72
 
73
73
  @abc.abstractmethod
74
- async def parse_content(self, feed: dict, content: dict) -> AsyncGenerator[Any, None]:
74
+ async def parse_content(self, feed: dict, content: dict) -> AsyncGenerator[dict, Any]:
75
75
  pass
76
76
 
77
77
  async def derive_tags(self, mission_content) -> List[str]:
@@ -107,13 +107,13 @@ class TTRSSHubSubmitter(TTRSSSubmitter):
107
107
  logger = logging.getLogger("TTRSSHubSubmitter")
108
108
 
109
109
  @abc.abstractmethod
110
- async def parse_xml(self, xml: str, feed: dict, content: dict) -> AsyncGenerator[Any, None]:
110
+ async def parse_xml(self, xml: str, feed: dict, content: dict) -> AsyncGenerator[dict, Any]:
111
111
  pass
112
112
 
113
113
  async def preprocess(self, feed: dict, content: dict) -> Union[Dict, None]:
114
114
  return feed
115
115
 
116
- async def parse_content_nocatch(self, feed: dict, content: dict, **httpx_client_options) -> AsyncGenerator[Any, None]:
116
+ async def parse_content_nocatch(self, feed: dict, content: dict, **httpx_client_options) -> AsyncGenerator[dict, Any]:
117
117
  feed = await self.preprocess(feed, content)
118
118
  if feed is None:
119
119
  return
@@ -122,7 +122,7 @@ class TTRSSHubSubmitter(TTRSSSubmitter):
122
122
  async for mission_content in self.parse_xml(response.text, feed, content):
123
123
  yield mission_content
124
124
 
125
- async def parse_content(self, feed: dict, content: dict, **httpx_client_options) -> AsyncGenerator[Any, None]:
125
+ async def parse_content(self, feed: dict, content: dict, **httpx_client_options) -> AsyncGenerator[dict, Any]:
126
126
  try:
127
127
  async for mission_content in self.parse_content_nocatch(feed, content, **httpx_client_options):
128
128
  yield mission_content
@@ -132,17 +132,18 @@ class TTRSSHubSubmitter(TTRSSSubmitter):
132
132
 
133
133
  class TTRRSSHubRootSubmitter(TTRSSHubSubmitter):
134
134
 
135
- async def parse_xml(self, xml: str, feed: dict, content: dict) -> AsyncGenerator[str, None]:
135
+ async def parse_xml(self, xml: str, feed: dict, content: dict) -> AsyncGenerator[dict, Any]:
136
136
  root = ElementTree.XML(xml)
137
137
  yield {
138
138
  'url': root.find('channel/link').text,
139
- 'latest': [item.find('link').text for item in root.iter('item')][0]
139
+ 'latest': [item.find('link').text for item in root.iter('item')][0],
140
+ **feed
140
141
  }
141
142
 
142
143
 
143
144
  class TTRRSSHubSubitemSubmitter(TTRSSHubSubmitter):
144
145
 
145
- async def parse_xml(self, xml: str, feed: dict, content: dict) -> AsyncGenerator[str, None]:
146
+ async def parse_xml(self, xml: str, feed: dict, content: dict) -> AsyncGenerator[dict, Any]:
146
147
  root = ElementTree.XML(xml)
147
148
  for item in root.find('channel').iter('item'):
148
- yield {'url': item.find('link').text}
149
+ yield {'url': item.find('link').text, **feed}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: missionpanel
3
- Version: 1.1.3
3
+ Version: 1.1.5
4
4
  Summary: A mission panel
5
5
  Home-page: https://github.com/yindaheng98/missionpanel
6
6
  Author: yindaheng98
@@ -12,7 +12,7 @@ package_dir = {
12
12
 
13
13
  setup(
14
14
  name='missionpanel',
15
- version='1.1.3',
15
+ version='1.1.5',
16
16
  author='yindaheng98',
17
17
  author_email='yindaheng98@gmail.com',
18
18
  url='https://github.com/yindaheng98/missionpanel',
File without changes
File without changes
File without changes