tags:

views:

16

answers:

2

This question came up on the etherpad-open-source-discuss mailing list and I thought it would be useful to have it here.

+1  A: 

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.

dreeves
+1  A: 

A few other possibilities:

  • From a browser, you can hit http://your-etherpad-server.com/ep/pad/view/padId/latest?pt=1
  • From within the code of the collaborative editor (ace2_inner.js), use rep.alltext
  • Within the Etherpad's javascript, use pad.text for the most recent version of pad.getRevisionText(rev.revNum) for a specified previous revision.
ari