From a5acb9a3f24f635df37467bf0e16b7802d826189 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 23 Feb 2026 21:11:58 -0500 Subject: [PATCH] README: convert to reStructuredText --- README => README.rst | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) rename README => README.rst (58%) diff --git a/README b/README.rst similarity index 58% rename from README rename to README.rst index c184bce..a36ccec 100644 --- a/README +++ b/README.rst @@ -1,17 +1,21 @@ -== What this is == +What this is +============ Nagios-mode is an Emacs mode for editing Nagios configuration files. Nagios is monitoring software that is configured via plain-text -(*.cfg) files. Those configuration files have a C-like syntax, and a +(``*.cfg``) files. Those configuration files have a C-like syntax, and a bunch of special keywords. Witin Emacs, nagios-mode will apply syntax highlighting to them, possibly alerting you to the fact that you have done something wrong, and making your buffers look pretty in any case. -== How to install it == +How to install it +================= -Stick nagios-mode.el somewhere, and add that place to your Emacs load -path. For example, +Stick *nagios-mode.el* somewhere, and add that place to your Emacs +load path. For example, + +.. code-block:: emacs-lisp (setq load-path (append (list "~/.home/emacs/modes/nagios-mode/") @@ -20,9 +24,13 @@ path. For example, is how I do it. With that in your load path, you just have to add nagios-mode to your auto-load list, +.. code-block:: emacs-lisp + (autoload 'nagios-mode "nagios-mode" nil t) -And tell Emacs to use it automatically when editing *.cfg files, +And tell Emacs to use it automatically when editing ``*.cfg`` files, + +.. code-block:: emacs-lisp (setq auto-mode-alist (append (list '("\\.cfg$" . nagios-mode)) @@ -32,15 +40,16 @@ which works great so long as you don't edit any other *.cfg files that have a different syntax. -== How it works == +How it works +============ The macros and object definitions are parsed from the Nagios source -code. Object definitions are found within xdata/xodtemplate.h, while -the macros are cleverly hidden within include/macros.h. Once they have -been parsed, they are cut and pasted in to nagios-mode.el. +code. Object definitions are found within *xdata/xodtemplate.h*, while +the macros are cleverly hidden within *include/macros.h*. Once they +have been parsed, they are cut and pasted in to *nagios-mode.el*. The directives are a bit tricker. They too are parsed from the Nagios -source (xdata/xodtemplate.c), but not all of the names map nicely to +source (*xdata/xodtemplate.c*), but not all of the names map nicely to internal C variables, so there's no explicit list of them. Instead we try to piece together the valid names based on what Nagios's config parser is looking for. It's possible that some have been overlooked. @@ -48,7 +57,9 @@ parser is looking for. It's possible that some have been overlooked. The helper scripts for this can be found in the "utils" directory. -== Bugs et cetera == +Bugs etc. +========= -Send all bug reports, feature requests, and unprompted criticism to -michael@orlitzky.com. +Send bug reports, feature requests, and unprompted criticism to +michael@orlitzky.com, or report them on `Codeberg +`_. -- 2.51.0