This is the official manual for the latest Org-mode release.
Org mode features, including working with source code facilities can be invoked from the command line. This enables building shell scripts for batch processing, running automated system tasks, and expanding Org mode's usefulness.
The sample script shows batch processing of multiple files using
#!/bin/sh # -*- mode: shell-script -*- # # tangle files with org-mode # DIR=`pwd` FILES="" # wrap each argument in the code required to call tangle on it for i in $@; do FILES="$FILES \"$i\"" done emacs -Q --batch \ --eval "(progn (require 'org)(require 'ob)(require 'ob-tangle) (mapc (lambda (file) (find-file (expand-file-name file \"$DIR\")) (org-babel-tangle) (kill-buffer)) '($FILES)))" 2>&1 |grep -i tangled