Kaztau is a simple cli app to send message whatsapp or telegram. Just call command on shell or execute via cron for create reminder notification.
pip install kaztauexport your telegram credential
export KAZTAU_TELEGRAM_API_ID=112233
export KAZTAU_TELEGRAM_API_HASH='11aaa22bb'
export KAZTAU_TELEGRAM_BOT_TOKEN='22bb33cc'export your whatsapp device_id
export WA_DEVICE_ID="a012asdf09123"on this package author use whatsapp api from whacenter.com
- Send message run command
Example:
kaztau send_wa_message "{identifier}" "{your_message}"
kaztau send_wa_message "628998123123" "Test send message from kaztau"
- Send image run command
Example:
kaztau send_wa_image "{identifier}" "{your_message}" "{image_path}"
kaztau send_wa_image "628998123123" "New Picture" "/Users/Userexam/Pictures/image_report.png"
- Send images run command
Example:
kaztau send_wa_mult_image "{identifier}" "{your_message"} --path-file "{path_file_1}" --path-file "{path_file_2}"
Alternative argument you can usekaztau send_wa_multi_image "628998123123" "Multi Picture" --path-file "/Users/Userexam/Pictures/image_report_1.png" --path-file "/Users/userexam/Pictures/image_report_2.png"
--path-folderto send all image in the folderkaztau send_wa_multi_image "628998123123" "Multi Picture" --path-folder "/Users/Userexam/Pictures/dir_images"
If you want to send message, image or multi image, you just change {identifier} from number to group name and add option --togroup, Example:
kaztau send_wa_message "Dev Python" "Test send message from kaztau" --togroupkaztau send_wa_multi_image "Dev Python" "Multi Picture" --path-folder "/Users/Userexam/Pictures/dir_images" --move-folder "/Users/Userexam/Pictures/success" --togroup- Send message run command
Example:
kaztau send_telegram_message "{identifier}" "{your_message}"
kaztau send_telegram_message "irfanpule" "Test send message from kaztau"
- Send image run command
Example:
kaztau send_telegram_image "{identifier}" "{your_message}" "{image_path}"
kaztau send_telegram_image "irfanpule" "New Picture" "/Users/Userexam/Pictures/image_report.png"
- Send images run command
Example:
kaztau send_telegram_multi_image "{identifier}" --path-file "{path_file_1}" --path-file "{path_file_2}"
Alternative argument you can usekaztau send_wtelegrammultii_image "628998123123" --path-file "/Users/Userexam/Pictures/image_report_1.png" --path-file "/Users/userexam/Pictures/image_report_2.png"
--path-folderto send all image in the folderkaztau send_wa_multi_image "628998123123" "Multi Picture" --path-folder "/Users/Userexam/Pictures/dir_images"
If you want to send message, image or multi image, you just change {identifier} from number to group name and add option --togroup, Example:
kaztau send_wa_message "Dev Python" "Test send message from kaztau" --togroupkaztau send_wa_multi_image "Dev Python" "Multi Picture" --path-folder "/Users/Userexam/Pictures/dir_images" --move-folder "/Users/Userexam/Pictures/success" --togroupon telegram {identifier} auto detect number, username, ID as a personal, group or channel. So you just type the telegram ID / identifier
If you want to send image and move image to another folder after success, you can use this option
-
Move image to another directory after success
send_wa_imageorsend_wa_multi_imageorsend_telegram_imageorsend_telegram_multi_image.You can add argument
--move-path {move_path}. Example onsend_imagekaztau send_wa_image "628998123123" "New Pictures" --path-file "/Users/Userexam/Pictures/image_report.png" --move-folder "/Users/Userexam/Pictures/success"
kaztau send_telegram_image "628998123123" --path-file "/Users/Userexam/Pictures/image_report.png" --move-folder "/Users/Userexam/Pictures/success"
Example on
send_wa_multi_imagekaztau send_wa_multi_image "628998123123" "Multi Picture" --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_telegram_multi_image "628998123123" --path-folder "/Users/Userexam/Pictures/dir_images" --move-folder "/Users/Userexam/Pictures/success"