From: Christian Barthel <bch@online.de>
To: emacs-orgmode@gnu.org
Subject: Post to mastodon within Org
Date: Sun, 14 Apr 2024 12:20:02 +0200 [thread overview]
Message-ID: <874jc4qm99.fsf@shell.onfire.org> (raw)
[-- 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 --]
reply other threads:[~2024-04-14 10:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874jc4qm99.fsf@shell.onfire.org \
--to=bch@online.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).