This question came up on the etherpad-open-source-discuss mailing list and I thought it would be useful to have it here.
Just construct a URL like so and fetch it:
http://dtherpad.com/ep/pad/export/foo/latest?format=txt
That will get the live, plaintext contents of http://dtherpad.com/foo
For example, in PHP you can grab it with
file_get_contents("http://dtherpad.com/ep/pad/export/foo/latest?format=txt")
Note that that's just the "export to plain text" link that's provided in the Import/Export menu of every pad.
A few other possibilities:
rep.alltext
pad.text
for the most recent version of pad.getRevisionText(rev.revNum)
for a specified previous revision.It seems that the javascript functions mentioned by Ari in his response are no longer present in the current versions of Etherpad as implemented on sites like http://etherpad.mozilla.org
However you can now simply use the following javascript function, within eherpad's javascript to get the text of the latest revision
padeditor.ace.exportText()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With