GIT REPO

git clone http://www.coincoin169.org/git/vomitpage.git vomitpage

NAME

vomitpage - generate manpages and HTML pages

SYNOPSIS

vomitpage [ --man | --html | --latex ] [ FILE ]

DESCRIPTION

Create manpages, HTML pages or LaTeX pages. vomitpage reads FILE and writes the document on the standard output. Several files can be specified. With no FILE or when FILE is -, then read standard input.

--man

Generate roff code. Note that the page title (.TH macro, see groff_man(7) for more details) is not generated by vomitpage. You shall put it manually.

--html

Generate HTML code. Note that the HTML elements HTML, BODY are not generated by vomitpage. You shall put them in the document manually.

--latex

Generate LaTeX code. Note that the LaTeX commands \documentclass, \begin{document} and \end{document} are not generated by vomitpage. You shall put them in the document manually.

If no --man, --html or --latex is specified, then roff code is generated by default.

EXAMPLE

vomitpage --man file1 file2

Read from file1, then file2 and generates roff code.

vomitpage file1

Read from file1 and generates roff code.

vomitpage --html file1

Read from file1 and generates HTML code.

vomitpage file1 - file2

Read from file1, then standard input, then file2 and generates roff code.

FORMAT OF INPUT

The input format is very simple: `verbatim` is verbatim, *emphasized* is emphasized. Characters can be escaped: \` is `, \* is *, \= is =, \# is #, more generally \c will give c where c is a single byte character. Long lines can be cut with a trailing \.

==section title==

===subsection title===

##
comments
comments
##

``
verbatim text
ideal for code listing
``

A itemized list is following:

> item 1
  indented text for item 1.
  ideal for options listing or examples.

> item 2
  some text here

Next we have a standard list.

- this is thte first item

- item 2

  - you can have nested items

  - nested item 2

- item 3

This a normal paragraph with some text. Lorem ipsum dolor sit amet,
consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua.

This is another normal paragraph. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat.

Paragraphs are separated by one or more consecutive empty lines. Note that the input is expected to be ASCII(7). The behavior of vomitpage is undefined when input is not ASCII.

NESTEDNESS

Lists can be nested. To determine whether an item is nested into another vomitpage counts the number of spaces contained within the indentation. For example

- item1

  - item2

- item3

item2 is nested within item1 because there is 2 spaces before the - of item2. Indentations must be multiples of 2. If there are bad indentations in the input, vomitpage will do its best to warn you. Warnings do not stop the execution of vomitpage. The maximum nested depth is 10. If vomitpage finds deeper nested items, an error will be produce and the execution will stop.

OUTPUT

vomitpage supports currently 3 output formats: HTML, manpages and LaTeX. New output formats can be easily added.

MANPAGE OUTPUT

The .TH macros is not generated by vomitpage. For example the manpage you are reading has been generated with the following:

$ vomitpage --man --gpl "This file is part of vomitpage" \
> "Guillaume Quintin" > vomitpage.1
$ echo ".TH vomitpage 1" >> vomitpage.1
$ vomitpage --man vomitpage.man >> vomitpage.1

where vomitpage.man contains the text.

HTML OUTPUT

The HTML tags HTML, BODY, HEAD and TITLE are not generated by vomitpage. For example an HTML page can be generated with the following:

$ echo "<html><head>" > out.html
$ echo "<title>your title</title>" >> out.html
$ echo "</head><body>" >> out.html
$ vomitpage --html source.txt >> out.html
$ echo "</body></html>" >> out.html

where source.txt contains the text. You can also add Cascading Style Sheets to your HTML page.

LATEX OUTPUT

The LaTeX commands \documentclass{...}, \begin{document} and \end{document} are not generated by vomitpage. You can generate complete LaTeX documents with the following

$ echo "\\documentclass{article}" > out.tex
$ echo "\\begin{document}" >> out.tex
$ vomitpage --latex source.txt >> out.tex
$ echo "\\end{document}" >> out.tex

where source.txt contains the text. It is recommanded that you use the T1 fonc encoding.

\usepackage[T1]{fontenc}

EXAMPLE OF INPUT

A simple example:

==NAME==

example - is an example

==SYNOPSIS==

This is an example of cctxt.
Some `verbatim text` here and some *emphasized text* here.

==DESCRIPTION==

The description here.

> -1
  Explanation of option 1 here.

  - A nested list to better

  - explain the option.

> -2
  Explanation of option 2 here.

> -a
  Explanation of option a here.

> -b
  Explanation of option b here.

===subsection 1 here===

Text here

===subsection 2 here===

Text here

AUTHOR

Written by Guillaume Quintin (coincoin169@gmail.com).

SEE ALSO

roff(7), groff_man(7), groff_char(7), ASCII(7), UTF-8(7)