From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Baum Subject: Need help with processing a text block with python function Date: Tue, 1 Jan 2013 11:13:27 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=14dae93a168ff9866804d23c6849 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tq4T5-0004Fs-BI for emacs-orgmode@gnu.org; Tue, 01 Jan 2013 11:13:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tq4T2-0007g2-UK for emacs-orgmode@gnu.org; Tue, 01 Jan 2013 11:13:31 -0500 Received: from mail-ob0-f180.google.com ([209.85.214.180]:39739) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tq4T2-0007fq-Ow for emacs-orgmode@gnu.org; Tue, 01 Jan 2013 11:13:28 -0500 Received: by mail-ob0-f180.google.com with SMTP id wd20so11976748obb.39 for ; Tue, 01 Jan 2013 08:13:27 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode --14dae93a168ff9866804d23c6849 Content-Type: text/plain; charset=ISO-8859-1 I know this is kind of an org-mode 101 question, sorry, but after searching docs for a couple of days, I could use a pointer. I want to write a function in a code block in python or perl that steps through lines of text and does some complicated reformatting, adding in html bits and such, for a specialized application. Then I want to be able paste a block of text into an org-mode file and call this function to walk through it and do it's stuff, sending the result to an export buffer. What's the best way to do that, specifically, what should I do with the text to be processed? Put it all under a single headline and call the function against that headline? Put it within some sort of begin/end markers? I need the python or whatever script to be able to step through one line at a time maybe using it's usual text input functions. Thanks, maab -- ==================================== Michael Baum You should never have your best trousers on when you go out to fight for freedom and truth. - Ibsen --14dae93a168ff9866804d23c6849 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I know this is kind of an org-mode 101 question, sorry, but after searching= docs for a couple of days, I could use a pointer. I want to write a functi= on in a code block in python or perl that steps through lines of text and d= oes some complicated reformatting, adding in html bits and such, for a spec= ialized application. Then I want to be able paste a block of text into an o= rg-mode file and call this function to walk through it and do it's stuf= f, sending the result to an export buffer.

What's the best way to do that, specifically, what should I do with= the text to be processed? Put it all under a single headline and call the = function against that headline? Put it within some sort of begin/end marker= s? I need the python or whatever script to be able to step through one line= at a time maybe using it's usual text input functions.

Thanks,
maab

--
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Mi= chael Baum <maabaum@gmail.com&g= t;

You should never have your best trousers on when you go out
=A0to fight for freedom and truth. - Ibsen --14dae93a168ff9866804d23c6849--