dangom / writefreely.el

*Frictionless* blogging with Org Mode. No setup required.
90 stars 7 forks source link

Post as draft #6

Open mrvdb opened 5 years ago

mrvdb commented 5 years ago

If documents could be posted as drafts that would be very helpful. Both as a way to preview how things will get rendered, I find that I need to correct little things to get the rendering intended, and to have a bit more control on when the post goes federated.

I've looked in the write.as API, but it didn't seem obvious how to do that, perhaps I'm missing something.

dangom commented 5 years ago

For previewing I submit posts anonymously. Provided you don't share the link, they are invisible and don't get federated. I see qua.name has drafts instead of anonymous posts, so that's maybe the reason anonymous submissions don't make sense for you?

You could use write.as just for previewing, I guess:

(defun my-writefreely-preview-post ()
  (let ((writefreely-auth-token nil)
        (writefreely-instance-api-endpoint "https://write.as/api")
        (writefreely-instance-url "https://write.as"))
    (writefreely-publish-or-update) ;; Updates run async, so you may have to refresh your browser.
    (writefreely-visit-post)))

And once you are done you can call (writefreely-delete-post) and then (writefreely-publish-or-update).

mrvdb commented 5 years ago

Yeah, there are a couple of subtle differences between write.as and writefreely, this is indeed one of them. (another one for example is the visit-post url on writefreely with the .md suffix actually delivers markdown, not the rendered post)

Another workaround I have been using is creating a 'Draft' collection which does not federate and post to that collection initially and once done moving it to the 'real' collection.

mrvdb commented 5 years ago

After checking with Matt, on writefreely, 'drafts' are the same as 'anonymous' except you need to be logged on O_O

cfr. https://writing.exchange/@matt/101120929499911988

mrvdb commented 5 years ago

How about recognizing if we are connecting to write.as or "the rest", where the text for "anonymous posts" collection on the latter is reworded as "-- drafts collection --" or something similar?

dangom commented 5 years ago

Perhaps we could call it --post without collection--?!

mrvdb commented 5 years ago

Hmm, wouldn't that make it more unclear for both situations? Neither the word 'anonymous' nor 'draft' is then in the text.