ChaterJee 0.5.8__py3-none-any.whl → 0.6.0__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
@@ -15,6 +15,7 @@ import threading
15
15
  import subprocess
16
16
  from subprocess import PIPE, Popen
17
17
  from pathlib import Path
18
+ import argparse
18
19
 
19
20
  start_txt = \
20
21
  """
@@ -149,11 +150,12 @@ class ChatLogs:
149
150
  elif logDICT is not None:
150
151
  self.txt = self.txt + '\n\n'
151
152
  for key, value in logDICT.items():
152
- self.txt = self.txt + f"{key}: {value}\n"
153
+ self.txt = self.txt + f"*{key}*: {value}\n"
153
154
 
154
155
  await context.bot.sendChatAction(chat_id=self.CHATID, action="typing")
155
156
  msg = await update.message.reply_text(
156
- self.txt, reply_markup=ReplyKeyboardRemove()
157
+ self.txt, reply_markup=ReplyKeyboardRemove(),
158
+ parse_mode='Markdown'
157
159
  )
158
160
  self.smsID.append(msg.message_id)
159
161
 
@@ -494,3 +496,32 @@ class NoteLogs:
494
496
  json.dump(jobs, ffw, indent=4)
495
497
 
496
498
 
499
+ def register():
500
+ parser = argparse.ArgumentParser(description="I am ChaterJee register, I note your jobs for keeping logs.")
501
+ parser.add_argument("command",type=str,help="command to run in your terminal")
502
+ parser.add_argument("--jobname","-n",type=str,help="name of the job for logging",required=True)
503
+ parser.add_argument("--logdir",default=None,type=str,help="log directory path")
504
+ parser.add_argument("--logfile",default=None,type=str,help="log file path")
505
+ parser.add_argument("--logimage",default=None,type=str,help="log image path")
506
+ args = parser.parse_args()
507
+ logDIR = args.logdir
508
+ if logDIR is None:
509
+ logDIR = Path.cwd() / args.jobname
510
+ else:
511
+ logDIR = Path(logDIR) / args.jobname
512
+
513
+ job = NoteLogs(args.jobname)
514
+ job.save_job_JSON()
515
+ with open(args.logfile, "w") as out, open("error.log", "w") as err:
516
+ [f"{args.command}"],
517
+ stdout=out,
518
+ stderr=err,
519
+ )
520
+
521
+ def updater():
522
+ parser = argparse.ArgumentParser(description="I am ChaterJee updater, I update your registered project logs.")
523
+ parser.add_argument("token",type=str,help="Enter your telegram-bot TOKEN here")
524
+ parser.add_argument("chatid",type=str,help="Enter your telegram-bot CHATID here")
525
+ args = parser.parse_args()
526
+ cbot = ChatLogs(args.token, args.chatid)
527
+ cbot.cmdTRIGGER()
@@ -1,12 +1,19 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: ChaterJee
3
- Version: 0.5.8
3
+ Version: 0.6.0
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
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
10
17
 
11
18
  # ChaterJee
12
19
 
@@ -0,0 +1,7 @@
1
+ ChaterJee/ChaterJee.py,sha256=Y5VLAcNa1bQOuj9k2SIz13yRv1teoZXRuyU3S8F3ANQ,21429
2
+ ChaterJee/__init__.py,sha256=tZmkZY2XbzJ8rHDh8nOmb1W73kPecPv3xcEiCPwkZf4,98
3
+ chaterjee-0.6.0.dist-info/METADATA,sha256=iIe5gbUS2FdJtMlJEvhaGf5z6TgyLKMTwzSQx4eq7Yw,6880
4
+ chaterjee-0.6.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
5
+ chaterjee-0.6.0.dist-info/entry_points.txt,sha256=MCOBbAWR8oBPX7h6flYn8SGUtoXTQR_qO6iLPRv4Zhc,95
6
+ chaterjee-0.6.0.dist-info/top_level.txt,sha256=Z1UAYoaNybpDiKjqa1yFpti_q0FNECVItb3-9yAh3gM,10
7
+ chaterjee-0.6.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.3.2)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ chatjee = ChaterJee.ChaterJee:updater
3
+ notejee = ChaterJee.ChaterJee:register
@@ -1,6 +0,0 @@
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,,