Skip to content
Convert stickers to image
Python
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
efb_sticker2img_middleware Merge branch 'master' of github.com:catbaron0/efb-sticker2img-middleware Jan 2, 2020
README.md Update README.md Nov 13, 2019
README.rst add README.rst May 17, 2019
setup.py fix README.md and remove needless packages May 17, 2019

README.md

Sticker2Img: A middleware for EFB

Since the function of this middleware has been achieved by EWS, this middleware is unnecessary any more. And it has been a long time after the last update on this middleware. It is recommanded to update EFB/ETM/EWS to the latest version.

Notice

Middleware ID: catbaron.sticker2img

Sticker2Img is a middleware for EFB, to convert stickers and gif files to jpeg images, if it is sent from master to slave channel. This middleware should solve this issue.

If a message has a attatched file with a .png or .gif suffix, or if the message type is sticker, the attatched file would be converted to jpeg image. Note that the converted jpeg file may be in low quality.

Also be aware that this is a very early develop version. Please let me know if you meet any trouble.

You need to use Sticker2Img on top of EFB. Please check the document and install EFB first.

Dependense

  • Python >=3.6
  • EFB >=2.0.0b15
  • pillow

Install

  • Install
git clone https://github.com/catbaron0/efb-sticker2img-middleware
cd efb-sticker2img-middleware
python setup.py install
  • Register to EFB

Edit the config file following this document to register this middleware. The config file by default is ~/.ehforwarderbot/profiles/default/config.yaml. It should look like:

master_channel: foo.demo_master
slave_channels:
- foo.demo_slave
- bar.dummy
middlewares:
- foo.other_middlewares
- catbaron.sticker2img

You only need to add the last line to your config file.

  • Restart EFB.
You can’t perform that action at this time.