halib 0.1.30__py3-none-any.whl → 0.1.31__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.
halib/tele_noti.py CHANGED
@@ -116,14 +116,20 @@ async def send_to_telegram(cfg_dict, interval_in_sec):
116
116
  out_img_scale,
117
117
  output_img_dir,
118
118
  )
119
+ time_now = next_time = pd.Timestamp.now().strftime("%Y-%m-%d %H:%M:%S")
120
+ sep_line = "-" * 50
121
+ context_msg = f"{sep_line}\n>> Time: {time_now}\n{context_msg}"
119
122
  # calculate the next time to send message
120
123
  next_time = pd.Timestamp.now() + pd.Timedelta(seconds=interval_in_sec)
124
+ next_time = next_time.strftime("%Y-%m-%d %H:%M:%S")
125
+ next_time_info = f"Next msg: {next_time}"
121
126
  tele_console.rule()
122
127
  tele_console.print("[green] Send message to telegram [/green]")
123
128
  tele_console.print(f"[red] Next message will be sent at <{next_time}> [/red]")
124
129
  await bot.send_message(text=context_msg, chat_id=chat_id)
125
130
  if img_path:
126
131
  await bot.send_photo(chat_id=chat_id, photo=open(img_path, "rb"))
132
+ await bot.send_message(text=next_time_info, chat_id=chat_id)
127
133
  except Exception as e:
128
134
  pprint(f'Error: {e}')
129
135
  pprint('Message not sent to telegram')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: halib
3
- Version: 0.1.30
3
+ Version: 0.1.31
4
4
  Summary: Small library for common tasks
5
5
  Author: Hoang Van Ha
6
6
  Author-email: hoangvanhauit@gmail.com
@@ -9,7 +9,7 @@ halib/jsonfile.py,sha256=9XfdFS1wcTdBRmpAGzVu2dVCcJp8RCpsSY16f6KUNts,480
9
9
  halib/listop.py,sha256=Vpa8_2fI0wySpB2-8sfTBkyi_A4FhoFVVvFiuvW8N64,339
10
10
  halib/plot.py,sha256=drLaHL_JVnIeFxsgYYXepJHIECzOmRImX40cWPJJshs,475
11
11
  halib/projectmake.py,sha256=8dNTxB2jgQlwvovaOnJcCKgHe5vM0nBwzm46Yc8INEI,4048
12
- halib/tele_noti.py,sha256=0FnqKJ53xtsxnSbvOk-c5Pg10b_7r6RCVeD2jM6PdkE,5532
12
+ halib/tele_noti.py,sha256=56qQMbs40en0tf5mhH9MCO8Iw-V8O56dkax0TmQvR2w,5921
13
13
  halib/textfile.py,sha256=EhVFrit-nRBJx18e6rtIqcE1cSbgsLnMXe_kdhi1EPI,399
14
14
  halib/videofile.py,sha256=NTLTZ-j6YD47duw2LN2p-lDQDglYFP1LpEU_0gzHLdI,4737
15
15
  halib/filetype/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -29,8 +29,8 @@ halib/sys/filesys.py,sha256=ERpnELLDKJoTIIKf-AajgkY62nID4qmqmX5TkE95APU,2931
29
29
  halib/system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
30
  halib/system/cmd.py,sha256=b2x7JPcNnFjLGheIESVYvqAb-w2UwBM1PAwYxMZ5YjA,228
31
31
  halib/system/filesys.py,sha256=ERpnELLDKJoTIIKf-AajgkY62nID4qmqmX5TkE95APU,2931
32
- halib-0.1.30.dist-info/LICENSE.txt,sha256=qZssdna4aETiR8znYsShUjidu-U4jUT9Q-EWNlZ9yBQ,1100
33
- halib-0.1.30.dist-info/METADATA,sha256=6TPseOOA1_9B2fPF9HJlYnKsNXyL8ra3od9xtW5BDkA,2460
34
- halib-0.1.30.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
35
- halib-0.1.30.dist-info/top_level.txt,sha256=7AD6PLaQTreE0Fn44mdZsoHBe_Zdd7GUmjsWPyQ7I-k,6
36
- halib-0.1.30.dist-info/RECORD,,
32
+ halib-0.1.31.dist-info/LICENSE.txt,sha256=qZssdna4aETiR8znYsShUjidu-U4jUT9Q-EWNlZ9yBQ,1100
33
+ halib-0.1.31.dist-info/METADATA,sha256=tbizA4GkP5CI-sa0fyOTjtbO6TFTGlX4KRdo0hK_rMM,2460
34
+ halib-0.1.31.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
35
+ halib-0.1.31.dist-info/top_level.txt,sha256=7AD6PLaQTreE0Fn44mdZsoHBe_Zdd7GUmjsWPyQ7I-k,6
36
+ halib-0.1.31.dist-info/RECORD,,
File without changes