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插件。

  1. 登录到openfire管理面板并选择plugins选项卡。
  2. 安装Monitoring Service插件。
  3. 选择server选项卡,然后选择archiving子选项卡。
  4. 存档设置下,启用存档组聊天

建筑师

包含一个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因为我允许并鼓励我 发布此软件。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
virtualbox无法从java移动共享文件夹中的文件   java如何连接Android 4.3.5(GA)的apache HttpClient库?   片段中的java Recyclerview未立即显示警报对话框结果   javac(n,r)计算器程序不工作   java使用BooleanQuery还是编写更多索引?   如何在java中设置y/n循环?   java不兼容的通用通配符捕获   java如何在安卓xml中编写数据绑定时的三元操作条件   java如何使用FileDialog?   java如何创建单元测试来检测是否有人使用错误的编码编辑了文件?   java如何从唯一的字符串生成唯一的int?   java gradletomcatplugin:log4j:WARN找不到记录器的附加程序   java我的动态编程解决方案(Kefa和第一步)在codeforces中有什么问题?   java每天更新两个数据库,使它们都包含相同的有效数据集   java如何检查给定的时间是否在时间限制之间   java在单个json POST上保存父级和子级   java如何获取Solr字段类型