-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
How to list all pads
funkykiwi edited this page Jul 14, 2022
·
8 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;
Alternatively you can use Etherpad API.
ETHERPAD_HOST='https://pad.example.com'
ETHERPAD_API_KEY='...' # can be found in APIKEY.txt file in the Etherpad installation directory
ETHERPAD_API_VERSION='...' # can be found via https://pad.example.com/api
LIST_PADS_URL="${ETHERPAD_HOST}/api/${ETHERPAD_API_VERSION}/listAllPads?apikey=${ETHERPAD_API_KEY}"
curl -s -X GET "${LIST_PADS_URL}" | jq -r '.data.padIDs[]'
- Docs
- Translating
- HTTP API
- Plugin framework (API hooks)
- Plugins (available)
- Plugins (list)
- Plugins (wishlist)
- Etherpad URIs / URLs to specific resources IE export
- Etherpad Full data export
- Introduction to the source
- Release Procedure
- Etherpad Developer guidelines
- Project to-do list
- Changeset Library documentation
- Alternative Etherpad-Clients
- Contribution guidelines
- Installing Etherpad
- Deploying Etherpad as a service
- Deploying Etherpad on CloudFoundry
- Deploying Etherpad on Heroku
- Running Etherpad on Phusion Passenger
- Putting Etherpad behind a reverse Proxy (HTTPS/SSL)
- How to setup Etherpad on Ubuntu 12.04 using Ansible
- Migrating from old Etherpad to Etherpad
- Using Etherpad with MySQL
- Customizing the Etherpad web interface
- Enable import/export functionality with AbiWord
- Getting a list of all pads
- Providing encrypted web access to Etherpad using SSL certificates
- Optimizing Etherpad performance including faster page loads
- Getting to know the tools and scripts in the Etherpad /bin/ folder
- Embedding a pad using the jQuery plugin
- Using Embed Parameters
- Integrating Etherpad in a third party app (Drupal, MediaWiki, WordPress, Atlassian, PmWiki)
- HTTP API client libraries