Viewing recently edited etherpads (note new 'etherpad' tag for open sourced etherpad code!)

Posted by dreeves on Stack Overflow See other posts from Stack Overflow or by dreeves
Published on 2010-04-02T21:02:33Z Indexed on 2010/05/27 21:11 UTC
Read the original article Hit count: 212

Filed under:
|
|
|

Prescript: The amazing etherpad was recently open sourced. Get it here: http://code.google.com/p/etherpad. This is the first question that I know of on StackOverflow about the etherpad code. If you're part of the etherpad open source community, you might want to subscribe to the RSS feed for questions tagged 'etherpad' just in case this catches on!

My actual question, which assumes you have etherpad installed on your own server:

First, here's a query to view recently edited pads:

SELECT id,lastWriteTime,creationTime,headRev 
  FROM PAD_SQLMETA ORDER BY lastWriteTime, headRev;

Or, if you want to run it from a unix prompt:

mysql -u root -pPASSWD etherpad -e "select id,lastWriteTime,creationTime,headRev 
  from PAD_SQLMETA order by lastWriteTime, headRev"

That's handy, however lastWriteTime actually gets updated every time someone so much as views a pad in their browser. I'd rather sort the pads by when they were actually last edited. There's probably a fancy SQL query involving a join with another table that would show actual last edit time. Does anyone know what that is? Alternatively, you could have a script that notices when headRev changes but that doesn't seem like the cleanest way to do it.

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql