all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christian Garbs <mitch@cgarbs.de>
To: emacs-orgmode@gnu.org
Subject: export to s9y blog
Date: Sun, 3 Sep 2017 20:34:59 +0200	[thread overview]
Message-ID: <20170903183459.nnc2jbgd2qxjdwjl@cgarbs.de> (raw)

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	other threads:[~2017-09-03 18:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-03 18:34 Christian Garbs [this message]
2017-09-03 18:44 ` export to s9y blog Josiah Schwab
2017-09-03 19:01   ` Christian Garbs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170903183459.nnc2jbgd2qxjdwjl@cgarbs.de \
    --to=mitch@cgarbs.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.