Just tying up loose ends on this...
Tim Burt was kind enough to go offline with me for a while on this, but I realized I should put my final solution out there. There is an option in blogger to post in raw html, so for those just starting, that's an option. Just C-u C-c C-e C-R and paste into blogger. I already had some 30 posts and re-doing them would have been awful. Here's what I ended up doing:
- write up post in org-mode
- highlight region
- C-u C-c C-e C-R
- new file and yank the html
- write the file as export.txt
- in a terminal run: perl -pi -e ' s/\R//g; s/\<p\>//g; s/\<\/p\>/\n\n/g;' export.txt
--- This removes the begin paragraph tag and replaces the end paragraph tag with some new-line characters.
- refresh export.txt
- copy the whole buffer and then paste into blogger
Paragraph beginnings have two spaces that I go through and delete and since I also write to export to LaTeX I use \quote and need to go through and change them to <blockquote></blockquote> where necessary. I obviously also have to clean up LaTeX only stuff... It's hardly any work and I can live with it, especially since I get the power of org-mode for writing things up along with it's mutli-faceted export capabilities and the fact that I have the file with me rather than just on blogger.
For what its worth, perhaps someone can gain from this!
John
It's been working great and
On Wed, Jul 28, 2010 at 1:48 PM, John Hendy
<jw.hendy@gmail.com> wrote:
@ Giovanni: the manual says \n:nil does not work. I played around with it anyway but was unsuccessful. Bummer as it seemed like it would have been perfect...
@ TIm, I am aware of this option and it's what I was referencing in the original note with:
> I could resort to explicit html every time I post (requiring <br \>
> for every line break) but this would also require fixing all
> pre-existing posts which is pretty much not an option.
But what about my point that currently all my posts do not use this? When I experimented with this option yesterday it turned old posts into huge run-on paragraphs with no structure, hence I don't really think it's an option unless I re-edit every post. Going forward, it'd be easier to somehow get rid of line breaks... though maybe I should just write my own template or something. I don't really use <p> in my posts anyway but prefer the single line space created by just on <br \>.
I dunno -- any thoughts? Should I re-do like 30 posts for this? Is there any other way?
Thanks for the help, all.
John
On Wed, Jul 28, 2010 at 5:30 AM, Tim Burt
<tcburt@rochester.rr.com> wrote:
> I use org for exporting to html and then pasting into blogger
I use this process also for Blogger
> ... but every time I do I need to delete line breaks.
... but I do not need to delete line breaks. See
http://naturallogofx.rketburt.org/2010/07/linebreaks-blogger-and-org-mode.html
for an article that describes what I do. The fix for me was in the
Blogger settings, not anything in emacs.
> Is there a way to get org to just publish the blob without breaking
> lines every time?
I do not know how to prevent line breaks in the export, but nor have I
needed to do that.
> I'm guessing it has to do with my minor fill mode as the line breaks
> tend to be the same as they are in org.
>
> In typical export, everything is surrounded by <html> tags but in blogger on
> doesn't have these and thus line breaks are line breaks.
The article reference above indicates how to stop Blogger from
presenting an input linebreak (e.g. newline character) as an output
linebreak.
> I could resort to explicit html every time I post (requiring <br \>
> for every line break) but this would also require fixing all
> pre-existing posts which is pretty much not an option.
>
> Any idea what I could do?
Let me know if the article reference does not help solve the issue.
Tim
>
>
> Thanks,
> John