Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

a project aimed at allowing me to search my adium chatlogs outside of adium

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 app
Octocat-spinner-32 core
Octocat-spinner-32 web
Octocat-spinner-32 .htaccess
Octocat-spinner-32 README.textile
Octocat-spinner-32 import.php
README.textile

ElasticAdium

Export your adium logs to something slightly more useful for search

Background

I have around 4 years worth of adium Logs across various accounts. Searching for data is quite annoying, and in fact almost impossible, since Adium stores things as XML and regularly needs to re-index them. Why they didn’t just use an SQL solution, I do not know.

But since we have stuff like MySQL and ElasticSearch, I figured I’d use them. Thanks to Karel Minařík for his post on Searching Your Gmail Messages with ElasticSearch and Ruby, as well as the current ui for ElasticAdium.

Requirements

  • PHP 5.2.6
  • ElasticSearch or some SQL database
  • mod_rewrite or similar for current ui
  • Lots of patience

Installation

[Manual]

  1. Download this: http://github.com/josegonzalez/elastic_adium/zipball/master
  2. Unzip that download.
  3. Copy the resulting folder to your sites directory
  4. Rename the folder you just copied to elastic_adium

[GIT Clone]

In your sites directory type

git clone git://github.com/josegonzalez/elastic_adium.git

Usage

To import, run php import.php in a terminal. Go get dinner, this might take a while.

When it’s done, you can browser to something like http://localhost/elastic_adium/ and view/search your logs.

Errata

You’ll likely need to run the import script. This may take a long time depending upon how many log files need to be parsed, and how many messages are to be inserted. If any of the chatlogs are broken, the import script will skip them, but also output a message detailing the location of the broken chatlog should you like to fix it.

import.php does not overwrite existing messages, so take care when re-importing data. You will end up with duplicate data.

The import script supports PDO as well as ElasticSearch, but the interface only supports ElasticSearch.

The configuration is kept in app/config/bootstrap.php.

If using PDO, you’ll want to setup a proper schema. I have one for mysql available in config/schema.sql. Please note that there are two tables, logs and messages.

Todo

  • Genericize configuration out of web/index.php and import.php
  • Add a list of participants to each log and each message
  • Hash all messages so that imports do not duplicate messages
  • Some spiffy ASCII art
  • Better readme
  • Docblocks and error logging
  • Fix sorting
  • Better search interface
  • Surface result relevancy
  • Add paging and search summary
  • Translating searches from elastic_search to sql conditions
  • Allow automatic recovery of broken log files
  • Unit Tests?

License

Copyright © 2011 Jose Diaz-Gonzalez

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Something went wrong with that request. Please try again.