emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Post to mastodon within Org
@ 2024-04-14 10:20 Christian Barthel
  0 siblings, 0 replies; only message in thread
From: Christian Barthel @ 2024-04-14 10:20 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2276 bytes --]

Hi, some time ago, I showed a screenshot how I am using
Org-Mode to manage my mastodon status updates
(posts/toos) [1] and I got some direct messages about
sharing my elisp functions and I publicly [2] stated
that the code is not production ready, but I will
rework this.

Sorry - it took a bit too long but with that mail, I
want to share my defun's with you.  First and most
important, I do think that using [3] mastodon.el is way
better than using my elisp functions.  However, when
you're interested in a handful, very small functions to
post to mastodon, and manage them with org-mode, you
may have a look at the attached file.  Or someone is
interested in polishing things up and adding an
org-contrib package for this?


My process:

 - Use org-capture to create a new mastodon status
   update (at least, tag it with :toot:)
 - Write a message
 - add images with "attachment:/" URLs.  Those
   images will be uploaded as media and integrated
   in the status update
 - call `x/mastodon-post'
 - after success, PROPERTIES will be added like
   Mastodon ID, URL/URI and Media IDs
 - optionally, create a single-file Post with
   the org-dispatch interface (this is a custom
   export backend that is not included with this
   email, check [4] for further details how to set
   things up)

A reply to an existing mastodon post is sent when
a Mastodon_ID is found in the properties drawer one
level above.

This is what that looks like with my setup:

  <https://barthel.ch/pv/tmp/mastodon.png>

Currently, I do have one dependency (requests.el).  I
would have loved to remove this and use
url-retireve-synchronously but I were not able to
upload binary data with it.  If anyone has an idea
on that, please check out [5].


Please note: I bcc'ed to mastodon Users who replied to
the thread/direct messaged me and I was able to derive
an email address - so they get some form of follow up
notification on this.

[1] https://x.bch.at/@bch/111659014415841582
[2] https://x.bch.at/@bch/111659254718879041
[3] https://codeberg.org/martianh/mastodon.el
[4] https://orgmode.org/manual/Adding-Export-Back_002dends.html
[5] https://lists.gnu.org/archive/html/help-gnu-emacs/2024-03/msg00182.html
--
Christian Barthel


[-- Attachment #2: toots.el --]
[-- Type: application/emacs-lisp, Size: 6972 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-14 10:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-14 10:20 Post to mastodon within Org Christian Barthel

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).