emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Markdown export (using org-export-generic)


From: Jambunathan K
Subject: Re: [O] Markdown export (using org-export-generic)
Date: Thu, 18 Aug 2011 03:56:27 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt)

Paul Sexton <address@hidden> writes:

> Jambunathan K <kjambunathan <at> gmail.com> writes:
>> May be you could cook something up with org-lparse? The file is in
>> contrib dir and org-xhtml and ord-odt make use of it.
>
> Thanks, it looks interesting, but I can't find any documentation?

You need to rely on the docstrings for the most part. Please take a look
at the initial commentary section of org-lparse.el.

The docstring for org-lparse-native-backends should a good starting
point [1]. You will start with adding an entry to this variable and
start exporting with M-x org-lparse.

Another way to proceed is 

- Start with a sample org file [2]
- Enable debug logs in the exported file

  (setq org-lparse-debug t)

- Do a org-export-as-xhtml

- Open the resulting html file and take a Look at the comments embedded
  in it. You will have a feel for how the format and entity callbacks
  are invoked (See docstring below for the format and entity callbacks)

- Keep modifying org-xhtml.el until it becomes a org-markdown.el

org-lparse is reasonably mature and you are less likely to burn your
fingers badly with it.

Jambunathan K.

Footnotes: 
[1]  org-lparse-native-backends

,----[ C-h v org-lparse-native-backends RET ]
| org-lparse-native-backends is a variable defined in `org-lparse.el'.
| Its value is ("odt" "xhtml")
| 
| 
| Documentation:
| List of native backends registered with `org-lparse'.
| A backend can use `org-lparse-register-backend' to add itself to
| this list.
| 
| All native backends must implement a get routine and a mandatory
| set of callback routines.
| 
| The get routine must be named as org-<backend>-get where backend
| is the name of the backend.  The exporter uses `org-lparse-get'
| and retrieves the backend-specific callback by querying for
| ENTITY-CONTROL and ENTITY-FORMAT variables.
| 
| For the sake of illustration, the html backend implements
| `org-xhtml-get'.  It returns
| `org-xhtml-entity-control-callbacks-alist' and
| `org-xhtml-entity-format-callbacks-alist' as the values of
| ENTITY-CONTROL and ENTITY-FORMAT settings.
| 
| [back]
`----

[2] Download the test.org file in the link below
http://repo.or.cz/w/org-mode/org-jambu.git/blob_plain/HEAD:/contrib/odt/tests/

This is the unit test file that I used for developing the exporter. It
is a GOOD starting point and should give reasonably a COMPREHENSIVE
coverage.



-- 



reply via email to

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