From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: HTML export and blogging to blogger.com Date: Thu, 11 Nov 2010 17:07:35 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1036944119==" Return-path: Received: from [140.186.70.92] (port=43691 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGgF1-00018Q-AN for emacs-orgmode@gnu.org; Thu, 11 Nov 2010 18:07:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGgEz-0003Qi-K4 for emacs-orgmode@gnu.org; Thu, 11 Nov 2010 18:07:39 -0500 Received: from mail-bw0-f41.google.com ([209.85.214.41]:49975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGgEz-0003QR-AX for emacs-orgmode@gnu.org; Thu, 11 Nov 2010 18:07:37 -0500 Received: by bwz16 with SMTP id 16so2556324bwz.0 for ; Thu, 11 Nov 2010 15:07:35 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Samuel Wales Cc: emacs-orgmode@gnu.org --===============1036944119== Content-Type: multipart/alternative; boundary=0016e6da2e321458880494cf0aa5 --0016e6da2e321458880494cf0aa5 Content-Type: text/plain; charset=ISO-8859-1 Hi Samuel, I've been blogging with org-mode for a while and like it a lot. Let's me keep my blog posts in an org file for retention but still provides a convenient way to post to html. See this page of the manual for getting rid of a lot of other stuff: http://orgmode.org/manual/Export-options.html. For example, you can set some lines like this in your header: #+options: author:nil email:nil My publishing routine goes like this... Write up some text: * heading ** subheading for export blah blah blah blah - Highlight "blah blah blah blah" - C-c C-e R to export the region - In the new buffer created I delete everything from < html > to the text I want as well as the closing < /html >. I use C-x C-w to save that buffer to a file called export.txt - I open up a command line and run perl -pi -e ' s/\R/ /g; s/\//g; s/\<\/p\>/\n\n/g;' export.txt - I go back to emacs and do C-x C-f export.txt and tell it to reload and then copy that into blogger The perl command gets rid of < p > tags and since I run org in Fill mode it gets ride of the badly placed line breaks so everything is continuous. It's been working pretty good for me. I might need to optimize the perl. It's been a little bit since I used it but I recall it puts an extra space at the beginning of paragraphs or something. I'm sure there's some function I can't recall to get rid of the < html > heading but I can't recall what it is offhand. It's in the mailing list archives somewhere. For now my blogging is low enough that I don't mind stripping it off myself. John On Thu, Nov 11, 2010 at 4:05 PM, Samuel Wales wrote: > I want to blog to blogger.com using org, but I am not yet up > to trying org-googlecl.el. I will in the future, but don't > want to go through the setup now. > > So I want to paste org-generated HTML into Blogger. But my > first attempt did not work. I highlighted the region, > exported to HTML, and pasted into the text box on Blogger. > It said: > > Your HTML cannot be accepted: Tag is not allowed: HTML > > What do I need to change to make this work? > > === > > Also, org put the date (in two places) and the author in the > generated HTML code. I don't want to export those, not even > in the code. I looked for org-export-with- variables and > did not find ones that matched. > > How do I prevent their export? > > Thanks. > > > Samuel > > -- > Q: How many CDC "scientists" does it take to change a lightbulb? > A: "You only think it's dark." [CDC has denied a deadly serious > disease for 25 years] > ========== > HIV-like virus: http://www.wpinstitute.org/xmrv/index.html -- PLEASE > DONATE > === > I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MLV > paper. > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > --0016e6da2e321458880494cf0aa5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Samuel,


I've been blogging with or= g-mode for a while and like it a lot. Let's me keep my blog posts in an= org file for retention but still provides a convenient way to post to html= .=A0See this page of the manual for getting rid of a lot of other stuff:=A0= http://orgmode.or= g/manual/Export-options.html. For example, you can set some lines like = this in your header:

#+options: author:nil email:nil

My publishing routine goes like this... Write up some text:
* heading
** subheading for export
blah bla= h blah blah

- Highlight "blah blah blah blah"
-= =A0C-c C-e R to export the region
-=A0In the new buffer created I= delete everything from < html > to the text I want as well as the cl= osing < /html >. I use C-x C-w to save that buffer to a file called e= xport.txt
- I open up a command line and run=A0perl -pi -e ' s/\R/ /g; s/\<p\>//g; s/\<\/p\>/\= n\n/g;' =A0export.txt
- I go back to emacs and = do C-x C-f export.txt and tell it to reload and then copy that into blogger=

The perl command gets rid of <= p > tags and since I run org in Fill mode it gets ride of the badly pla= ced line breaks so everything is continuous. It's been working pretty g= ood for me. I might need to optimize the perl. It's been a little bit s= ince I used it but I recall it puts an extra space at the beginning of para= graphs or something.

I'm sure there's some fun= ction I can't recall to get rid of the < html > heading but I can= 't recall what it is offhand. It's in the mailing list archives som= ewhere. For now my blogging is low enough that I don't mind stripping i= t off myself.


Jo= hn

On Thu, Nov 11, 2010 at 4:05 PM, = Samuel Wales <= samologist@gmail.com> wrote:
I want to blog to blogger.= com using org, but I am not yet up
to trying org-googlecl.el. =A0I will in the future, but don't
want to go through the setup now.

So I want to paste org-generated HTML into Blogger. =A0But my
first attempt did not work. =A0I highlighted the region,
exported to HTML, and pasted into the text box on Blogger.
It said:

=A0Your HTML cannot be accepted: Tag is not allowed: HTML

What do I need to change to make this work?

=3D=3D=3D

Also, org put the date (in two places) and the author in the
generated HTML code. =A0I don't want to export those, not even
in the code. =A0I looked for org-export-with- variables and
did not find ones that matched.

How do I prevent their export?

Thanks.


Samuel

--
Q: How many CDC "scientists" does it take to change a lightbulb?<= br> A: "You only think it's dark." [CDC has denied a deadly serio= us
disease for 25 years]
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
HIV-like virus: http://www.wpinstitute.org/xmrv/index.html -- PLEASE DONA= TE
=3D=3D=3D
I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MLV pa= per.

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

--0016e6da2e321458880494cf0aa5-- --===============1036944119== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1036944119==--