PyPtt 1.2.2__tar.gz → 1.2.3__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.
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PKG-INFO +1 -1
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/PTT.py +0 -1
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/__init__.py +1 -1
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_del_post.py +1 -1
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_get_favourite_board.py +1 -1
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_mail.py +1 -1
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_reply_post.py +6 -4
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_search_user.py +1 -1
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/connect_core.py +4 -4
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/lib_util.py +2 -2
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt.egg-info/PKG-INFO +1 -1
- {PyPtt-1.2.2 → PyPtt-1.2.3}/LICENSE +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/MANIFEST.in +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_bucket.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_call_status.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_change_pw.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_comment.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_get_board_info.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_get_board_list.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_get_bottom_post_list.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_get_newest_index.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_get_post.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_get_post_index.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_get_time.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_get_user.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_give_money.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_has_new_mail.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_loginout.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_mark_post.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_post.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_set_board_title.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/_api_util.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/check_value.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/command.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/config.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/data_type.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/exceptions.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/i18n.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/lang/en_US.yaml +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/lang/zh_TW.yaml +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/log.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/screens.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt/service.py +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt.egg-info/SOURCES.txt +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt.egg-info/dependency_links.txt +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt.egg-info/requires.txt +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/PyPtt.egg-info/top_level.txt +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/README.md +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/setup.cfg +0 -0
- {PyPtt-1.2.2 → PyPtt-1.2.3}/setup.py +0 -0
|
@@ -61,7 +61,7 @@ def del_post(api, board: str, post_aid: Optional[str] = None, post_index: int =
|
|
|
61
61
|
post_info = api.get_post(board, aid=post_aid, index=post_index, query=True)
|
|
62
62
|
if post_info[data_type.PostField.post_status] != data_type.PostStatus.EXISTS:
|
|
63
63
|
# delete success
|
|
64
|
-
log.logger.info(i18n.success)
|
|
64
|
+
log.logger.info(i18n.delete_post, '...', i18n.success)
|
|
65
65
|
return
|
|
66
66
|
|
|
67
67
|
if check_author:
|
|
@@ -69,7 +69,7 @@ def get_favourite_board(api) -> list:
|
|
|
69
69
|
board_title = board_title[1:]
|
|
70
70
|
|
|
71
71
|
if board in board_list:
|
|
72
|
-
log.logger.info(i18n.success)
|
|
72
|
+
log.logger.info(i18n.get_favourite_board_list, '...', i18n.success)
|
|
73
73
|
return favourite_board_list
|
|
74
74
|
board_list.append(board)
|
|
75
75
|
|
|
@@ -58,15 +58,17 @@ def reply_post(api, reply_to: data_type.ReplyTo, board: str, content: str, sign_
|
|
|
58
58
|
cmd_list.append(command.enter * 2)
|
|
59
59
|
cmd_list.append('r')
|
|
60
60
|
|
|
61
|
+
reply_msg = ''
|
|
61
62
|
if reply_to == data_type.ReplyTo.BOARD:
|
|
62
|
-
|
|
63
|
+
reply_msg = i18n.reply_board
|
|
63
64
|
reply_target_unit = connect_core.TargetUnit('▲ 回應至', log_level=log.INFO, response='F' + command.enter)
|
|
64
65
|
elif reply_to == data_type.ReplyTo.MAIL:
|
|
65
|
-
|
|
66
|
+
reply_msg = i18n.reply_mail
|
|
66
67
|
reply_target_unit = connect_core.TargetUnit('▲ 回應至', log_level=log.INFO, response='M' + command.enter)
|
|
67
68
|
elif reply_to == data_type.ReplyTo.BOARD_MAIL:
|
|
68
|
-
|
|
69
|
+
reply_msg = i18n.reply_board_mail
|
|
69
70
|
reply_target_unit = connect_core.TargetUnit('▲ 回應至', log_level=log.INFO, response='B' + command.enter)
|
|
71
|
+
log.logger.info(reply_msg)
|
|
70
72
|
|
|
71
73
|
cmd = ''.join(cmd_list)
|
|
72
74
|
target_list = [
|
|
@@ -89,4 +91,4 @@ def reply_post(api, reply_to: data_type.ReplyTo, board: str, content: str, sign_
|
|
|
89
91
|
target_list,
|
|
90
92
|
screen_timeout=api.config.screen_long_timeout)
|
|
91
93
|
|
|
92
|
-
log.logger.info(i18n.success)
|
|
94
|
+
log.logger.info(reply_msg, '...', i18n.success)
|
|
@@ -99,6 +99,6 @@ def search_user(api, ptt_id: str, min_page: int, max_page: int) -> list:
|
|
|
99
99
|
connect_core.TargetUnit('查詢網友', break_detect=True)
|
|
100
100
|
]
|
|
101
101
|
)
|
|
102
|
-
log.logger.info(i18n.success)
|
|
102
|
+
log.logger.info(i18n.search_user, '...', i18n.success)
|
|
103
103
|
|
|
104
104
|
return list(filter(None, resultlist))
|
|
@@ -188,13 +188,13 @@ class API(object):
|
|
|
188
188
|
print(e)
|
|
189
189
|
|
|
190
190
|
if self.config.host == data_type.HOST.PTT1:
|
|
191
|
-
log.logger.info(i18n.connect, i18n.PTT, i18n.fail)
|
|
191
|
+
log.logger.info(i18n.connect, i18n.PTT, '...', i18n.fail)
|
|
192
192
|
elif self.config.host == data_type.HOST.PTT2:
|
|
193
|
-
log.logger.info(i18n.connect, i18n.PTT2, i18n.fail)
|
|
193
|
+
log.logger.info(i18n.connect, i18n.PTT2, '...', i18n.fail)
|
|
194
194
|
elif self.config.host == data_type.HOST.LOCALHOST:
|
|
195
|
-
log.logger.info(i18n.connect, i18n.localhost, i18n.fail)
|
|
195
|
+
log.logger.info(i18n.connect, i18n.localhost, '...', i18n.fail)
|
|
196
196
|
else:
|
|
197
|
-
log.logger.info(i18n.connect, self.config.host, i18n.fail)
|
|
197
|
+
log.logger.info(i18n.connect, self.config.host, '...', i18n.fail)
|
|
198
198
|
|
|
199
199
|
_wait()
|
|
200
200
|
continue
|
|
@@ -106,10 +106,10 @@ def sync_version() -> Tuple[data_type.Compare, str]:
|
|
|
106
106
|
time.sleep(0.5)
|
|
107
107
|
|
|
108
108
|
if r is None:
|
|
109
|
-
log.logger.info(i18n.update_remote_version, i18n.fail)
|
|
109
|
+
log.logger.info(i18n.update_remote_version, '...', i18n.fail)
|
|
110
110
|
return data_type.Compare.SAME, ''
|
|
111
111
|
|
|
112
|
-
log.logger.info(i18n.update_remote_version, i18n.success)
|
|
112
|
+
log.logger.info(i18n.update_remote_version, '...', i18n.success)
|
|
113
113
|
|
|
114
114
|
text = r.text
|
|
115
115
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|