]> git.madduck.net Git - code/mailplate.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

add manpage
authormartin f. krafft <madduck@madduck.net>
Sun, 30 Sep 2007 17:49:23 +0000 (18:49 +0100)
committermartin f. krafft <madduck@madduck.net>
Sun, 7 Oct 2007 16:11:35 +0000 (17:11 +0100)
Makefile [new file with mode: 0644]
mailplate.xml [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..14359b2
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,13 @@
+DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
+XP=xsltproc -''-nonet
+
+%.1: %.xml
+       $(XP) $(DB2MAN) $<
+
+man: mailplate.1
+       man -l $<
+.PHONY: man
+
+clean:
+       rm -f mailplate.1
+.PHONY: clean
diff --git a/mailplate.xml b/mailplate.xml
new file mode 100644 (file)
index 0000000..7e7072c
--- /dev/null
@@ -0,0 +1,305 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+
+<!--
+
+Process this file with an XSLT processor: `xsltproc \
+-''-nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl manpage.dbk'.  A manual page
+<package>.<section> will be generated.  You may view the
+manual page with: nroff -man <package>.<section> | less'.  A
+typical entry in a Makefile or Makefile.am is:
+
+DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl
+XP=xsltproc -''-nonet
+
+manpage.1: manpage.dbk
+        $(XP) $(DB2MAN) $<
+    
+The xsltproc binary is found in the xsltproc package.  The
+XSL files are in docbook-xsl.  Please remember that if you
+create the nroff version in one of the debian/rules file
+targets (such as build), you will need to include xsltproc
+and docbook-xsl in your Build-Depends control field.
+
+-->
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>Martin F.</firstname>">
+  <!ENTITY dhsurname   "<surname>Krafft</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>September 30, 2007</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>1</manvolnum>">
+  <!ENTITY dhemail     "<email>madduck@madduck.net</email>">
+  <!ENTITY dhusername  "martin f. krafft">
+  <!ENTITY dhucpackage "<refentrytitle>MAILPLATE</refentrytitle>">
+  <!ENTITY dhpackage   "mailplate">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <copyright>
+      <year>2007</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose>reformat mail drafts according to templates</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+      <group>
+        <arg choice="plain">
+         <group>
+           <arg choice="plain"><option>--auto</option></arg>
+           <arg choice="plain"><option>-a</option></arg>
+         </group>
+        </arg>
+        <arg choice="plain">
+         <group>
+           <arg choice="plain"><option>--menu</option></arg>
+           <arg choice="plain"><option>-m</option></arg>
+         </group>
+        </arg>
+      </group>
+      <group>
+        <arg choice="plain">
+          <group>
+           <arg choice="plain"><option>--new</option></arg>
+           <arg choice="plain"><option>-n</option></arg>
+          </group>
+          <arg choice="plain">
+          </arg>
+          <group>
+           <arg choice="plain"><option>--editor</option></arg>
+           <arg choice="plain"><option>-e</option></arg>
+          </group>
+        </arg>
+      </group>
+      <group>
+       <arg choice="plain"><option>--keep-unknown</option></arg>
+       <arg choice="plain"><option>-k</option></arg>
+      </group>
+      <group>
+       <arg choice="plain"><option>--verbose</option></arg>
+       <arg choice="plain"><option>-v</option></arg>
+      </group>
+      <group>
+       <arg choice="plain"><option>--debug</option></arg>
+       <arg choice="plain"><option>-d</option></arg>
+      </group>
+      <arg choice="plain"><replaceable>message file</replaceable></arg>
+    </cmdsynopsis>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+      <group>
+        <arg choice="plain">
+         <group>
+           <arg choice="plain"><option>--auto</option></arg>
+           <arg choice="plain"><option>-a</option></arg>
+         </group>
+        </arg>
+        <arg choice="plain">
+         <group>
+           <arg choice="plain"><option>--menu</option></arg>
+           <arg choice="plain"><option>-m</option></arg>
+         </group>
+        </arg>
+      </group>
+      <group>
+       <arg choice="plain"><option>--keep-unknown</option></arg>
+       <arg choice="plain"><option>-k</option></arg>
+      </group>
+      <group>
+       <arg choice="plain"><option>--verbose</option></arg>
+       <arg choice="plain"><option>-v</option></arg>
+      </group>
+      <group>
+       <arg choice="plain"><option>--debug</option></arg>
+       <arg choice="plain"><option>-d</option></arg>
+      </group>
+      <arg choice="plain"><replaceable>&lt; message data</replaceable></arg>
+    </cmdsynopsis>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+      <group>
+       <arg choice="plain"><option>--help</option></arg>
+       <arg choice="plain"><option>-h</option></arg>
+      </group>
+    </cmdsynopsis>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+      <group>
+       <arg choice="plain"><option>--version</option></arg>
+       <arg choice="plain"><option>-V</option></arg>
+      </group>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para><command>&dhpackage;</command> is a programme that reformats mail
+      drafts according to a given template. The template may be specified on
+      the command line, but mailplate can also use control information from
+      the template files to automatically select an appropriate template
+      (<option>--auto</option>). A selection menu feature is planned
+      (<option>--menu</option>). </para>
+
+    <para> Applying a template means obtainined select data from an existing
+      mail message (unless <option>--new</option> is specified) and to fill it
+      into appropriate slots in the template. Messages are processed in three
+      parts: headers, body, and signature. </para>
+
+    <para> When <option>--new</option> is given, an empty instantiation of the
+      template is written to stdout. At the moment, <option>--new</option>
+      cannot be combined with <option>--editor</option>.</para>
+
+    <para> The template can define two types of headers: mandatory and
+      preservatory. Mandatory headers take precedence over headers in the
+      existing message and thus overwrite them. Preservatory headers instruct
+      mailplate to port their data from the existing mail message. Headers in
+      the existing message but not defined in the template are dropped, unless
+      <option>--keep-unknown</option> is given. </para>
+
+    <para> Body and signature are separated by '-- '. If this sentinel is not
+      found, no signature is extracted. Templates can be interpolated and data
+      filled into slots. Helper slots are filled with the output of helper
+      commands (which must be defined in the configuration), environment
+      variable slots are just that, and mail variable slots can be filled with
+      data obtained by running regexps or commands over the message. </para>
+
+    <para> This script can be run in multiple ways: </para>
+
+    <itemizedlist>
+      <listitem><para> As a filter, it applies a template to data from stdin
+          and writes the result to stdout. </para></listitem>
+
+      <listitem><para> Given a file, it modifies the file, unless it cannot
+          write to the file, in which case it writes to stdout.
+          </para></listitem>
+
+      <listitem><para> When <option>--editor</option> is passed, the script
+          spawns <command>sensible-editor</command> on the result. It may thus
+          be used as the editor for your mail user agent. </para></listitem>
+
+    </itemizedlist>
+
+  </refsect1>
+
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <para> These programs follow the usual &gnu; command line syntax, with
+      long options starting with two dashes (`--'): </para>
+
+    <variablelist>
+      <varlistentry>
+        <term><option>--auto</option>,
+         <option>-a</option>
+        </term>
+        <listitem>
+         <para>Turn on template auto-discovery.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--menu</option>,
+         <option>-m</option>
+        </term>
+        <listitem>
+         <para>Choose from a list of templates (not yet implemented)</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--new</option>,
+         <option>-n</option>
+        </term>
+        <listitem>
+         <para>Create a new message.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--editor</option>,
+         <option>-e</option>
+        </term>
+        <listitem>
+         <para>Spawn editor once template is applied.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--keep-unknown</option>,
+         <option>-k</option>
+        </term>
+        <listitem>
+         <para>Preserve mail headers not specified in template.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--verbose</option>,
+         <option>-v</option>
+        </term>
+        <listitem>
+         <para>Write informational messages to stderr.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>--debug</option>,
+         <option>-d</option>
+        </term>
+        <listitem>
+         <para>Start a debugger after initialisation.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term>
+         <option>--help</option>,
+         <option>-h</option>
+       </term>
+       <listitem>
+         <para>Show summary of options.</para>
+       </listitem>
+      </varlistentry>
+      <varlistentry>
+       <term>
+         <option>--version</option>,
+         <option>-V</option>
+       </term>
+       <listitem>
+         <para>Show version of program.</para>
+       </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>SEE ALSO</title>
+    <para>/usr/share/doc/mailplate/README</para>
+  </refsect1>
+
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &dhemail; with help
+      from Carl Fürstenberg.</para>
+  </refsect1>
+</refentry>
+