all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* export to s9y blog
@ 2017-09-03 18:34 Christian Garbs
  2017-09-03 18:44 ` Josiah Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Garbs @ 2017-09-03 18:34 UTC (permalink / raw)
  To: emacs-orgmode

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!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-03 19:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-03 18:34 export to s9y blog Christian Garbs
2017-09-03 18:44 ` Josiah Schwab
2017-09-03 19:01   ` Christian Garbs

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.