Hello,

I want to write an org export plugin for the serendipity blog system[1].
Basically I need the HTML export with some changes:

- I only need the content of the <body> tag and nothing else.  I just
  found the BODY-ONLY argument, so I think I'm good :-)

- I don't want any CSS classes and selectors in the output.  I have
  not found any option for that yet.  In the worst case, I'll have to
  remove all ~class=~ strings from the lisp source.

- As I already use GeSHi[2] in my blog, I want any code blocks to be
  exported like this:

  [geshi lang=perl]
  print "Hello World\n";
  [/geshi]

  GeSHi will then convert that to HTML as needed.  I think I should be
  able to change the ~org-html-code~ for that.

I think I will get this done somehow.
My main question this is:

How can I do this in a way to not deviate too far from the original
~ox-html.el~?  I want to be able to easily import changes to
~ox-html.el~ into my source code.

1. I could just copy ~ox-html.el~ to ~ox-s9y.el~ and change it as
   needed.  But then I would have to manually check and perhaps apply
   any changes to ~ox-html.el~ to my ~ox-s9y.el~.

2. I could probably write a minimal ~ox-s9y.el~ that only handles my
   needs (eg. everything related to MathML or JavaScript can be
   deleted).  I would then change functions as needed and replace all
   /unchanged/ functions with calls the the corresponding in
   ~ox-html.el~ (method delegates).

   Eg. ~org-s9y-code~ would be a rewrite to produce the ~[geshi]~ code
   block and ~org-s9y-clock~ would just contain a call to the original
   ~org-html-clock~ function.

3. Is there a way to use something like inheritance to import all
   ~ox-html.el~ functions at once and then simply overwrite what I
   need to change?

What is the way to go?

Are there any other export plugins that are closely related where I
could have a look at an existing solution?

Thanks
Christian

[1] https://docs.s9y.org/
[2] http://qbnz.com/highlighter/
-- 
....Christian.Garbs....................................https://www.cgarbs.de

Oh Lord, won't you buy me a 4BSD?
My friends all got sources, so why can't I see?
Come all you moby hackers, come sing it out with me:
To hell with the lawyers from AT&T!

Reply via email to