Skip to content

Commit 91c3955

Browse files
committed
Readme Update
1 parent d724263 commit 91c3955

15 files changed

+60
-76
lines changed

README.md

+44-69
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,55 @@
11
# EH Forwarder Bot
2-
A (extensible) tunnel bot between chat platforms
3-
![Python 3.x](https://img.shields.io/badge/Python-3.x-blue.svg)
4-
5-
![EFB](https://images.1a23.com/upload/images/SPET.png)
6-
7-
## Progress
8-
- [ ] Structural stuff
9-
- [x] Inter-channel communication
10-
- [x] Queue processing
11-
- [x] Multimedia
12-
- [x] Inter-channel commands
13-
- [ ] Extra functions from slave channels
14-
- [ ] Framework features
15-
- [ ] Daemon support
16-
- [ ] Telegram Master Channel
17-
- [x] Basic Text processing
18-
- [ ] Controlling slaves by command
19-
- [x] Chat association
20-
- [x] Multimedia
21-
- [x] Generate chat head
22-
- [ ] WeChat Slave Channel
23-
- [x] Basic Text/Link processing
24-
- [x] Multimedia
25-
- [x] Add friends (Cards & Requests)
26-
- [ ] Other actions
27-
- [ ] Messenger Slave Channel
28-
- [ ] WhatsApp Slave Channel
29-
- [ ] Documentations
30-
- [x] Walk-through
31-
- [x] Slave channel
32-
- [ ] Master channel
33-
- [x] EFBMsg specification
34-
- [ ] Tutorial/Commented example
35-
- [ ] and more...
36-
37-
## Documentations
38-
39-
To read an (incomplete) documentation of this project, please visit [here](https://github.com/blueset/ehForwarderBot/blob/master/docs/home.md).
402

41-
## Dependencies
42-
43-
### Non-Python dependencies
44-
* __gcc__ (for building `pillow`)
45-
* __libmagic__ (for mime type detection)
46-
* __libopus__ (Required by `eh_telegram_master` for voice encoding)
47-
* __ffmpeg__ with libopus support (Required by `eh_telegram_master` for voice encoding)
48-
* Everything required by `pillow`, including:
49-
* `libjpeg, zlib, libwebp, (libtiff, libfreetype, openjpeg, tk, littlecms)`
50-
51-
#### Install non-Python dependencies
3+
![Python 3.x](https://img.shields.io/badge/Python-3.x-blue.svg)
4+
[![Gitter](https://img.shields.io/gitter/room/blueset/ehForwarderBot.svg)](https://gitter.im/blueset/ehForwarderBot)
5+
[![Telegram support group](https://img.shields.io/badge/Chat-on%20Telegram-blue.svg)](https://telegram.me/efbsupport)
6+
[![license](https://img.shields.io/github/license/blueset/ehforwarderbot.svg)](LICENSE)
527

53-
For more information regarding installation of Pillow, plaese visit [Pillow documentation](https://pillow.readthedocs.io/en/3.0.x/installation.html)
548

55-
##### OS X / macOS
9+
![EFB](https://images.1a23.com/upload/images/SPET.png)
5610

57-
Install [Homebrew](https://brew.sh), then:
11+
_Codename_ **EH Forwarder Bot** (EFB) is an extensible chat tunnel framework which allows users to contact people from other chat platforms, and ultimately remotely control their accounts in other platforms.
12+
13+
## Navigation
14+
* [Installation](docs/installation.md)
15+
* [Getting started](docs/getting-started.md)
16+
* [Plugins repository](docs/plugins-repository.md)
17+
* Your first channel
18+
* [EFB workflow](docs/workflow.md)
19+
* [Slave Channel](docs/slave-channel.md)
20+
* [Master Channel](docs/master-channel.md)
21+
* API Documentation
22+
* [`EFBMsg`](docs/message.md)
23+
* [`EFBChannel`](docs/channel.md)
24+
* [Exceptions](docs/exceptions.md)
25+
26+
## Glossary
27+
* **Channel**: A class that communicates with a chat platform, also known as a plugin.
28+
* **EFB**: abbreviation for EH Forwarder Bot, this project.
29+
* **Master channel**: A channel linked to the platform which directly interact with the user.
30+
* **Plugin**: See "channel".
31+
* **Slave channel**: A channel linked to the platform which is controlled by the user through EFB framework.
32+
33+
## Feel like contributing?
34+
Anyone is welcomed to raise an issue or submit a pull request, just remember to read through and understand the [contribution guideline](CONTRIBUTING.md) before you do so.
35+
36+
## License
37+
EFB framework is licensed under [GNU General Public License 3.0](https://www.gnu.org/licenses/gpl-3.0.txt).
5838

59-
```bash
60-
brew install libtiff libjpeg webp little-cms2
61-
brew install libmagic
62-
brew install ffmpeg --with-opus
6339
```
40+
EH Forwarder Bot: An extensible chat tunneling bot framework.
41+
Copyright (C) 2016 Eana Hufwe
42+
All rights reserved.
6443
65-
Alternatively, you can use the corresponding packages from other package managers like MacPort, or any other methods.
66-
##### Debian/Ubuntu/Mint/etc.
67-
68-
```bash
69-
sudo apt-get install python3-dev python3-setuptools
70-
sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev
71-
sudo apt-get install libmagic-dev ffmpeg
72-
```
44+
This program is free software: you can redistribute it and/or modify
45+
it under the terms of the GNU General Public License as published by
46+
the Free Software Foundation, either version 3 of the License, or any later version.
7347
74-
### Python dependencies
75-
Refer to `requirements.txt`.
48+
This program is distributed in the hope that it will be useful,
49+
but WITHOUT ANY WARRANTY; without even the implied warranty of
50+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51+
GNU General Public License for more details.
7652
77-
#### To install
78-
```bash
79-
pip(3) install -r requirements.txt
53+
You should have received a copy of the GNU General Public License
54+
along with this program. If not, see <http://www.gnu.org/licenses/>.
8055
```

config.sample.py

+11
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,14 @@
2828
# `channel_name = {"key1": "value1", "key2": "value2"}`
2929
# Please refer to docs of individual plugin for details
3030
#
31+
32+
eh_telegram_master = {
33+
"token": "12345678:QWFPGJLUYarstdheioZXCVBKM",
34+
"admins": [0],
35+
"bing_speech_api": ["3243f6a8885a308d313198a2e037073", "2b7e151628ae082b7e151628ae08"],
36+
"baidu_speech_api": {
37+
"app_id": 0,
38+
"api_key": "3243f6a8885a308d313198a2e037073",
39+
"secret_key": "2b7e151628ae082b7e151628ae08"
40+
}
41+
}

docs/getting-started.md

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ The variable `master_channel` is a tuple of 2 strings where first string is its
1919

2020
The variable `slave_channels` is a list of tuples of 2 strings where each of the tuples is formatted in the same way described above.
2121

22+
A sample of config file is available at `config.sample.py`.
23+
2224
> **Example**
2325
>
2426
> When enabling the following channels:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

plugins/eh_telegram_master/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ def _download_file(self, tg_msg, file_id, msg_type):
739739

740740
def _download_gif(self, tg_msg, file_id, msg_type):
741741
fullpath, mime = self._download_file(tg_msg, file_id, msg_type)
742-
clip = VideoFileClip(fullpath).write_gif(fullpath + ".gif")
742+
VideoFileClip(fullpath).write_gif(fullpath + ".gif")
743743
return fullpath + ".gif", "image/gif"
744744

745745
def start(self, bot, update, args=[]):

plugins/eh_telegram_master/db.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,8 @@ def _create():
4040

4141
def _migrate(i):
4242
if i == 0:
43-
"""
44-
Migrate 0: Added Time column in MsgLog table.
45-
2016JUN15
46-
"""
43+
# Migrate 0: Added Time column in MsgLog table.
44+
# 2016JUN15
4745
migrator = SqliteMigrator(db)
4846
migrate(migrator.add_column("msglog", "time", DateTimeField(default=datetime.datetime.now, null=True)))
4947
else:
@@ -88,7 +86,6 @@ def get_last_msg_from_chat(chat_id):
8886
"""
8987
try:
9088
return MsgLog.select().where(MsgLog.master_msg_id.startswith("%s." % chat_id)).order_by(MsgLog.time.desc()).first()
91-
return MsgLog.select().where(MsgLog.master_msg_id.startswith("%s." % chat_id)).first()
9289
except DoesNotExist:
9390
return None
9491

@@ -139,7 +136,6 @@ def get_msg_log(master_msg_id):
139136
logger.info("get_msg_log %s" % master_msg_id)
140137
try:
141138
return MsgLog.select().where(MsgLog.master_msg_id == master_msg_id).order_by(MsgLog.time.desc()).first()
142-
return MsgLog.select().where(MsgLog.master_msg_id == master_msg_id).first()
143139
except DoesNotExist:
144140
return None
145141

0 commit comments

Comments
 (0)