All Projects → buddys → Qq Wechat Emotion Parser

buddys / Qq Wechat Emotion Parser

Licence: gpl-3.0
QQ、微信表情符号解析:字符串到图片URL

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Qq Wechat Emotion Parser

Socialsdklibrary
提供微博、微信、QQ、Tim、QQ 轻聊版、钉钉的登陆分享功能支持;
Stars: ✭ 399 (+386.59%)
Mutual labels:  qq, wechat
Diplomat
整合第三方 SDK 微信、微博、 QQ 等为统一的 Diplomat 接口。
Stars: ✭ 672 (+719.51%)
Mutual labels:  qq, wechat
Sns auth
通用第三方登录SDK,支持微信,微信扫码,QQ,微博登录,支付宝登录,Facebook,Line,Twitter,Google
Stars: ✭ 520 (+534.15%)
Mutual labels:  qq, wechat
uni-chat
uni-app + vue3.0 + typescript + vue-cli 仿手机QQ聊天 qq表情包
Stars: ✭ 55 (-32.93%)
Mutual labels:  emoji, qq
Gopay
QQ、微信(WeChat)、支付宝(AliPay)的Go版本SDK。【微信支付V3已支持,推荐使用微信V3接口】
Stars: ✭ 1,034 (+1160.98%)
Mutual labels:  qq, wechat
Stepchanger
步数修改器
Stars: ✭ 275 (+235.37%)
Mutual labels:  qq, wechat
Ocbarrage
iOS 弹幕库 OCBarrage, 同时渲染5000条弹幕也不卡, 轻量, 可拓展, 高度自定义动画, 超高性能, 简单易上手; A barrage render-engine with high performance for iOS. At the same time, rendering 5000 barrages is also very smooth, lightweight, scalable, highly custom animation, ultra high performance, simple and easy to use!
Stars: ✭ 589 (+618.29%)
Mutual labels:  qq, wechat
Transferee
一个帮助您完成从缩略视图到原视图无缝过渡转变的神奇框架
Stars: ✭ 2,697 (+3189.02%)
Mutual labels:  qq, wechat
Socialite
Socialite is an OAuth2 Authentication tool. It is inspired by laravel/socialite, you can easily use it without Laravel.
Stars: ✭ 1,026 (+1151.22%)
Mutual labels:  qq, wechat
Tbactionsheet
A Custom&Powerful Action Sheet For iOS. 一个 ActionSheet 满足所有样式!超高自由度的可定制!
Stars: ✭ 942 (+1048.78%)
Mutual labels:  qq, wechat
EmoticonsBoard
Function keyboard and emotions. Android表情键盘,可动态更新表情。
Stars: ✭ 31 (-62.2%)
Mutual labels:  emoji, qq
Easychatandroidclient
EasyChat是一个开源的社交类的App。主要包含消息、好友、群组等相关的IM核心功能。部分界面参照了QQ、微信等相关社交APP。EasyChat APP整体采用MVVM模式,基于JetPack(Lifecycle,LiveData,ViewModel,Room)构建
Stars: ✭ 64 (-21.95%)
Mutual labels:  qq, wechat
Sdk3rd
第三方SDK集成库,授权/分享/支付
Stars: ✭ 249 (+203.66%)
Mutual labels:  qq, wechat
Ocbarrage
iOS 弹幕库 OCBarrage, 同时渲染5000条弹幕也不卡, 轻量, 可拓展, 高度自定义动画, 超高性能, 简单易上手; A barrage render-engine with high performance for iOS. At the same time, rendering 5000 barrages is also very smooth, lightweight, scalable, highly custom animation, ultra high performance, simple and easy to use!
Stars: ✭ 294 (+258.54%)
Mutual labels:  qq, wechat
Monkeyking
MonkeyKing helps you to post messages to Chinese Social Networks.
Stars: ✭ 2,699 (+3191.46%)
Mutual labels:  qq, wechat
Deepin Apps Installation
本仓库介绍如何在基于Ubuntu的系统上安装Deepin移植的软件。This repo shows how to install apps packaged by Deepin.
Stars: ✭ 565 (+589.02%)
Mutual labels:  qq, wechat
Deepin Wine
【deepin源移植】Debian/Ubuntu上最快的QQ/微信安装方式
Stars: ✭ 2,844 (+3368.29%)
Mutual labels:  qq, wechat
Electronic Qq
[FREEZED]the electionic-QQ based on smart-qq & electronic-wechat written in Nodejs
Stars: ✭ 144 (+75.61%)
Mutual labels:  qq, wechat
Lcactionsheet
一款简约而不失强大的 ActionSheet,微博、微信和 QQ 都采用了极其类似的样式,完全支持 Swift。
Stars: ✭ 809 (+886.59%)
Mutual labels:  qq, wechat
L Passport
Koa middleware and api sdk for wechat oauth, qq oauth, baidu oauth and weibo oauth
Stars: ✭ 52 (-36.59%)
Mutual labels:  qq, wechat

QQ WechaT EmotioN ParseR

NPM version Build Status Coverage Status Dependency manager

嗯,这是一个很简单的小工具,作用是将网页中添加的QQ表情和或者微信表情字符串转化为表情图片。

  • 快速!这是目前最快速的表情字符串转换JS库,使用前缀树(Trie)实现,对于限长的表情库,算法复杂度达到O(n)。
  • 方便!无任何依赖,只需引入min.js即可使用。同时支持Node.js环境。

Demo

example 1

输入:

/::)

输出:

<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/0.gif" alt="/::)">

效果:

example 2

输入:

I xx Gunzi, /::), No no no, I just xx xx/::B.

输出:

I xx Gunzi, <img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/0.gif" alt="/::)">, No no no, I just xx xx<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/2.gif" alt="/::B">.

效果:

I xx Gunzi, , No no no, I just xx xx.

Usage

本工具对外暴露一个qqWechatEmotionParser()方法,此方法的输入是需要处理的字符串,输出是将字符表情转化为img标签的字符串。

浏览器环境

  1. 下载并引入https://github.com/buddys/qq-wechat-emotion-parser/blob/master/dist/qq-wechat-emotion-parser.min.js

    <script src="/path/to/qq-wechat-emotion-parser.min.js"></script>
    
  2. 调用window.qqWechatEmotionParser

    var text = 'I xx Gunzi /::), No no no, I just xx xx/:<L>.';
    var html = qqWechatEmotionParser(text);
    
    document.write(text);
    document.write('<br/>')
    document.write(html);
    

Node环境

  1. 安装:

    npm install qq-wechat-emotion-parser
    
  2. 使用:

    var qqWechatEmotionParser = require('qq-wechat-emotion-parser');
    
    var text = 'I xx Gunzi /::), No no no, I just xx xx/:<L>.';
    var html = qqWechatEmotionParser(text);
    
    console.log(html);
    

Contribution

贡献代码

欢迎通过Github提交issue或者贡献代码, 贡献代码前需要仔细阅读原代码尽量保持代码风格一致。

新增标签

表情在src/emotion.json文件下保存,通过编辑该json文件定义表情的字符表示以及图片源。需要注意以下两点:

  • 表情的字符表示应该尽量避免产生歧义
  • 图片托管应使用稳定,国内访问速度快的服务器

License

GPL V3.0

harttle, meriky @ Buddys Copyright (c) 2016

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].