OpenFire即时消息服务器上聊天室的HTML存档生成器。
ofarchiver的Python项目详细描述
简介
ofarchiver在 Openfire 即时消息服务器。
示例用法如下:
from ofarchiver import OfArchiver ofa = OfArchiver() for room in ofa.get_rooms(): ofa.gen_archive(room)
还安装了名为ofarchiver的脚本,它利用了 multiprocessing python模块,用于在安装了多个 聊天室。它可以作为cron作业在给定的 间隔。
要求
- 一个带聊天室的openfire服务器(用3.7.0测试)。
- mysql作为openfire数据库(用5.0测试)。
- 一个web服务器(使用apache 2.2及其 mod_autoindex 模块)。
- Python2.6或更高版本(适用于RHEL/CentOS 5 in EPEL作为 python26)。
安装
使用pip:
sudo pip install OfArchiver
使用easy_install:
sudo easy_install OfArchiver
来源:
git clone http://github.com/egnyte/ofarchiver cd ofarchiver python setup.py build sudo python setup.py install
配置
明火
那Monitoring Service 必须安装并配置OpenFire插件。
- 登录到openfire管理面板并选择plugins选项卡。
- 安装Monitoring Service插件。
- 选择server选项卡,然后选择archiving子选项卡。
- 在存档设置下,启用存档组聊天。
建筑师
包含一个ofarchiver.ini配置文件,该文件必须复制到 下列位置之一(按检查顺序列出):
- /usr/local/etc
- /etc
- 用户的主目录($home)
它由以下部分组成(强制选项有一个**):
main
- basedir **
- The base directory in which to generate the HTML archive.
- confserver **
- The name of the Openfire conference server.
- db **
- The type of database used by Openfire (only ^{tt4}$ is currently supported).
- debug
- Whether to enable debugging statements.
- logfile
- A file in which to log informational and/or debugging messages.
- org
- The name of the organization running Openfire.
- rooms
- A list of rooms for which to generate archives.
分贝
- hostname **
- The hostname of the MySQL server.
- username **
- A MySQL user, either Openfire’s or one created just for OfArchiver (only ^{tt5}$ privileges on the ofMessageArchive table is needed).
- password **
- The password for the MySQL user above.
- database **
- The MySQL database used by Openfire.
颜色
- enabled
- Whether to enable colors to more easily differentiate chat room members.
- names
- A list of colors to choose from.
网络服务器
需要具有自动目录索引生成功能的Web服务器来查看 HTML存档。下面是apache的配置示例 /var/www/html/ofarchive作为存档基目录:
<Directory /var/www/html/ofarchive> Options +Indexes IndexOptions FancyIndexing IndexOrderDefault Descending Date </Directory>
强烈建议添加身份验证和加密。
谢谢
- Egnyte因为我允许并鼓励我 发布此软件。