Adium

Opened 7 years ago

Last modified 2 years ago

#7250 new enhancement

Add Quick Look support for Chatlogs

Reported by: moehnetiger Owned by:
Milestone: Good ideas for later Component: Logging
Version: Severity: normal
Keywords: 10.5, Leopard, Quick Look, chatlogs Cc: robotive
Patch Status: Needs Changes by Author

Description

MacOS X 10.5 aka Leopard has a new feature called Quick Look. It allows you to preview files without opening any special application. Since the new xml-chatlogs can't be viewed in a web-browser like the old html-chatlogs, it would be nice if we had a Quick Look plugin for them.

Attachments (9)

AdiumChatQuickLook.tgz (12.7 KB) - added by dharris 6 years ago.
Xcode project to create QuickLook plugin for Adium chat files
AdiumChatQuickLook.zip (8.8 KB) - added by dharris 6 years ago.
Adium QuickLook plugin
AdiumChatQuickLook.qlgenerator.zip (14.2 KB) - added by jhagman 5 years ago.
Working QuickLook plugin.
AdiumChatQuickLook.2.zip (23.6 KB) - added by jhagman 5 years ago.
Project for building the QuickLook plugin
AdiumChatQuickLook.3.zip (23.5 KB) - added by jhagman 5 years ago.
Project file, supports current and previous format.
AdiumChatQuickLook.qlgenerator.2.zip (14.4 KB) - added by jhagman 5 years ago.
QuickLookGenerator, supports current and previous format.
AdiumChatQuickLook.qlgenerator.3.zip (18.0 KB) - added by jhagman 5 years ago.
Latest version of the QL plugin binary
AdiumChatQuickLook.4.zip (25.7 KB) - added by jhagman 5 years ago.
The project archive.
memleaks.diff (1.1 KB) - added by The-Kenny 3 years ago.
Fixes small memory leaks in -formatDate:

Download all attachments as: .zip

Change History (34)

comment:1 Changed 7 years ago by zacw

  • Milestone set to Adium X 1.2

comment:2 Changed 7 years ago by evands

  • Milestone changed from Adium X 1.2 to Good idea for "later"

This can not be done publicly until 10.5 is released.

The transform from #6569 plus a WebView might be a good way for someone interested in adding support to write a Quick Look plugin.

Changed 6 years ago by dharris

Xcode project to create QuickLook plugin for Adium chat files

comment:3 Changed 6 years ago by dharris

I've just uploaded an xcode project file for creating a quicklook plugin. This could be used as a starting point.

To try this out:

  1. Download and unpack the zip file
  2. Build the project in xcode
  3. Create $HOME/Library/QuickLook
  4. Copy AdiumChatQuickLook.qlgenerator to ~/Library/QuickLook
  5. At a command line, type "qlmanage -r" and hit return.

Now when you find an Adium chat log file in Finder (by browsing or via spotlight), you can hit the spacebar and preview up to the first 50 lines of the chat.

Changed 6 years ago by dharris

Adium QuickLook plugin

comment:4 Changed 6 years ago by dharris

I've also added a compiled version. Unzip the file and drop it into ~/Library/QuickLook (create the directory if it doesn't exist).

comment:5 Changed 6 years ago by djmori

comment:6 Changed 6 years ago by jchang

Would someone mind updating this for the whole log instead of 50 lines, and for the new chatlog format in 1.3?
Thanks (:

comment:7 Changed 6 years ago by dharris

I built this plugin in an afternoon. My rationale for only including 50 lines was that it was typically enough data for me to recall the context of the conversation -- and that's how I use QuickLook. I don't use it for reading full Word documents nor do I expect that I can zoom into details of photos.

I also didn't want to have the preview to take too long to load if I were on a long conversation -- QuickLook :-).

I haven't tried the 1.3 betas yet and so don't know how the chat log has changed. If anybody else would like to take this on, I'd be happy to answer questions about the code. My email address has the same username that I have here on gmail.com

comment:8 Changed 6 years ago by jchang

Well, the chatlog is just a bundle now, and the .xml file simply resides within it. The .xml file itself is the same as the old .chatlog though.

I tried copying some code over from http://trac.adiumx.com/browser/trunk/Other/Adium%20Spotlight%20Importer/GetMetadataForFile.m?rev=23500 to see if I could have the plugin detect the chatlog type, but since I don't know any Obj-c, I was far from being successful.

comment:9 Changed 5 years ago by jhagman

I got the QuickLookPlugin working. It looks ugly, but works now.

The previous xcode project was just inches from touchdown. I just

  • Updated the project to generate 64/32 bit plugin
  • fixed the code so that XML is read from the actual xml file and not the directory

Changed 5 years ago by jhagman

Working QuickLook plugin.

Changed 5 years ago by jhagman

Project for building the QuickLook plugin

comment:10 Changed 5 years ago by mathuaerknedam

Can you make it also work with old (non-bundle/dir chatlog) logs? How about the (really) old AdiumHTMLLog files?

comment:11 Changed 5 years ago by jhagman

The non-bundle ones should be easy, I'll do that now. I would need an example of the really old files to see what to do with them.

comment:12 Changed 5 years ago by jhagman

OK, I think I have the non bundle ones working now. I'll see the really old files tomorrow.

Changed 5 years ago by jhagman

Project file, supports current and previous format.

Changed 5 years ago by jhagman

QuickLookGenerator, supports current and previous format.

comment:13 Changed 5 years ago by jhagman

Now works with all the three formats. Still does not look good, but good enough for me. Also the html and xml logs look different. I hope this at least serves as a starting point for further work.

Changed 5 years ago by jhagman

Latest version of the QL plugin binary

Changed 5 years ago by jhagman

The project archive.

comment:14 Changed 5 years ago by mathuaerknedam

I can confirm that it works for all three log versions.

Anyone know if there are other logs variants to parse?

comment:15 Changed 4 years ago by Robby

  • Patch Status set to Needs Dev Review

comment:16 Changed 4 years ago by assetburned

it would be cool if it could place in the adium installer.

comment:17 Changed 4 years ago by Robby

  • Milestone changed from Good idea for "later" to Adium 1.5

comment:18 Changed 4 years ago by Robby

  • Owner nobody deleted

Changed 3 years ago by The-Kenny

Fixes small memory leaks in -formatDate:

comment:19 Changed 3 years ago by The-Kenny

I just made some nice changes to the quicklook-importer (Configurable stripping of message styles, configurable message limit). However, I don't want to publish these changes without the approval of the original authors.

The changes are in a local git repository at the moment. I would like to publish them on Github.

comment:20 Changed 3 years ago by dharris

Here's a public GitHub repo for my original code. I haven't worked on this in a long time but I don't recall adding any of the changes done by jhagman.

git://github.com/dougharris/AdiumChatQuickLook.git

Email me directly if you like. My address is my username here at gmail.

comment:21 Changed 3 years ago by jhagman

@The-Kenny This is open source I am not sure why you would need my approval for the changes. If it makes the importer better, just go for it! :)

I hope the ql-importer would ship with Adium soon (or does it, I've not checked lately)

Last edited 3 years ago by jhagman (previous) (diff)

comment:22 follow-up: Changed 3 years ago by Robby

  • Cc robotive added

The patch is being looked at by robotive, you can catch him in #adium-devl (Freenode). If it's good to go, it'll ship with 1.5. :)

comment:23 Changed 3 years ago by Robby

  • Patch Status changed from Needs Dev Review to Needs Changes by Author

After some discussion, The-Kenny has decided to work some more on the patch.

comment:24 in reply to: ↑ 22 Changed 2 years ago by earthmkii

Replying to Robby:

The patch is being looked at by robotive, you can catch him in #adium-devl (Freenode). If it's good to go, it'll ship with 1.5. :)

Please no new features for 1.5. If this is simple enough, we can schedule it for 1.5.1 though.

comment:25 Changed 2 years ago by Robby

  • Milestone changed from Adium 1.5 to Good ideas for later

Please keep us updated, The-Kenny. We will put this back on the agenda once your work is ready for review.

Note: See TracTickets for help on using tickets.