2024-06-16 10:18:51 +00:00
|
|
|
edit:add-var send-sms~ {|@argv|
|
2021-08-24 18:45:25 +00:00
|
|
|
use str
|
|
|
|
|
2021-08-27 19:45:39 +00:00
|
|
|
var api = https://smsapi.free-mobile.fr/sendmsg
|
|
|
|
var param = (cat $E:HOME/.config/elvish/private/freesms.json | from-json)
|
|
|
|
var msg = (str:join '%20' $argv)
|
2021-08-24 18:45:25 +00:00
|
|
|
|
2021-12-27 17:54:26 +00:00
|
|
|
var url = (printf '%s?user=%s&pass=%s&msg=%s' $api $param[user] $param[password] $msg)
|
2021-08-24 18:45:25 +00:00
|
|
|
#put $url
|
2021-12-27 17:54:26 +00:00
|
|
|
e:curl $url
|
2021-08-24 18:45:25 +00:00
|
|
|
}
|