dillinger icon indicating copy to clipboard operation
dillinger copied to clipboard

POST to dillinger

Open techtonik opened this issue 10 years ago • 5 comments

I'd like to make a script to send file I'd like to edit to dillinger from command line. Is there any API for that?

techtonik avatar Mar 15 '14 10:03 techtonik

Not currently but a great idea.

Something like POST to http://api.dillinger.io/render where the POST body is markdown and then response is HTML?

joemccann avatar May 14 '14 12:05 joemccann

Ideally I want to send a POST request from command line script and then finish editing in browser. For this script script needs URL returned from POST request to redirect me to.

Using Dilinger as a markdown rendering service would probably result in abuse, because people probably start embedding it into their sites to render markdown with JavaScript.

techtonik avatar May 14 '14 13:05 techtonik

Ahh so what you are talking about is significantly more complex as you need a unique URL per POST so you can finish the file later. Need to create a backend and potentially user accounts for this.

On Wed, May 14, 2014 at 9:18 AM, anatoly techtonik <[email protected]

wrote:

Ideally I want to send a POST request from command line script and then finish editing in browser. For this script script needs URL returned from POST request to redirect me to.

Using Dilinger as a markdown rendering service would probably result in abuse, because people probably start embedding it into their sites to render markdown with JavaScript.

— Reply to this email directly or view it on GitHubhttps://github.com/joemccann/dillinger/issues/145#issuecomment-43078588 .

joemccann avatar May 14 '14 13:05 joemccann

Well, I am comfortable to just open a browser and continue editing there, but there is a lot of questions how to command browser to send a POST request.

techtonik avatar May 14 '14 13:05 techtonik

+1 - or a little more simple. I'd like to create a document via API and then provide a URL to edit that document. An expirable token would be enough to not allow anyone to edit the file. The URL is always generated via an API request.

Does it make sense?

sabbaticaldev avatar Jul 13 '14 14:07 sabbaticaldev