emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: HTML export and blogging to blogger.com


From: Samuel Wales
Subject: [Orgmode] Re: HTML export and blogging to blogger.com
Date: Sat, 13 Nov 2010 18:25:08 -0700

Well, I spoke too soon.  I don't have a solution.  Here is
what I tried.


  1) org source (my normally-preferred filled paragraphs) ->
     c-u c-c c-e R -> blogger
     - hard breaks are inserted so no filling can happen in
       published blog entry
       + if large fonts and small column, will break
         awkwardly
     - blogger result attached
  2) Unfill-region (my code below) -> c-u c-c c-e R -> blogger
     - paragraphs are separated by too many blank lines
     - an extra closing div if top headline not included
       (not really a problem)
     - unfill-region doesn't actually catch all paragraphs
       so you have to manually unfill some
  3) Unfill-region (my code below) -> manually deleting
     space between paragraphs -> c-u c-c c-e R -> blogger
     - no paragraph separation
  4) John's recipe: c-u c-c c-e R -> perl script -> blogger
     - paragraphs are separated by too many blank lines
     - blogger result attached


(defun alpha-unfill-region-or-paragraph ()
  (interactive)
  (let ((fill-column (point-max)))
    (alpha-fill-region-or-paragraph)))
(defun alpha-fill-region-or-paragraph ()
  (interactive)
  (if (hoka-org-region-active-p)
      (call-interactively #'fill-region)
    (fill-paragraph nil)))


John's recipe (I shortcutted with c-u m-|):

  1) Write some stuff
  2) Select it (move to beginning of what you want, C-space,
     move to end of what you want)
  3) C-u C-c C-e R to export that region with no preamble to
     a separate buffer
  4) C-x C-w export.txt
  5) to terminal: perl -pi -e ' s/\R/ /g; s/\<p\>//g;
s/\<\/p\>/\n\n/g;' export.txt
  6) back to emacs: C-x C-f export.txt; type "yes"
  7) M-< to go to front of buffer, C-space, M-> to go to
     end, M-w to copy
  8) Paste into basic blogger edit box
  9) Done

Org source is attached.

Attachment: blogger-output-john.text
Description: Text document

Attachment: blogger-input.org
Description: Binary data

Attachment: blogger-output-filled.text
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]