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第三方库


热门话题
java log4j找不到log4jtest。房产?   我在java线程“awteventque1”中获得异常。lang.NullPointerException   java为什么在使用完整路径从文件系统读取文件时出错?   java如何迭代所有注册表项?   java中的安卓 Opencv SVM未正确训练   多线程Java ThreadPoolExecutor关闭特定线程?   如何使用Java NIO CreateDirectory方法设置目录所有者组?   java NatTable混合了固定宽度的列和可调整大小的填充剩余空间   java如何删除特定网络,即使该网络是由安卓上的其他设备创建的?   java Guava toJavaUtil()不存在   java对许多常量使用枚举是有效的memorywise?   java是否可以使用坐标定位JButton?   从WSDL生成java代码导致异常   java如何在安卓中导出javadoc   爬行JAX中的java NoClassDefFoundError错误   java为片段中的文本视图设置区域设置   发送最后一条消息后发生Java RMI RemoteException