fetching a list of all public pads

519 views
Skip to first unread message

Daniel Reeves

unread,
Feb 19, 2012, 6:58:03 PM2/19/12
to etherpad-open-...@googlegroups.com
In Etherpad 1.0 I could run this to get a list of all pad names,
ordered by how recently they were touched:
select id from PAD_SQLMETA order by lastWriteTime DESC, headRev DESC

I'm looking for the preferred way to do this in Etherpad Lite.

Thanks everyone!

--
http://dreev.es  --  search://"Daniel Reeves"

John McLear

unread,
Feb 19, 2012, 7:01:38 PM2/19/12
to etherpad-open-...@googlegroups.com

Daniel Reeves

unread,
Feb 19, 2012, 11:43:39 PM2/19/12
to etherpad-open-...@googlegroups.com
Thanks John!

A really dumb question: what's up with the etherpad_lite database?
There's apparently only one table (store) with 2 columns (key, value).
Can I not realistically do any database queries directly for this kind
of thing?

Follow the Yellow Brick Road -- http://beeminder.com

John McLear

unread,
Feb 20, 2012, 10:30:57 AM2/20/12
to etherpad-open-...@googlegroups.com
It's a key value store.

Daniel Reeves

unread,
Feb 20, 2012, 3:09:32 PM2/20/12
to etherpad-open-...@googlegroups.com
Thanks, I knew it was a dumb question :) but I guess my real question
is what's the interface to it? Seems like I can't do much in the way
of mysql queries...

Daniel Reeves

unread,
Apr 4, 2012, 3:31:07 PM4/4/12
to etherpad-open-...@googlegroups.com
I put this in another thread but I'll answer myself here too, for
posterity (ie, future folks searching the archives):

My awesome friend Rob Felty wrote this for extracting the full list of
public pads, sorted by number of revisions:

mysql -u USER -pPSW etherpad_lite -e 'select store.key from store' |
grep -Eo '^pad:[^:]+' | sed -e 's/pad://' | sort | uniq -c | sort -rn
| awk '{if ($1!="2") {print $2 }}'

We couldn't see a way to sort it by last modification time.

Reply all
Reply to author
Forward
0 new messages