ether / ep_post_data

Post Data to an Etherpad from the CLI
Other
2 stars 5 forks source link

Feature Request: append text #6

Open jpc4242 opened 3 years ago

jpc4242 commented 3 years ago

Sorry if I don't fork and create a pull request; my JS knowledge is very limited so I'm not confident enough I think it would be really useful to have a mechanism to append text to a pad instead of replacing its value (i.e use appendText instead of setText)

That could be a either a new endpoint: curl -X POST -d @datafile.txt -H 'X-PAD-ID: test123' http://10.0.0.215/append

or by (ab)using the PATCH method on the existing one: curl -X PATCH -d @datafile.txt -H 'X-PAD-ID: test123' http://10.0.0.215/post

(obviously in both cases if X-PAD-ID is not provided or it points to a nonexisting pad a creation would happen instead of appending)

JohnMcLear commented 3 years ago

afaik you can, there is an Etherpad method for it, I just haven't exposed it via this plugin. I'd welcome it as a PR!