ChaterJee 0.5.4__py3-none-any.whl → 0.5.6__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
 
@@ -440,7 +443,7 @@ class NoteLogs:
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', logDICT: dict = None):
446
+ def write(self, jobNAME: str, 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
449
  _logDIR = pwd / jobNAME
@@ -461,10 +464,9 @@ class NoteLogs:
461
464
  self.logDIR = logDIR
462
465
  self.logFILE = logFILE
463
466
  self.logIMAGE = logIMAGE
464
- self.logDICT = logDICT
465
467
  self.save_job_JSON()
466
468
 
467
- def save_job_JSON(self):
469
+ def save_job_JSON(self, logDICT: str = None):
468
470
  _data = self.home / ".data"
469
471
  _data.mkdir(exist_ok=True)
470
472
  jobs_file = _data / "JOB_status.json"
@@ -484,8 +486,8 @@ class NoteLogs:
484
486
  jobD["logFILE"] = self.logFILE
485
487
  if self.logIMAGE is not None:
486
488
  jobD["logIMAGE"] = self.logIMAGE
487
- if self.logDICT is not None:
488
- jobD["logDICT"] = self.logDICT
489
+ if logDICT is not None:
490
+ jobD["logDICT"] = logDICT
489
491
  if len(jobD):
490
492
  jobs[self.jobNAME] = jobD
491
493
  with open(jobs_file, 'w') as ffw:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ChaterJee
3
- Version: 0.5.4
3
+ Version: 0.5.6
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=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,,
@@ -1,6 +0,0 @@
1
- ChaterJee/ChaterJee.py,sha256=Kfp7TuUOUJAOTIacLthKJi_zupxnIxIeE-mVdhBsGf4,19994
2
- ChaterJee/__init__.py,sha256=tZmkZY2XbzJ8rHDh8nOmb1W73kPecPv3xcEiCPwkZf4,98
3
- chaterjee-0.5.4.dist-info/METADATA,sha256=R92CyBKh0KzIwkjvWwRYiJebm1zlXNGzF7pE0QbClKs,6723
4
- chaterjee-0.5.4.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
5
- chaterjee-0.5.4.dist-info/top_level.txt,sha256=Z1UAYoaNybpDiKjqa1yFpti_q0FNECVItb3-9yAh3gM,10
6
- chaterjee-0.5.4.dist-info/RECORD,,