Paul Sexton <psexton...@gmail.com> 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. --