Skip to content

Commit

Permalink
0.9.4a2.dev1 (#52)
Browse files Browse the repository at this point in the history
* test: add hb exception test

* proj: update dependency and pre-commit

* doc(intl): add translation files

Co-authored-by: JamzumSum <[email protected]>
  • Loading branch information
github-actions[bot] and JamzumSum authored Oct 18, 2022
1 parent 47be380 commit 1c0c779
Show file tree
Hide file tree
Showing 12 changed files with 854 additions and 249 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ tmp
/dist
/build
*.egg-info
/doc/source/locale/**/*.mo

# useless documents
archive
Expand Down
33 changes: 26 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,41 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-toml
- id: check-yaml
- repo: https://github.com/pycqa/isort
rev: 5.10.1
- id: check-added-large-files
- repo: local
hooks:
- id: poetry
name: poetry check
entry: poetry check
pass_filenames: false
language: system
# - id: poetry
# name: poetry lock
# entry: poetry lock -vv
# pass_filenames: false
# language: system
- id: isort
name: isort (python)
- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
entry: poetry run isort .
pass_filenames: false
language: system
- id: black
name: Black
entry: poetry run black .
pass_filenames: false
language: system
# - id: pytest
# name: pytest-check
# entry: poetry run pytest test
# language: system
# pass_filenames: false
# always_run: true
default_language_version:
python: python3
5 changes: 5 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
"sphinx.ext.githubpages",
]

# translations
language = "zh_CN"
locale_dirs = ["locale/"]
gettext_compact = False

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

Expand Down
2 changes: 1 addition & 1 deletion doc/source/interface/hook.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
aioqzone-feed Events
=========================

aioqzone-feed follows the hook system defined in :external:mod:`aioqzone.interface.hook`.
aioqzone-feed follows the hook system defined in :external:mod:`qqqr.event`.

.. autoclass:: aioqzone_feed.interface.hook.FeedEvent
:members:
217 changes: 217 additions & 0 deletions doc/source/locale/zh_CN/LC_MESSAGES/api.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aioqzone
# This file is distributed under the same license as the aioqzone-feed
# package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: aioqzone-feed \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-10-18 13:17+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.10.3\n"

#: ../../source/api/emoji.rst:2
msgid "Emoji API"
msgstr ""

#: aioqzone_feed.api.emoji:1 of
msgid "Translate emoji representation to text."
msgstr ""

#: aioqzone_feed.api.emoji.sub:1 of
msgid ""
"The sub function is a async-version of :meth:`re.sub`. It works like "
"pattern.sub(repl, text), except for this `repl` is an async-function."
msgstr ""

#: aioqzone_feed.api.emoji.sub aioqzone_feed.api.feed.FeedApi.add_heartbeat
#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_count
#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_second
#: aioqzone_feed.api.feed.FeedApi.wait of
msgid "Parameters"
msgstr ""

#: aioqzone_feed.api.emoji.sub:5 of
msgid "regex expression."
msgstr ""

#: aioqzone_feed.api.emoji.sub:7 of
msgid ""
"Used to replace the matched text. Input an :class:`re.Match`, returns a "
"string, async."
msgstr ""

#: aioqzone_feed.api.emoji.sub:9 of
msgid "String to be searched."
msgstr ""

#: aioqzone_feed.api.emoji.sub aioqzone_feed.api.feed.FeedApi.add_heartbeat
#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_count
#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_second
#: aioqzone_feed.api.feed.FeedApi.new_batch aioqzone_feed.api.feed.FeedApi.wait
#: of
msgid "Returns"
msgstr ""

#: aioqzone_feed.api.emoji.sub:10 of
msgid "replaced string."
msgstr ""

#: ../../source/api/feed.rst:2
msgid "Feed API"
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.add_heartbeat:1 of
msgid "create a heartbeat task and keep a ref of it."
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.add_heartbeat:4 of
msgid "max retry times when some exceptions occurs, defaults to 5."
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.add_heartbeat:6 of
msgid "retry interval, defaults to 5."
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.add_heartbeat:7 of
msgid "heartbeat interval, defaults to 300."
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.add_heartbeat:8 of
msgid "the heartbeat task"
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.clear:1 of
msgid "Cancel all **dispatch** tasks registered."
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.clear:3 of
msgid ":external:meth:`qqqr.event.Emittable.clear`"
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_count:1 of
msgid "Get feeds by count."
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_count:4 of
msgid "feeds count to get, max as 10, defaults to 10"
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_count
#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_second of
msgid "Raises"
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_count:6
#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_second:10 of
msgid "qr login canceled"
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_count:7
#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_second:11 of
msgid "not logined"
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_count:8
#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_second:12 of
msgid "unexcpected error"
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_count
#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_second
#: aioqzone_feed.api.feed.FeedApi.new_batch aioqzone_feed.api.feed.FeedApi.stop
#: aioqzone_feed.api.feed.FeedApi.wait of
msgid "Return type"
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_count:10
#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_second:14 of
msgid ":py:class:`int`"
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_count:11
#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_second:15 of
msgid "feeds num got actually."
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_count:13 of
msgid "..note:: You may need :meth:`.new_batch` to generate a new batch id."
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_second:1 of
msgid "Get feeds by abstime (seconds). Range: `[start - second, start]`."
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_second:4 of
msgid "filter on abstime, calculate from `start`."
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_second:6 of
msgid "start timestamp, defaults to None, means now."
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.get_feeds_by_second:8 of
msgid "another criterion to judge if the feed is out of range, defaults to None"
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.new_batch:1 of
msgid "The new_batch function edit internal batch id and return it."
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.new_batch:3 of
msgid ""
"A batch id can be used to identify a batch, thus even the same feed can "
"have different id e.g. `(bid, uin, abstime)`."
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.new_batch:5 of
msgid ":obj:`.TY_BID`"
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.new_batch:6 of
msgid "The batch_id."
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.stop:1 of
msgid ""
"Clear __all__ registered tasks. All tasks will be CANCELLED if not "
"finished."
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.stop:4 of
msgid ":py:obj:`None`"
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.wait:1 of
msgid "Wait for all dispatch and hook tasks."
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.wait:4 of
msgid "wait timeout, defaults to None"
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.wait:5 of
msgid ""
":py:data:`~typing.Tuple`\\[:py:class:`~typing.Set`\\[:py:class:`~_asyncio.Task`],"
" :py:class:`~typing.Set`\\[:py:class:`~_asyncio.Task`]]"
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.wait:6 of
msgid "two set of tasks means (done, pending)"
msgstr ""

#: aioqzone_feed.api.feed.FeedApi.wait:8 of
msgid ":external:meth:`qqqr.event.Emittable.wait`"
msgstr ""

#: ../../source/api/index.rst:2
msgid "aioqzone-feed APIs"
msgstr ""
51 changes: 51 additions & 0 deletions doc/source/locale/zh_CN/LC_MESSAGES/index.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aioqzone
# This file is distributed under the same license as the aioqzone-feed
# package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: aioqzone-feed \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-10-18 13:15+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.10.3\n"

#: ../../source/index.rst:12
msgid "Contents"
msgstr ""

#: ../../source/index.rst:7
msgid "Welcome to aioqzone-feed's documentation!"
msgstr ""

#: ../../source/index.rst:9
msgid ""
"`aioqzone-feed` is a plugin of `aioqzone "
"<https://github.com/aioqzone/aioqzone>`_, aiming at post-processing feeds"
" fetched by Qzone API. `aioqzone-feed` could be regarded as a set of "
"high-level Qzone Feed APIs."
msgstr ""

#: ../../source/index.rst:22
msgid "Indices and tables"
msgstr ""

#: ../../source/index.rst:24
msgid ":ref:`genindex`"
msgstr ""

#: ../../source/index.rst:25
msgid ":ref:`modindex`"
msgstr ""

#: ../../source/index.rst:26
msgid ":ref:`search`"
msgstr ""
Loading

0 comments on commit 1c0c779

Please sign in to comment.