EMACS


If you are pulling your tweets from a plain text file Calibre can help with the conversion from other formats.
If you are familiar with EMACS, you may find the code snippet below useful. To use:

  1. Modify the snippet as desired e.g. if you are pulling quotes from the Bible, substitute "--The Bible, King James Version" for "--JG Ballard, Kingdom....". This will automatically append the source to each tweet.
  2. Open your init.el file and paste the snippet in. Restart EMACS.
  3. Open your corpus of text. It must be plain text.
  4. Open a buffer called destination.txt i.e. C-x C-f destination.txt
  5. Switch back to your text of interest. As you read through the text highlight a quote you would like to tweet. F6 to add it to destination.txt along with a reference (if desired) and and indication of the image (random in all cases - change manually if desired)
  6. At any time you can press F7, deleting all text in the corpus before the cursor. This serves as a bookmark for the next time you commence screeing for tweets. Make backups!
Key Function
F6Copy highlighted area + source + image indicator to destination.txt and save.
F7 Delete from the beginning of the document to the cursor and save.


Code snippet suitable for inclusion in your Emacs initialization file e.g. ~/.emacs.d/init.el:

--------8<-----------Code snippet----------->8-----------------------

(global-set-key (kbd "") 'copy-content)

    (defun copy-content()
    (interactive)
    (current-buffer)
    (copy-region-as-kill  (region-beginning) (region-end))
    (set-buffer "destination.txt")
    
    (yank)
    (insert " --J.G. Ballard, Kingdom Come (2006)\nkingdomcome.jpeg\n")
    (save-buffer 64))

    (global-set-key (kbd "") 'delete-to-top)

    (defun delete-to-top()
    (interactive)
    (current-buffer)
    (delete-region (point-min) (point) ) 
    (save-buffer 64))

--------8<-----------END Code snippet----------->8-------------------