#!/usr/bin/emacs --script ;;; e2ansi-cat --- Output syntax highlighted versions using ANSI sequences ;; -*- emacs-lisp -*- ;; Copyright (C) 2014 Anders Lindgren ;; Author: Anders Lindgren ;; Keywords: faces, languages ;; Created: 2014-12-07 ;; URL: https://github.com/Lindydancer/e2ansi ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . ;;; Commentary: ;; This is a command line tool using Emacs in batch mode to render a ;; syntax highlighted version of the input files using ANSI escape ;; sequences. ;; ;; Usage: ;; ;; e2ansi-cat [options] file ... ;; ;; See the file `e2ansi.el' for more information. ;;; Code: ;; `file-truename' enables people to symlink to this file. (load (concat (file-name-directory (file-truename load-file-name)) "../e2ansi.el") nil :nomessage) (setq e2ansi-batch-help-text "\ Syntax highlight files using ANSI escape sequences using Emacs as the engine. See the file `e2ansi.el' for more information. Usage: emacs [...Emacs options...] -l bin/e2ansi-cat [options] file ... Or: e2ansi-cat [options] file ... When `file' is `-', standard input is read.") (if (null command-line-args-left) (e2ansi-batch-usage) (e2ansi-batch-convert)) ;;; e2ansi-cat ends here.