How to list all pads

Robin Schneider edited this page Oct 6, 2015 · 6 revisions

This was posted to the mailing list by Daniel Reeves. The script was actually written by Rob Felty.

The following script will extract the full list of public pads sorted by number of revisions:

Remark: The script does not show new pads (where nothing is written on)

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 }}'

or even simpler (here also the new pads are shown):

select distinct substring(store.key,5,locate(":",store.key,5)-5) as "pads" from store where store.key like "pad:%"

sqlite3:

#!/bin/bash
sqlite3 ./pad.db 'select store.key from store' \
   | grep -Eo '^pad:[^:]+' \
   | sed -e 's/pad://' \
   | sort \
   | uniq -c \
   | sort -rn \
   | awk '{if ($1!="2") {print $2 }}'

PostgreSQL:

create or replace view v_pads as select substring(key from 'pad:(.*):revs:0') as name from store where key ~ 'pad:.*:revs:0' order by key;
select * from v_pads;

General

Resources

For Developers

How to's

Set up

Advanced steps

Integrating Etherpad in your web app

for Developers

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.