From ff196d8d928b875df1175ef09ee721a41fc7c3c7 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Tue, 28 Jun 2016 21:47:49 +0300 Subject: [PATCH] docs update --- README.md | 13 ++++++++----- docs/compile.md | 2 +- docs/contributing.md | 6 ++---- docs/install.md | 2 +- docs/plugin_api.md | 6 +++--- docs/plugins.md | 4 +++- docs/smileys_and_stickers.md | 2 +- src/smileys.py | 2 +- 8 files changed, 20 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 4401476..dd86dc7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Toxygen -Toxygen is cross-platform [Tox](https://tox.chat/) client written on Python +Toxygen is cross-platform [Tox](https://tox.chat/) client written in Python3 [![Release](https://img.shields.io/github/release/xveduk/toxygen.svg?style=flat)](https://github.com/xveduk/toxygen/releases/latest) [![Open issues](https://img.shields.io/github/issues/xveduk/toxygen.svg?style=flat)](https://github.com/xveduk/toxygen/issues) @@ -15,10 +15,16 @@ Toxygen is cross-platform [Tox](https://tox.chat/) client written on Python - [x] 1v1 messages - [x] File transfers - [x] Audio +- [x] Plugins support - [x] Chat history +- [x] Emoticons +- [x] Stickers - [x] Screenshots - [x] Name lookups (toxme.io support) +- [x] Save file encryption - [x] Profile import and export +- [x] Faux offline messaging +- [x] Faux offline file transfers - [x] Inline images - [x] Message splitting - [x] Proxy support @@ -31,13 +37,10 @@ Toxygen is cross-platform [Tox](https://tox.chat/) client written on Python - [x] Typing notifications - [x] Changing nospam - [x] File resuming -- [x] Save file encryption -- [x] Plugins support - [x] Read receipts -- [x] Faux offline messaging - [ ] Video -- [ ] Group chats - [ ] Desktop sharing +- [ ] Group chats ###Downloads [Releases](https://github.com/xveduk/toxygen/releases) diff --git a/docs/compile.md b/docs/compile.md index e64488a..6b6ab73 100644 --- a/docs/compile.md +++ b/docs/compile.md @@ -7,4 +7,4 @@ Install PyInstaller: ``pyinstaller --windowed --icon images/icon.ico main.py`` -Don't forget to copy /images/, /sounds/, /translations/, /styles/, /smileys/, /stickers/ to /dist/main/ +Don't forget to copy /images/, /sounds/, /translations/, /styles/, /smileys/, /stickers/ (and /libs/libtox.dll on Windows) to /dist/main/ diff --git a/docs/contributing.md b/docs/contributing.md index 2eeb453..8b1e7fa 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -1,5 +1,3 @@ - - #Issues Help us find all bugs in Toxygen! Please provide following info: @@ -15,8 +13,8 @@ Want to see new feature in Toxygen? [Ask for it!](https://github.com/xveduk/toxy Developer? Feel free to open pull request. Our dev team is small so we glad to get help. Don't know what to do? Improve UI, fix [issues](https://github.com/xveduk/toxygen/issues) or implement features from our TODO list. -You can find our TODO's in code and [here](/README.md). Also you can implement plugins for Toxygen. +You can find our TODO's in code, issues list and [here](/README.md). Also you can implement [plugins](/docs/plugins.md) for Toxygen. #Translations -Help us translate Toxygen! Translate can be created using pyside-lupdate and QT Linguist. \ No newline at end of file +Help us translate Toxygen! Translation can be created using pyside-lupdate (``pyside-lupdate toxygen.pro``) and QT Linguist. \ No newline at end of file diff --git a/docs/install.md b/docs/install.md index 785ff59..05db352 100644 --- a/docs/install.md +++ b/docs/install.md @@ -28,7 +28,7 @@ Dependencies: -1. Install Python3.4: +1. Install latest Python3.4: ``sudo apt-get install python3`` 2. [Install PySide](https://wiki.qt.io/PySide_Binaries_Linux) (recommended) or [PyQt4](https://riverbankcomputing.com/software/pyqt/download) 3. Install [toxcore](https://github.com/irungentoo/toxcore/blob/master/INSTALL.md) with toxav support in your system (install in /usr/lib/) diff --git a/docs/plugin_api.md b/docs/plugin_api.md index d302393..185d98c 100644 --- a/docs/plugin_api.md +++ b/docs/plugin_api.md @@ -1,6 +1,6 @@ #Plugins API -In Toxygen plugin is single python module (.py file) and directory with data associated with it. +In Toxygen plugin is single python (supported Python 3.0 - 3.4) module (.py file) and directory with data associated with it. Every module must contain one class derived from PluginSuperClass defined in [plugin_super_class.py](/src/plugins/plugin_super_class.py). Instance of this class will be created by PluginLoader class (defined in [plugin_support.py](/src/plugin_support.py) ). This class can enable/disable plugins and send data to it. Every plugin has it's own full name and unique short name (1-5 symbols). Main app can get it using special methods. @@ -37,11 +37,11 @@ Other methods: About import: -import statement will not work in case you import module that wasn't previously imported by main program and user use precompiled binary. It's recommended to use imp module and dynamic import instead. +import statement will not work in case you import module that wasn't previously imported by main program and user use precompiled binary. It's recommended to use dynamic import instead. About GUI: -It's strictly recommended to support both PySide and PyQt4 in GUI. +It's strictly recommended to support both PySide and PyQt4 in GUI. Plugin can not have GUI at all. Exceptions: diff --git a/docs/plugins.md b/docs/plugins.md index 5010d22..bb5f099 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -10,9 +10,11 @@ Check [Plugin API](/docs/plugin_api.md) for more info Toxygen comes without preinstalled plugins. -1. Put plugin and directory with it's data into /src/plugins/ +1. Put plugin and directory with its data into /src/plugins/ 2. Restart Toxygen +##Note: /src/plugins/ should contain plugin_super_class.py and __init__.py + #Plugins list WARNING: It is unsecure to install plugin not from this list! diff --git a/docs/smileys_and_stickers.md b/docs/smileys_and_stickers.md index 364e2c2..1fd8a03 100644 --- a/docs/smileys_and_stickers.md +++ b/docs/smileys_and_stickers.md @@ -1,6 +1,6 @@ #Smileys -Toxygen support smileys. Smiley is small picture which replaces some combination of symbols. If you want to create your own smiley pack, create directory in src/smileys/. This directory must contain images with smileys and config.json. Example of config.json: +Toxygen support smileys. Smiley is small picture which replaces some symbol or combination of symbols. If you want to create your own smiley pack, create directory in src/smileys/. This directory must contain images with smileys and config.json. Example of config.json: {":)": "one.png", ":(": "two.png"} diff --git a/src/smileys.py b/src/smileys.py index 6ce0dd5..9143a0b 100644 --- a/src/smileys.py +++ b/src/smileys.py @@ -30,7 +30,7 @@ class SmileyLoader(util.Singleton): self._curr_pack = pack_name path = self.get_smileys_path() + 'config.json' try: - with open(path) as fl: + with open(path, encoding='utf8') as fl: self._smileys = json.loads(fl.read()) fl.seek(0) tmp = json.loads(fl.read(), object_pairs_hook=OrderedDict)