emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Possible to use src block to generate org headlines for export?


From: Matt Lundin
Subject: Re: [O] Possible to use src block to generate org headlines for export?
Date: Wed, 23 Jul 2014 15:42:03 -0500
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.3 (gnu/linux)

Brett Viren <address@hidden> writes:

> Matt Lundin <address@hidden> writes:
>
>> Brett Viren <address@hidden> writes:
>>>
>>> Maybe it would be more convenient to add the "meta-ness" you want as
>>> part of a new exporter process?  
>>
>> To change the "meta" wrappers for code block results, we would have to
>> modify org babel (ob-core.el). 
>
> Just to be clear (hopefully) I actually meant something different. I
> was suggesting to *not* use org babel to produce your extra headlines.
> Rather, have whatever logic produces them reside in some new exporter.
>
> I'm may be making incorrect guesses as to what you are actually going
> for with these extra headlines.  You mentioning this is for a blog made
> me think they are some kind of "standard augmentation" for every blog
> post or something.  If not then I'm probably barking up the wrong tree.
> But if so, putting them into an exporter seems apt.

I am using org-babel (+ perl) to gather a page containing the content of
the most recent posts. I also export this page to rss via ox-rss.el. I
could simply use a perl script to generate the file during the export
process, but a babel source block makes it convenient to modify the text
before and after the dynamic content and to test modifications to the
code.

To generate dynamic content for just one page, babel works fine.
However, if I wanted to update every page with such content, it would
make *much* more sense (as you suggest) to create an exporter.

> This is an approach I'm taking in a JSON+HTML exporter (analogous to
> the latex+pdf one) that I'm working on. For example, I'd like to have
> a "tag cloud" generated from tags on org headlines. This tag cloud
> won't explicitly exist on the org side. Rather it will be implicitly
> produced and updated by some (Python) code that runs as part of the
> JSON->HTML stage of the exporter.

That sounds interesting. I look forward to hearing more!

Thanks for the clarification!

Best,
Matt



reply via email to

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