From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Garbs Subject: export to s9y blog Date: Sun, 3 Sep 2017 20:34:59 +0200 Message-ID: <20170903183459.nnc2jbgd2qxjdwjl@cgarbs.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doZjl-0000QH-Cb for emacs-orgmode@gnu.org; Sun, 03 Sep 2017 14:35:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1doZjg-0000ng-BU for emacs-orgmode@gnu.org; Sun, 03 Sep 2017 14:35:13 -0400 Received: from mspool3.srv.dfn.de ([2001:638:d:c401::3]:49022 helo=mail.shuttle.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1doZjg-0000jl-55 for emacs-orgmode@gnu.org; Sun, 03 Sep 2017 14:35:08 -0400 Received: from yggdrasil.mitch.h.shuttle.de (p2E5B4FD0.dip0.t-ipconnect.de [46.91.79.208]) by mspool3.srv.dfn.de (Postfix) with ESMTPSA id 459AF11CF for ; Sun, 3 Sep 2017 20:35:00 +0200 (CEST) Received: from mitch by yggdrasil.mitch.h.shuttle.de with local (Exim 4.89) (envelope-from ) id 1doZjX-00026U-Sa for emacs-orgmode@gnu.org; Sun, 03 Sep 2017 20:34:59 +0200 Content-Disposition: inline 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" To: emacs-orgmode@gnu.org 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 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!