Copy org.py to a tool directory and load as usual:
def configure(cfg):
cfg.load("org", tooldir=".")
def build(bld):
bld.load("org", tooldir=".")
Org source files may then be registered for export to one or more output formats (currently just HTML and PDF).
bld(features="org2html org2pdf", source="myfile.org")
The output file will be named after the source file unless a target is given:
bld(features="org2pdf", source="myfile.org",
target="myfile-different-name.pdf")
The target normally will be placed in the build directory but may be placed in the source.
a = bld.path.find_resource("a.org")
ahtml = a.parent.make_node("a.html")
bld(features="org2html", source=a, target=ahtml)
The target file name will overrule but otherwise be compatible with an org source that specifies an export file name.
#+export_file_name: another-name
An org source file is scanned so that #+include:
lines add
dependencies on the included files.
Emacs is used to perform the export. The emacs
program will be
located. To use a specific Emacs:
$ EMACS=/path/to/your/bin/emacs waf configure