ChaterJee 0.5.6__py3-none-any.whl → 0.5.8__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 +10 -10
- {chaterjee-0.5.6.dist-info → chaterjee-0.5.8.dist-info}/METADATA +1 -1
- chaterjee-0.5.8.dist-info/RECORD +6 -0
- chaterjee-0.5.6.dist-info/RECORD +0 -6
- {chaterjee-0.5.6.dist-info → chaterjee-0.5.8.dist-info}/WHEEL +0 -0
- {chaterjee-0.5.6.dist-info → chaterjee-0.5.8.dist-info}/top_level.txt +0 -0
ChaterJee/ChaterJee.py
CHANGED
@@ -111,9 +111,9 @@ class ChatLogs:
|
|
111
111
|
jobs_file = self.home / ".data" / "JOB_status.json"
|
112
112
|
with open(jobs_file, 'r') as ffr:
|
113
113
|
jobs = json.load(ffr)
|
114
|
-
self.jobs = jobs
|
114
|
+
#self.jobs = jobs
|
115
|
+
reply_keyboard = [[f'JOB: {job}'] for job in list(jobs.keys())][::-1] # inverse to show latest jobs on top
|
115
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
119
|
reply_markup=ReplyKeyboardMarkup(reply_keyboard, one_time_keyboard=True, resize_keyboard=True, input_field_placeholder="Select the job."\
|
@@ -124,12 +124,12 @@ class ChatLogs:
|
|
124
124
|
|
125
125
|
async def StatJobs(self, update: Update, context: ContextTypes.DEFAULT_TYPE):
|
126
126
|
self.smsID.append(update.message.message_id)
|
127
|
-
job_name = update.message.text
|
127
|
+
job_name = update.message.text[5:]
|
128
128
|
|
129
129
|
jobs_file = self.home / ".data" / "JOB_status.json"
|
130
130
|
with open(jobs_file, 'r') as ffr:
|
131
131
|
jobs = json.load(ffr)
|
132
|
-
self.jobs = jobs
|
132
|
+
#self.jobs = jobs
|
133
133
|
|
134
134
|
logDIR = Path(jobs[job_name]['logDIR'])
|
135
135
|
logFILE = jobs[job_name]['logFILE']
|
@@ -147,7 +147,7 @@ class ChatLogs:
|
|
147
147
|
#msg = await context.bot.send_message(chat_id=self.CHATID, text=txt)
|
148
148
|
#self.smsID.append(msg.message_id)
|
149
149
|
elif logDICT is not None:
|
150
|
-
self.txt = self.txt + '\n'
|
150
|
+
self.txt = self.txt + '\n\n'
|
151
151
|
for key, value in logDICT.items():
|
152
152
|
self.txt = self.txt + f"{key}: {value}\n"
|
153
153
|
|
@@ -435,18 +435,18 @@ class ChatLogs:
|
|
435
435
|
|
436
436
|
|
437
437
|
class NoteLogs:
|
438
|
-
def __init__(self):
|
438
|
+
def __init__(self, jobNAME: str):
|
439
439
|
self.home = Path.home()
|
440
|
-
self.jobNAME =
|
440
|
+
self.jobNAME = jobNAME
|
441
441
|
self.logDIR = None
|
442
442
|
self.logFILE = None
|
443
443
|
self.logIMAGE = None
|
444
444
|
self.logDICT = None
|
445
445
|
|
446
|
-
def write(self,
|
446
|
+
def write(self, logDIR: str = None, logSTRING: str = None, logFILE: str = 'log_file.out', logIMAGE: str = 'log_file.png'):
|
447
447
|
if logDIR is None:
|
448
448
|
pwd = Path.cwd()
|
449
|
-
_logDIR = pwd / jobNAME
|
449
|
+
_logDIR = pwd / self.jobNAME
|
450
450
|
_logDIR.mkdir(exist_ok=True)
|
451
451
|
else:
|
452
452
|
_logDIR = Path(logDIR)
|
@@ -460,7 +460,7 @@ class NoteLogs:
|
|
460
460
|
|
461
461
|
logDIR = str(_logDIR)
|
462
462
|
|
463
|
-
self.jobNAME = f"JOB: {jobNAME}"
|
463
|
+
#self.jobNAME = f"JOB: {jobNAME}"
|
464
464
|
self.logDIR = logDIR
|
465
465
|
self.logFILE = logFILE
|
466
466
|
self.logIMAGE = logIMAGE
|
@@ -0,0 +1,6 @@
|
|
1
|
+
ChaterJee/ChaterJee.py,sha256=eMJsCABDx9eqGXVSjszlZT_DOKp7WSkrL6q5RAyZZwU,20038
|
2
|
+
ChaterJee/__init__.py,sha256=tZmkZY2XbzJ8rHDh8nOmb1W73kPecPv3xcEiCPwkZf4,98
|
3
|
+
chaterjee-0.5.8.dist-info/METADATA,sha256=F76DaXzKdOGId0h23vb5ELTVsVY7cvy1kGRgaffl6tQ,6723
|
4
|
+
chaterjee-0.5.8.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
5
|
+
chaterjee-0.5.8.dist-info/top_level.txt,sha256=Z1UAYoaNybpDiKjqa1yFpti_q0FNECVItb3-9yAh3gM,10
|
6
|
+
chaterjee-0.5.8.dist-info/RECORD,,
|
chaterjee-0.5.6.dist-info/RECORD
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
ChaterJee/ChaterJee.py,sha256=C01smlgFJiQ7OSb5HMbkNEOOJQ7UtNPztc_pTRps2KI,20021
|
2
|
-
ChaterJee/__init__.py,sha256=tZmkZY2XbzJ8rHDh8nOmb1W73kPecPv3xcEiCPwkZf4,98
|
3
|
-
chaterjee-0.5.6.dist-info/METADATA,sha256=GdIYXFRmqYJji6nbkb0mjQCMOS64anhlDt3g_bU6vJI,6723
|
4
|
-
chaterjee-0.5.6.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
5
|
-
chaterjee-0.5.6.dist-info/top_level.txt,sha256=Z1UAYoaNybpDiKjqa1yFpti_q0FNECVItb3-9yAh3gM,10
|
6
|
-
chaterjee-0.5.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|