From: Jambunathan K <kjambunathan@gmail.com>
To: Paul Sexton <psexton.2a@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Markdown export (using org-export-generic)
Date: Thu, 18 Aug 2011 03:56:27 +0530 [thread overview]
Message-ID: <818vqrr7xo.fsf@gmail.com> (raw)
In-Reply-To: <loom.20110817T231512-432@post.gmane.org> (Paul Sexton's message of "Wed, 17 Aug 2011 21:16:16 +0000 (UTC)")
Paul Sexton <psexton.2a@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.
--
next prev parent reply other threads:[~2011-08-17 22:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-17 2:20 Markdown export (using org-export-generic) Paul Sexton
2011-08-17 2:38 ` Jambunathan K
2011-08-17 21:16 ` Paul Sexton
2011-08-17 22:26 ` Jambunathan K [this message]
2011-08-17 22:49 ` Jambunathan K
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=818vqrr7xo.fsf@gmail.com \
--to=kjambunathan@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=psexton.2a@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).