[Top][All Lists]

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

Re: [O] another blog exporter

From: Robert Klein
Subject: Re: [O] another blog exporter
Date: Fri, 07 Feb 2014 20:17:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Hi Rasmus,

thank you very much for your feedback!

On 02/07/2014 06:35 PM, Rasmus wrote:
> Could you provide an example blog so that we can see the output?

The two latest posts ("FreeBSD" and "DHCP") at http://www.xyzzy.de/

I put the original org for download at the end of both posts.

>> ;;; Transcode Functions
>> ;;;; Example Block
>> (defun org-blog-example-block (example-block contents info)
>>   "Transcode a EXAMPLE-BLOCK element from Org to HTML.
>> CONTENTS is nil.  INFO is a plist holding contextual
>> information."
>>   (if (org-export-read-attribute :attr_html example-block :textarea)
>>       (org-html--textarea-block example-block)
>>     ;;; beginnin here we need org/wp-syntac/syntaxhl information!!!!
>>     (format "<pre class=\"example\">\n%s</pre>"
>>          (org-html-format-code example-block info))))
> Isn't this an exact copy of the corresponding entry in ox-html (Less
> the name)?  Why?

- org-blog-example-block /is/ an exact copy, I planned to add the
  highlighters here, too, and to support line numbers.  Forgot it :(

- org-blog-latex-environment adds support for =#+ATTR_BLOG:=

- org-blog-latex-fragment currently also is an exact copy.  I'm not sure
  mathjax works, so I put it here for further work.

- org-blog-link supports =attr_blog= and fills the list of images to be
  uploaded. (I really hated to copy this one... in an earler version I
  cl-flet-ted org-html--format-image to avoid copying this one.

for org-blog-export-[as|to]-blog, I had no choice. :)

I just found out, when I introduced scheduled posting I broke unscheduled
posting; this is the patch:

--- emacs/ox-blog.el    2014-01-21 10:57:50 +0000
+++ emacs/ox-blog.el    2014-02-07 18:38:52 +0000

@@ -1089,7 +1089,7 @@
            ;; administrator may post
            (post-status (cond ((equal draft-or-publish-p "draft") "draft")
                               ((equal "contributor" user-role) "pending")
-                              ((and publish-datetime
+                              ((and (not (string= "" publish-datetime))
                                     (or (equal "author" user-role)
                                         (equal "administrator" user-role)))

Best regards and thank you very much for the feedback,

reply via email to

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