Skip to content

Instantly share code, notes, and snippets.

@oyvholm
Created April 25, 2010 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oyvholm/378643 to your computer and use it in GitHub Desktop.
Save oyvholm/378643 to your computer and use it in GitHub Desktop.
Example of US date formats in manpages generated by DocBook. :(

This is a demo of the date format in manpages generated by DocBook.

'\" t
.\" Title: dft
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 04/25/2010
.\" Manual: [FIXME: manual]
.\" Source: [FIXME: source]
.\" Language: English
.\"
.TH "DFT" "1" "04/25/2010" "[FIXME: source]" "[FIXME: manual]"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
dft \- Date format test
.SH "DESCRIPTION"
.PP
This is a test of the generated date format\&.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>dft</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /></head><body><div xml:lang="en" class="refentry" title="dft" lang="en"><a id="dft"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>dft — Date format test</p></div><div class="refsect1" title="Description"><a id="dft.description"></a><h2>Description</h2><p>This is a test of the generated date format.</p></div></div></body></html>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4//EN" "../../../Tools/dtd/docbook-4.4/docbookx.dtd">
<refentry id="dft" lang="en">
<!-- File ID: df39b520-5094-11df-a45b-90e6ba3022ac -->
<refmeta>
<refentrytitle>dft</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refnamediv>
<refname>dft</refname>
<refpurpose>Date format test</refpurpose>
</refnamediv>
<refsect1 id="dft.description">
<title>Description</title>
<para>This is a test of the generated date format.</para>
</refsect1>
<!-- vim: set tw=72 ts=2 sts=2 sw=2 et fo=tcqw fenc=UTF-8 : -->
</refentry>
#!/usr/bin/make
#=======================================================================
# Makefile for http://gist.github.com/378643
# File ID: e1f98eac-fafa-11dd-97ce-000475e441b9
#=======================================================================
dbfile=dft.xml
htmlfile=dft.html
manpage=dft.1
all:
$(MAKE) $(manpage)
$(MAKE) $(htmlfile)
$(manpage): $(dbfile)
xsltproc --output $(manpage) ~/xsl/manpages/docbook.xsl $(dbfile)
$(htmlfile): $(dbfile)
xsltproc --output $(htmlfile) ~/xsl/xhtml/docbook.xsl $(dbfile)
valid:
xmllint --valid --noout $(dbfile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment