ChaterJee 0.5.5__py3-none-any.whl → 0.5.7__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 CHANGED
@@ -134,7 +134,10 @@ 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
+ try:
138
+ logDICT = jobs[job_name]['logDICT']
139
+ except KeyError:
140
+ logDICT = None
138
141
 
139
142
  self.txt = self.get_last_line(logDIR / logFILE)
140
143
 
@@ -144,7 +147,7 @@ class ChatLogs:
144
147
  #msg = await context.bot.send_message(chat_id=self.CHATID, text=txt)
145
148
  #self.smsID.append(msg.message_id)
146
149
  elif logDICT is not None:
147
- self.txt = self.txt + '\n'
150
+ self.txt = self.txt + '\n\n'
148
151
  for key, value in logDICT.items():
149
152
  self.txt = self.txt + f"{key}: {value}\n"
150
153
 
@@ -432,18 +435,18 @@ class ChatLogs:
432
435
 
433
436
 
434
437
  class NoteLogs:
435
- def __init__(self):
438
+ def __init__(self, jobNAME: str):
436
439
  self.home = Path.home()
437
- self.jobNAME = None
440
+ self.jobNAME = jobNAME
438
441
  self.logDIR = None
439
442
  self.logFILE = None
440
443
  self.logIMAGE = None
441
444
  self.logDICT = None
442
445
 
443
- def write(self, jobNAME: str, logDIR: str = None, logSTRING: str = None, logFILE: str = 'log_file.out', logIMAGE: str = 'log_file.png'):
446
+ def write(self, logDIR: str = None, logSTRING: str = None, logFILE: str = 'log_file.out', logIMAGE: str = 'log_file.png'):
444
447
  if logDIR is None:
445
448
  pwd = Path.cwd()
446
- _logDIR = pwd / jobNAME
449
+ _logDIR = pwd / self.jobNAME
447
450
  _logDIR.mkdir(exist_ok=True)
448
451
  else:
449
452
  _logDIR = Path(logDIR)
@@ -457,13 +460,14 @@ class NoteLogs:
457
460
 
458
461
  logDIR = str(_logDIR)
459
462
 
460
- self.jobNAME = f"JOB: {jobNAME}"
463
+ #self.jobNAME = f"JOB: {jobNAME}"
461
464
  self.logDIR = logDIR
462
465
  self.logFILE = logFILE
463
466
  self.logIMAGE = logIMAGE
464
467
  self.save_job_JSON()
465
468
 
466
469
  def save_job_JSON(self, logDICT: str = None):
470
+ self.jobNAME = f"JOB: {self.jobNAME}"
467
471
  _data = self.home / ".data"
468
472
  _data.mkdir(exist_ok=True)
469
473
  jobs_file = _data / "JOB_status.json"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ChaterJee
3
- Version: 0.5.5
3
+ Version: 0.5.7
4
4
  Summary: Communicate your project updates via Telegram Bot!
5
5
  Author: Pallab Dutta
6
6
  Author-email: pallab9997@gmail.com
@@ -0,0 +1,6 @@
1
+ ChaterJee/ChaterJee.py,sha256=_pwPhoD_yaKC2ABHzqQxkyAz-YdmQk2Idq4Vav2oW14,20078
2
+ ChaterJee/__init__.py,sha256=tZmkZY2XbzJ8rHDh8nOmb1W73kPecPv3xcEiCPwkZf4,98
3
+ chaterjee-0.5.7.dist-info/METADATA,sha256=SQ_6BAyY2kbKwdthB_WZKo_-C0xcUGgCnlirwExEbAw,6723
4
+ chaterjee-0.5.7.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
5
+ chaterjee-0.5.7.dist-info/top_level.txt,sha256=Z1UAYoaNybpDiKjqa1yFpti_q0FNECVItb3-9yAh3gM,10
6
+ chaterjee-0.5.7.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- ChaterJee/ChaterJee.py,sha256=pfUHdF8vmAKeLTIBbXtEJKst1swKBHqzu3VsCvXqQJE,19952
2
- ChaterJee/__init__.py,sha256=tZmkZY2XbzJ8rHDh8nOmb1W73kPecPv3xcEiCPwkZf4,98
3
- chaterjee-0.5.5.dist-info/METADATA,sha256=oSCj7QjFvZD6DqA9aQbL59uN-HrOSLd8kj8UdNFk69Y,6723
4
- chaterjee-0.5.5.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
5
- chaterjee-0.5.5.dist-info/top_level.txt,sha256=Z1UAYoaNybpDiKjqa1yFpti_q0FNECVItb3-9yAh3gM,10
6
- chaterjee-0.5.5.dist-info/RECORD,,