Skip to main content

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 data
    Group list:
    
    ID.  | Group ID  | Verify  | Name  
    -----------------------------------
    1    | (groupexample)| False   | Group Example
    -----------------------------------
    
  • Remove group, run command kaztau remove {data_id}. Example
    kaztau 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 folder

    kaztau send_multi_image 1 --path-folder "/Users/Userexam/Pictures/dir_images"
    
  • Move image to another directory after success send_image or send_multi_image.

    You can add argument --move-path {move_path}. Example on send_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


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)

Uploaded Source

Built Distribution

kaztau-0.1.0-py3-none-any.whl (10.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page