Skip to content

Simple Python Wrapper for the Termux `termux-sms-send` Command

Notifications You must be signed in to change notification settings

roman91DE/autoSMS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Contacts Message Sender

This Python script enables you to send messages to multiple contacts using the Termux termux-sms-send command. It is specifically designed for use on Android devices where Termux is installed. This tool allows for efficient message distribution to a list of contacts provided in a JSON file.

Prerequisites

  • Termux app installed on your Android device.
  • Python 3 installed within Termux.
  • SMS permissions granted to Termux.

Installation

  1. Clone or download this script to your device.
  2. Make the script executable by running:
    chmod +x path_to_script.py

Usage

The script requires two files:

  • A JSON file containing the contacts, with each contact having a number key.
  • A text file containing the message you wish to send.

Additionally, you can specify the SIM card slot to use if your device supports dual SIMs.

JSON Format

Your contacts file should look like this:

[
  {
    "name": "John Doe",
    "number": "+491234567890"
  },
  {
    "name": "Jane Doe",
    "number": "+491234567891"
  }
]

Command Syntax

Execute the script with the following command:

./path_to_script.py path_to_contacts.json path_to_message.txt --sim <SIM_SLOT>

Replace path_to_script.py with the actual path to the script, path_to_contacts.json with your contacts file path, path_to_message.txt with your message file path, and <SIM_SLOT> with the SIM card slot number (default is 1).

Troubleshooting

Ensure that Termux has the necessary permissions for file access and SMS sending. Verify that the JSON and text files are correctly formatted and accessible.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request with your changes.

License

This project is licensed under the GNU General Public License v3.0, the same license used by Linux. This ensures that the software remains free and open source, and it guarantees users the freedoms to run, study, share, and modify the software.

For more details, see GPLv3.

Contact

If you have any questions or would like to contribute to the project, please contact me via github.com

About

Simple Python Wrapper for the Termux `termux-sms-send` Command

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages