Python app cli to send message
Project description
Kaztau
Kaztau is a simple cli app to send message telegram. Just call command on shell or execute via cron for create reminder notification.
Installation
pip install kaztau
export your telegram credential
export KAZTAU_TELEGRAM_API_ID=112233
export KAZTAU_TELEGRAM_API_HASH='11aaa22bb'
export KAZTAU_TELEGRAM_BOT_TOKEN='22bb33cc'
How to use
Management data group chat
- Add data group run command
kaztau add {group_id} --name "{group_name}"
Example:kaztau add groupexample --name "Group Example"
- Show all data group, run command
kaztau list
You can see all dataGroup list: ID. | Group ID | Verify | Name ----------------------------------- 1 | (groupexample)| False | Group Example -----------------------------------
- Remove group, run command
kaztau remove {data_id}
. Examplekaztau remove 1
Send Message
-
Send message to group run command
kaztau send_message {data_id} --message "{your_message}"
Example:
kaztau send_message 1 --message "Test send message from kaztau"
-
Send image to group run command
kaztau send_image {data_id} --path-file "{path_file}"
Example:
kaztau send_image 1 --path-file "/Users/Userexam/Pictures/image_report.png"
-
Send multi image to group run command
kaztau send_image {data_id} --path-file "{path_file_1}" --path-file "{path_file_2}"
Example:
kaztau send_multi_image 1 --path-file "/Users/Userexam/Pictures/image_report_1.png" --path-file "/Users/userexam/Pictures/image_report_2.png"
Alternative argument you can use
--path-folder
to send all image in the folderkaztau send_multi_image 1 --path-folder "/Users/Userexam/Pictures/dir_images"
-
Move image to another directory after success
send_image
orsend_multi_image
.You can add argument
--move-path {move_path}
. Example onsend_image
kaztau send_image 1 --path-file "/Users/Userexam/Pictures/image_report.png" --move-folder "/Users/Userexam/Pictures/success"
Example on
send_multi_image
kaztau send_multi_image 1 --path-file "/Users/Userexam/Pictures/image_report_1.png" --path-file "/Users/userexam/Pictures/image_report_2.png" --move-folder "/Users/Userexam/Pictures/success"
or
kaztau send_multi_image 1 --path-folder "/Users/Userexam/Pictures/dir_images" --move-folder "/Users/Userexam/Pictures/success"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kaztau-0.1.0.tar.gz
(9.0 kB
view hashes)
Built Distribution
kaztau-0.1.0-py3-none-any.whl
(10.5 kB
view hashes)