| Archiver |
Overview
The personal archiver has two components, a client and web interface.
The archiver client logs into a Jabber server, connects to
chat rooms, and logs the conversations.
The web interface provides a web page for browsing these logs,
with a search interface by date and people in the room.
You can download the archiver
software here.
Instructions below tell how to install and run the client
and install and run the web interface.
Requirements
- You must have Python version 2.3 or higher installed to use the
archiver.
- The client uses the jabber.py
library
- The web interface uses the elementtree
software to parse the logs. You should download and install this
somewhere in your personal or host-wide Python library.
Running the client (archbot.py)
In order to create your own archiver, follow these steps:
- Unpack the distribution wherever you want to run from,
and go into the directory (folder) named "archiver", then
the directory "bot". You should find there the file "archbot.py".
- Choose a username and password for your archive bot.
for example: "debs_bot", "pcce". Please choose your own values!
- Start with the sample configuration file under samples/sample-config.xml
and copy this to a file named
{username}-config.xml ;
from this point on, we will call this "the config file".
-
Edit the config file.
- Change the name of the server, although this can
be any value
- Set the <host> and <port> of the server to your jabber server.
- Leave or comment out the <ssl/> option, depending on whether
your server supports ssl
- change the username and password as desired
- In the <archives> section, set the <location> to a
directory where the recorded chats should be stored. If you are
going to browse these through a web server, this should be
a directory that the web server has read-access to. Also choose
a directory for <rejoin> and <status> information to be stored.
-
If you want logs to go somewhere besides the
file in logs/archiver.log, edit the value of
'logging-config-file' and also create this file
(you can use etc/logging.cfg as a model)
-
Start the archiver with the config file as the only
command-line argument.
./archbot.py {the config file} &
This will create two files:
- A PID file in the <status> directory you
chose above with a name of {username}@{server}#archiver.pid ,
containing the process-id of the running archiver client.
- A list of which rooms it has joined
(and will rejoin when restarted) in a file in the <rejoin>
directory called {username}@{server}#persistent_rooms.txt.
Between runs of the archiver client, you can edit, move or delete this
file to control automatic rejoining of rooms
-
Start your Jabber client, and add the archiver client
to your buddy list like you would any other person.
Then join a chat room and invite it in. You can type
"arch help" in the chat room to see available commands.
-
To restart the archiver, making it re-read
its config files, use:
kill -HUP `cat var/{JID}#archiver.pid`
-
To stop the archiver, use:
kill `cat var/{JID}#archiver.pid`
Installing and running the web interface
The web interface is a CGI script that parses the log files
and returns an HTML page.
- Unpack the distribution, if you have not already done so.
- Copy the entire "display" sub-directory (folder) of the "archiver"
directory into a CGI-accessible place.
- Edit the file "filterchat.cfg" in this directory
- Change the WEB_HOST to the hostname of your web server
- Change URL_BASE to the URL that users would type into the
location bar of their browser (after the host name) to
navigate to this directory
- Change HTML_ROOT to be the actual directory (i.e. the
current directory). The relationship between this and URL_BASE
depends on your web server configuration.
- If you want to send logs remotely, set REQLOG_URL to a NetLogger
URL. You will need to install NetLogger if this feature is used.
Most users will just comment out this line.
- Set LOG_FILE to a local log file name
- Set XML_ROOT to the same directory you chose for
<location> in your archive client configuration
- Edit the file "filterchat.cgi" to run "filterchat.py" with the
appropriate PYTHONPATH and version of the Python interpreter.
- That's it! If you got all the paths right, when you invite your archiver
client into a chat room, and say "arch url", the resulting link should
display in your browser with the web client interface.
|
|