Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
wechat-tools
Advanced tools
Readme
源码地址 netpi/wechat-tools
推荐微信公众平台的开发者配合使用 node-webot/wechat
1 ,天气预报 (获取中国任意城市 三天内的天气预报)
2 ,历史上的今天 (获取历史上的今天 发生的大事件)
3 ,翻译助手(自动检查语言并且翻译-支持12种语言)
4 ,人脸识别(分析某一张照片上的人脸信息)
npm install wechat-tools --save;
make test ;
此为共享 ak = uD67wmZzhi3RFcmTkGoks2Dr,实际应用时建议去百度开发者自行申请ak
var wt = request('wechat-tools');
var ak = 'uD67wmZzhi3RFcmTkGoks2Dr';//
var city = '北京';
wt.weather(ak,city,function(err , data){
if(err){
throw err;
}else{
console.log(data);
}
});
wt.history(function (err,data) {
if(err){
throw err;
}else{
console.log(data);
}
})
支持语言种类: 中文、英语、日语、韩语、德语、法语、俄语、泰语、意大利语、西班牙语、葡萄牙语、阿拉伯语
翻译服务会自动检测源语言语种,并根据源语言的语种按照规则设置目标语言的语种。当源语言为非中文时,目标语言自动设置为中文。当源语言为中文时,目标语言自动设置为英文。
var wt = request('wechat-tools');
var ak = 'uD67wmZzhi3RFcmTkGoks2Dr';
var word = '周末放假'; // 要翻译的词汇
wt.translate(ak, word, function(err, data) {
if (err) {
throw err;
} else {
console.log(data);// --> The weekend holiday
};
});
var wt = request('wechat-tools');
var ak = 'uD67wmZzhi3RFcmTkGoks2Dr';
var word = 'The weekend holiday'; // 要翻译的单词
wt.translate(ak, word, function(err, data) {
if (err) {
throw err;
} else {
console.log(data);// --> 周末度假
};
});
建议去 face++ 官网申请api_key、api_secret
var wt = request('wechat-tools');
var option = {
api_key : '0ef14fa726ce34d820c5a44e57fef470',
api_secret : '4Y9YXOMSDvqu1Ompn9NSpNwWQFHs1hYD',
imgurl : 'http://cn.faceplusplus.com/static/resources/python_demo/1.jpg'
};
wt.face(option , function (err,data) {
if(err){
// err ...
}else{
var face1 = JSON.parse(data).face[0];
console.log(face1.attribute.age); // => { range: 7, value: 33 } (33岁 偏差 7)
console.log(face1.attribute.gender); // => { confidence: 99.94, value: 'Male' } (女 可信度99.94/%)
console.log(face1.attribute.race); // => { confidence: 99.6939, value: 'White' } (白种人 可信度99.6939%)
}
});
详细结果分析参看 face++ api文档
FAQs
wechat 回复小工具 ,包括天气预报、历史今天、翻译工具、人脸识别 等实用功能
The npm package wechat-tools receives a total of 0 weekly downloads. As such, wechat-tools popularity was classified as not popular.
We found that wechat-tools demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.