hayamiz / twittering-mode

An Emacs major mode for Twitter
http://twmode.sourceforge.net/
546 stars 92 forks source link

[Request] Scheduling tweets — or is it too much for single-threaded emacs? #123

Closed akater closed 6 years ago

akater commented 7 years ago

Separate buffer for scheduled tweets, schedule is (re-)submitted on save. Or maybe I want too much from a single-threaded program?

bmp commented 7 years ago

@akater I'd love this too, I'm using a third party service (does not integrate with twittering-mode) called Buffer. I guess it should be possible to do this (See: https://www.gnu.org/software/emacs/manual/html_node/elisp/Asynchronous-Processes.html),

  1. Store tweet timing in a config file.
  2. Store buffered tweets in file (with the first comma separated value being status of whether tweeted or not)
  3. Trigger a bash script to run (on launch of twittering-mode or Emacs) that posts tweets based on timing and the status value in the line
  4. Bash script terminates if emacs is not running

I am not sure if this is an elegant or useful method though.

jkitchin commented 6 years ago

This seems to work:

(run-at-time
 "6:27pm" nil
 (lambda ()
   (twittering-call-api 'update-status '((status . "Scheduled at 6:27pm")))))
akater commented 6 years ago

I'm unlikely to check this as Twitter had locked my account it in a manner that does not encourage doing anything about it but it's probably fine. Thank you!