0
A
回答
0
0
还有一堆库在那里,可以完成大部分的工作,为你的。芭蕾舞女演员是一门非常擅长整合的编程语言。你可以使用它的内置支持twitter来从shell中发布推文。你可以在你的脚本中做这样的事情,
#!/bin/bash
MSG="WSO2 Ballerina goes well with shell.."
ballerina_utility_function()
{
BALLERINA_SCRIPT_LOCATION="$BALLERINA_HOME/samples/twitterConnector/twitterConnector.bal"
bash "$BALLERINA_HOME/bin/ballerina" "run" "main" "$BALLERINA_SCRIPT_LOCATION" "$1" "$2" "$3" "$4" "$MSG"
return
}
RESPONSE="$(ballerina_utility_function $1 $2 $3 $4 $MSG)"
echo "-----> $RESPONSE"
然后使用twitter API密钥和来自shell的令牌执行脚本。在此处查找完整的脚本和说明:http://ballerinagist.blogspot.com/2017/05/use-ballerina-to-extend-your-bash.html请参阅http://ballerinalang.org/了解更多信息。
相关问题
- 1. 通过shell脚本
- 2. 如何通过twitter api发布推文?
- 3. 通过shell发送arp
- 4. Shell脚本通过Oozie
- 5. 通过JavaScript循环Twitter推送
- 6. Twitter连接并通过PHP发送推文?
- 7. 如何通过邮件从shell脚本发送特殊字符?
- 8. 通过发送信号在后台停止shell脚本
- 9. Shell脚本AT命令:无法通过串口发送短信
- 10. 通过从php运行shell脚本发送邮件
- 11. 通过curl发布到twitter
- 12. 发送HTTP请求通过python脚本
- 13. 通过bash脚本发送邮件
- 14. 是否可以通过smtp通过bash脚本发送邮件?
- 15. 通过WiFi推送通知
- 16. 无法通过APNS将MDM推送通知发送到设备。
- 17. 通过os.system推送
- 18. 在通过FCM发送时未收到推送通知,但在IOS上通过APN发送时收到
- 19. 通过页脚推送固定侧栏
- 20. 通过发送请求发送到PHP脚本的XML文档对象
- 21. 如何通过AWS SNS实现Twitter推送通知?
- 22. 通过java运行Shell脚本
- 23. 如何通过运行shell脚本
- 24. 如何通过python执行shell脚本
- 25. 通过java运行shell脚本
- 26. 通过java的Windows shell脚本
- 27. 通过oozie运行shell脚本
- 28. 发送推送通知文本的UITableView
- 29. 通过脚本批量发布到wordpress
- 30. 通过TCP发送文本字符串?
http://unix.stackexchange.com/questions/84540/twitter-status-updates-from-command-line-via-curl – 2014-11-05 21:42:37
或http://search.cpan.org/~getty/Text-Tweet -0.004/lib/Text/Tweet.pm – 2014-11-05 21:44:30
有一个名为“tweepy”和“python-twitter”的免费python库。您可以使用这些来创建脚本,并提供文档。 – 2017-03-23 01:06:33