LinkPreview: A middleware for EFB
Notice
Middleware ID: catbaron.link_preview
LinkPreview is a middleware for EFB to generqate link preview for the first url contained by the message.
- For url refering to an image, the image should be sent as preview.
- Add
\npat the begining of message to avoid link preview for current message.
You need to use MessageBlocker on top of EFB. Please check the document and install EFB first.
Dependense
- Python >=3.6
- EFB >=2.0.0b15
- beautifulsoup4
Install
- Install
git clone https://github.com/catbaron0/efb-link_preview-middleware
cd efb-link_preview-middleware
sudo python setup.py install
- Register to EFB
Following this document to edit the config file. The config file by default is
~/.ehforwarderbot/profiles/default. It should look like:
master_channel: foo.demo_master
slave_channels:
- foo.demo_slave
- bar.dummy
middlewares:
- foo.other_middlewares
- catbaron.link_preview
You only need to add the last line to your config file.
- Restart EFB.
Release files for efb-link-preview-middleware 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| efb_link_preview_middleware-0.1.0.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| efb_link_preview_middleware-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.6 kB
Release files / efb_link_preview_middleware-0.1.0.tar.gz
| Download URL | efb_link_preview_middleware-0.1.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
025f31228c82b2c3b887dcb6a05f6c035b4d697643e1fe0373cb895df8a32f9d
|
|
BLAKE2b-256 checksum How to use checksums |
8a188abc56f14c6d3ac05c2c071d72174aee0d1be694bf458095846250276287
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.22.0 setuptools/51.1.1 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.6.9
|
Release files / efb_link_preview_middleware-0.1.0-py3-none-any.whl
| Download URL | efb_link_preview_middleware-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
67cf396301b93b3d6ac784063fb251c29efc93a8d09517e8e7d4f9e794926bea
|
|
BLAKE2b-256 checksum How to use checksums |
cb2d36224288bda1345675e15e44f13e125fc72eb804c7eeee5010e5d5faa6d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.22.0 setuptools/51.1.1 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.6.9
|