aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile9
-rw-r--r--doc/ottolangy.151
-rw-r--r--doc/ottolangy.1.txt30
3 files changed, 90 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 1195476..262b917 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,8 @@ SOURCES := $(shell find src -name '*.rs')
DEBUG_PRODUCT := target/debug/ottolangy
+MAN_PAGE := doc/ottolangy.1
+
$(DEBUG_PRODUCT): $(SOURCES)
cargo build
@@ -25,3 +27,10 @@ $(DEBUG_PRODUCT): $(SOURCES)
.PHONY: test
test: $(DEBUG_PRODUCT)
prove -v -I./t
+
+
+.PHONY: doc
+doc: $(MAN_PAGE)
+
+$(MAN_PAGE): doc/ottolangy.1.txt
+ a2x --no-xmllint --format manpage $<
diff --git a/doc/ottolangy.1 b/doc/ottolangy.1
new file mode 100644
index 0000000..f78c078
--- /dev/null
+++ b/doc/ottolangy.1
@@ -0,0 +1,51 @@
+'\" t
+.\" Title: ottolangy
+.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
+.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
+.\" Date: 03/20/2021
+.\" Manual: \ \&
+.\" Source: \ \&
+.\" Language: English
+.\"
+.TH "OTTOLANGY" "1" "03/20/2021" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+ottolangy \- Set Mutt\*(Aqs attribution format based on the input language
+.SH "SYNOPSIS"
+.sp
+ottolangy
+.SH "DESCRIPTION"
+.sp
+Reads an email from standard input and writes a muttrc file setting the \fB$attribution\fR format string based on the lanugage of the input email\&.
+.SH "CAVEATS"
+.sp
+Attribution format strings are currently hard\-coded\&. Only English and French are supported\&. If the language isn\(cqt recognised as French, attribution defaults to English\&.
+.SH "FILES"
+.PP
+\fI/etc/ottolangy/muttrc\fR
+.RS 4
+Override Mutt\(cqs reply bindings, wrapping them in a call to Ottolangy\&.
+.RE
+.PP
+\fI~/\&.local/share/ottolangy/attribution\&.muttrc\fR
+.RS 4
+This file is generated on each run and sourced by Ottolangy\(cqs muttrc to set the appropriate attribution\&.
+.RE
diff --git a/doc/ottolangy.1.txt b/doc/ottolangy.1.txt
new file mode 100644
index 0000000..4c797c7
--- /dev/null
+++ b/doc/ottolangy.1.txt
@@ -0,0 +1,30 @@
+ottolangy(1)
+============
+
+NAME
+----
+ottolangy - Set Mutt's attribution format based on the input language
+
+SYNOPSIS
+--------
+ottolangy
+
+DESCRIPTION
+-----------
+Reads an email from standard input and writes a muttrc file setting the
+*$attribution* format string based on the lanugage of the input email.
+
+CAVEATS
+-------
+Attribution format strings are currently hard-coded. Only English and French
+are supported. If the language isn’t recognised as French, attribution
+defaults to English.
+
+FILES
+-----
+'/etc/ottolangy/muttrc'::
+ Override Mutt's reply bindings, wrapping them in a call to Ottolangy.
+
+'~/.local/share/ottolangy/attribution.muttrc'::
+ This file is generated on each run and sourced by Ottolangy's muttrc to
+ set the appropriate attribution.