ChaterJee 0.5.2__py3-none-any.whl → 0.5.3__py3-none-any.whl
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.
- ChaterJee/ChaterJee.py +16 -7
- {chaterjee-0.5.2.dist-info → chaterjee-0.5.3.dist-info}/METADATA +3 -10
- chaterjee-0.5.3.dist-info/RECORD +6 -0
- {chaterjee-0.5.2.dist-info → chaterjee-0.5.3.dist-info}/WHEEL +1 -1
- chaterjee-0.5.2.dist-info/RECORD +0 -6
- {chaterjee-0.5.2.dist-info → chaterjee-0.5.3.dist-info}/top_level.txt +0 -0
ChaterJee/ChaterJee.py
CHANGED
@@ -116,7 +116,7 @@ class ChatLogs:
|
|
116
116
|
reply_keyboard = [[f'{job}'] for job in list(self.jobs.keys())[::-1]] # inverse to show latest jobs on top
|
117
117
|
await context.bot.sendChatAction(chat_id=self.CHATID, action="typing")
|
118
118
|
msg = await update.message.reply_text("Select a job to get updates on",\
|
119
|
-
reply_markup=ReplyKeyboardMarkup(reply_keyboard, one_time_keyboard=True, input_field_placeholder="Select the job."\
|
119
|
+
reply_markup=ReplyKeyboardMarkup(reply_keyboard, one_time_keyboard=True, resize_keyboard=True, input_field_placeholder="Select the job."\
|
120
120
|
),\
|
121
121
|
)
|
122
122
|
self.smsID.append(msg.message_id)
|
@@ -134,6 +134,7 @@ class ChatLogs:
|
|
134
134
|
logDIR = Path(jobs[job_name]['logDIR'])
|
135
135
|
logFILE = jobs[job_name]['logFILE']
|
136
136
|
logIMAGE = jobs[job_name]['logIMAGE']
|
137
|
+
logDICT = jobs[job_name]['logDICT']
|
137
138
|
|
138
139
|
self.txt = self.get_last_line(logDIR / logFILE)
|
139
140
|
|
@@ -142,6 +143,10 @@ class ChatLogs:
|
|
142
143
|
#await self.sendUpdate(update, context)
|
143
144
|
#msg = await context.bot.send_message(chat_id=self.CHATID, text=txt)
|
144
145
|
#self.smsID.append(msg.message_id)
|
146
|
+
elif logDICT is not None:
|
147
|
+
self.txt = self.txt + '\n'
|
148
|
+
for key, value in logDICT.items():
|
149
|
+
self.txt = self.txt + f"{key}: {value}\n"
|
145
150
|
|
146
151
|
await context.bot.sendChatAction(chat_id=self.CHATID, action="typing")
|
147
152
|
msg = await update.message.reply_text(
|
@@ -241,7 +246,7 @@ class ChatLogs:
|
|
241
246
|
await context.bot.sendChatAction(chat_id=self.CHATID, action="typing")
|
242
247
|
if len(JSONfiles):
|
243
248
|
msg = await update.message.reply_text("Select a JSON file to edit",\
|
244
|
-
reply_markup=ReplyKeyboardMarkup(JSONfiles, one_time_keyboard=True, input_field_placeholder="Select the file."\
|
249
|
+
reply_markup=ReplyKeyboardMarkup(JSONfiles, one_time_keyboard=True, resize_keyboard=True, input_field_placeholder="Select the file."\
|
245
250
|
),\
|
246
251
|
)
|
247
252
|
self.smsID.append(msg.message_id)
|
@@ -274,7 +279,8 @@ class ChatLogs:
|
|
274
279
|
KeyboardButton(
|
275
280
|
text="Editor Babu",
|
276
281
|
web_app=WebAppInfo(url="https://pallab-dutta.github.io/EditorBabu"+extender),
|
277
|
-
)
|
282
|
+
),
|
283
|
+
resize_keyboard=True, one_time_keyboard=True
|
278
284
|
),
|
279
285
|
)
|
280
286
|
self.smsID.append(msg.message_id)
|
@@ -374,7 +380,7 @@ class ChatLogs:
|
|
374
380
|
print(reply_keyboard)
|
375
381
|
await context.bot.sendChatAction(chat_id=self.CHATID, action="typing")
|
376
382
|
msg = await update.message.reply_text("Entire chat history in the current session will be cleared. Proceed?",\
|
377
|
-
reply_markup=ReplyKeyboardMarkup(reply_keyboard, one_time_keyboard=True, input_field_placeholder="Select to proceed."\
|
383
|
+
reply_markup=ReplyKeyboardMarkup(reply_keyboard, one_time_keyboard=True, resize_keyboard=True, input_field_placeholder="Select to proceed."\
|
378
384
|
),\
|
379
385
|
)
|
380
386
|
self.smsID.append(msg.message_id)
|
@@ -396,7 +402,7 @@ class ChatLogs:
|
|
396
402
|
print(reply_keyboard)
|
397
403
|
await context.bot.sendChatAction(chat_id=self.CHATID, action="typing")
|
398
404
|
msg = await update.message.reply_text("Your job will be killed. Proceed?",\
|
399
|
-
reply_markup=ReplyKeyboardMarkup(reply_keyboard, one_time_keyboard=True, input_field_placeholder="Select to proceed."\
|
405
|
+
reply_markup=ReplyKeyboardMarkup(reply_keyboard, one_time_keyboard=True, resize_keyboard=True, input_field_placeholder="Select to proceed."\
|
400
406
|
),\
|
401
407
|
)
|
402
408
|
self.smsID.append(msg.message_id)
|
@@ -432,8 +438,9 @@ class NoteLogs:
|
|
432
438
|
self.logDIR = None
|
433
439
|
self.logFILE = None
|
434
440
|
self.logIMAGE = None
|
441
|
+
self.logDICT = None
|
435
442
|
|
436
|
-
def write(self, jobNAME: str, logDIR: str = None, logSTRING: str = None, logFILE: str = 'log_file.out', logIMAGE: str = 'log_file.png'):
|
443
|
+
def write(self, jobNAME: str, logDIR: str = None, logSTRING: str = None, logFILE: str = 'log_file.out', logIMAGE: str = 'log_file.png', logDICT: dict = None):
|
437
444
|
if logDIR is None:
|
438
445
|
pwd = Path.cwd()
|
439
446
|
_logDIR = pwd / jobNAME
|
@@ -454,6 +461,7 @@ class NoteLogs:
|
|
454
461
|
self.logDIR = logDIR
|
455
462
|
self.logFILE = logFILE
|
456
463
|
self.logIMAGE = logIMAGE
|
464
|
+
self.logDICT = logDICT
|
457
465
|
self.save_job_JSON()
|
458
466
|
|
459
467
|
def save_job_JSON(self):
|
@@ -468,7 +476,8 @@ class NoteLogs:
|
|
468
476
|
jobs[self.jobNAME] = {\
|
469
477
|
"logDIR": self.logDIR, \
|
470
478
|
"logFILE": self.logFILE, \
|
471
|
-
"logIMAGE": self.logIMAGE \
|
479
|
+
"logIMAGE": self.logIMAGE, \
|
480
|
+
"logDICT": self.logDICT \
|
472
481
|
}
|
473
482
|
with open(jobs_file, 'w') as ffw:
|
474
483
|
json.dump(jobs, ffw, indent=4)
|
@@ -1,19 +1,12 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.1
|
2
2
|
Name: ChaterJee
|
3
|
-
Version: 0.5.
|
3
|
+
Version: 0.5.3
|
4
4
|
Summary: Communicate your project updates via Telegram Bot!
|
5
5
|
Author: Pallab Dutta
|
6
6
|
Author-email: pallab9997@gmail.com
|
7
7
|
Requires-Python: >=3.8
|
8
8
|
Description-Content-Type: text/markdown
|
9
|
-
Requires-Dist: python-telegram-bot==20.7
|
10
|
-
Dynamic: author
|
11
|
-
Dynamic: author-email
|
12
|
-
Dynamic: description
|
13
|
-
Dynamic: description-content-type
|
14
|
-
Dynamic: requires-dist
|
15
|
-
Dynamic: requires-python
|
16
|
-
Dynamic: summary
|
9
|
+
Requires-Dist: python-telegram-bot ==20.7
|
17
10
|
|
18
11
|
# ChaterJee
|
19
12
|
|
@@ -0,0 +1,6 @@
|
|
1
|
+
ChaterJee/ChaterJee.py,sha256=SX5GMijhukAs8fp-IH3AHM_IR2vh5iuSFNkXrhT1OOo,19693
|
2
|
+
ChaterJee/__init__.py,sha256=tZmkZY2XbzJ8rHDh8nOmb1W73kPecPv3xcEiCPwkZf4,98
|
3
|
+
chaterjee-0.5.3.dist-info/METADATA,sha256=sn74rD6LqCLw98WlXwE8Le9-nnNot4atPEvYWM1b95o,6723
|
4
|
+
chaterjee-0.5.3.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
5
|
+
chaterjee-0.5.3.dist-info/top_level.txt,sha256=Z1UAYoaNybpDiKjqa1yFpti_q0FNECVItb3-9yAh3gM,10
|
6
|
+
chaterjee-0.5.3.dist-info/RECORD,,
|
chaterjee-0.5.2.dist-info/RECORD
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
ChaterJee/ChaterJee.py,sha256=DnXbonSrWbN2r2CtrUeLCkVK3srd9w7AxB0y6TE0Vaw,19197
|
2
|
-
ChaterJee/__init__.py,sha256=tZmkZY2XbzJ8rHDh8nOmb1W73kPecPv3xcEiCPwkZf4,98
|
3
|
-
chaterjee-0.5.2.dist-info/METADATA,sha256=uTt1qnsHT0XmhDYWU-OD15QLaAVbFiopiQi2OXr6PQ0,6880
|
4
|
-
chaterjee-0.5.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
5
|
-
chaterjee-0.5.2.dist-info/top_level.txt,sha256=Z1UAYoaNybpDiKjqa1yFpti_q0FNECVItb3-9yAh3gM,10
|
6
|
-
chaterjee-0.5.2.dist-info/RECORD,,
|
File without changes
|