Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

termux-sms-send has no command-line option to feed a string to send as sms. #14

Closed
ghost opened this issue Apr 10, 2016 · 4 comments
Closed

Comments

@ghost
Copy link

ghost commented Apr 10, 2016

Any possibility of adding a command line argument to take a string an send it to the recipient? Without this, the interface is unusable from any other program.

@ghost
Copy link

ghost commented Apr 19, 2016

Hey @cpb83, what language/program are you using? Most frameworks allow you to specify stdin, one way or another, so although it's a little more awkward than a terminal flag it should still be possible?

For example, in Python you can use subprocess to create a piped-command, then feed stdin through a StringIO, if memory serves. And in Go, you can attach stdin readers to an exec.Cmd and have it read from those (as I've done).

Happy to help if I'm able!

@ghost
Copy link
Author

ghost commented Apr 19, 2016

@cathalgarvey Yeah, I could try python, was using bash where it's not as obvious. Thanks for the ideas!
@fornwall Seems like you totally fixed my issue! Thanks!

@fornwall
Copy link
Member

Yes, it's fixed now in the latest version of the termux-api package. I think it's a good idea generally to allow input both from arguments (for easier calling from other programs) and from stdin (for easier piping of e.g. files).

@fornwall
Copy link
Member

@cpb83 A heads up: In the newly updated termux-api package at version 0.18 the termux-sms-send command has been tweaked slightly:

Usage: termux-sms-send -n number[,number2,number3,...] [text]
Send a SMS message to the specified recipient number(s).
The text to send is either supplied as arguments or read from stdin
if no arguments are given.

  -n number(s)  recipient number(s) - separate multiple numbers by commas

Also, be sure to update to version 0.10 of the Termux:API app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant