vsdfml

Package: WA2L/edrc 1.5.57
Section: Library Commands (3)
Updated: 23 May 2021
Index Return to Main Contents

 

NAME

vsdfml - very simple document formatting language

 

SYNOPSIS

edrc/lib/vsdfml [ -h ]

vsdfml filename [ format ]

 

AVAILABILITY

WA2L/edrc

 

DESCRIPTION

The purpose of vsdfml is to highlight documentation files on terminal output when writing recovery scripts whose purpose is to display information and not to execute commands.

To benefit from vsdfml you have to add it to the magic key of your information "recovery script": #!/bin/sh vsdfml .

Lines starting with a hash ( # ) are considered as comments and are not printed. Repetitive empty lines are reduced to one line.

All text lines beginning in the first column are set as bold font, all other text lines are set in normal font.

The text is not formatted to a certain number of columns, all text output is done as typed, this enables you to include also some ASCII graphics in the documentation.

There are some markup tags defined to set text in bold, underlined, etc. font, see section MARKUP TAGS for the markup tags available.

 

OPTIONS

-h
usage message.

filename
documentation file filename. When calling vsdfml in the magic key as shown above and in the example below, do not specify this option, it contains the filename automatically. To feed vsdfml with documentation text thru a pipe via stdin, use the pseudo file name -.

format
Optional output format identifier. If this option is not specified, the output is formatted for manual page output (MAN).

TROFF
the output is a man-troff format body (without header).

MAN
format the output as manual page and display it using man.

TTY
format text for terminal output.

MEDIAWIKI
the output is in MediaWiki markup.

 

MARKUP TAGS

<b>Text</b>
set Text in bold font.

<u>Text</u>
set Text in underlined font. This text is printed italic in HTML output.

<i>Text</i>
set Text in underlined font. This text is printed italic in HTML output.

<so>Text</so>
set Text in stamped out font (inverse) when using the TTY output. This text is printed bold in HTML and MAN output.

 

ENVIRONMENT

$TERM
terminal emulation of the current terminal. If this setting is not set correctly the whole documentation is printed, but certain font formatting (bold, underline, ...) might not be visible.

 

EXIT STATUS

0
no error.

4
usage listed.

11
a temporary directory could not be claimed or created in /tmp. Check the system temporary directory /tmp if you get this error, it is an indicator of system intrusion.

 

FILES

/tmp
temporary directory.

/usr/share/terminfo
terminal capability database on systems with terminfo.

/etc/termcap
terminal capability database on systems with termcap.

 

EXAMPLES

1) Example of a documentation menu point.

It might makes sense to add also some doc tags (D:) to inform the user about the purpose of the menu point when calling the doc contributed command on it, see contrib.doc(1m).

    #!/usr/bin/env vsdfml
    #
    # 0:info_contacts - Contact Information
    #
    # [00] 22.05.2007 CWa   Initial Version
    # [01] 03.06.2007 CWa   ++  
    #
    # D: This is a documentation menu point, to view
    # D: the documentation, start it.
    #

    PRIMARY LOCATION INFORMATION SHEET (PLIS)

        Department .......... : <b>SMM (System Management Midrange)</b>

        Country ............. : Switzerland
        Timezone ............ : MET

        Office Hours ........ : 08:00 - 17:00 / Monday - Friday
        On Call Hours ....... : 17:00 - 08:00 / Monday - Friday
                                00:00 - 24:00 / Saturday - Sunday

        EMail Address ....... : smm.support@acme.com
        (Group)

        Phone Number ........ : +01 555 1234 5600
        (during Office Hours)   
        Phone Number ........ : +01 555 1234 5600
        (on Call Hours) 

    DIRECT ACME CONTACTS

        <u>Storage Management:</u>
        John Doe, john.doe@acme.com, +01 555 1234 5601
        Pete Miller, pete.miller@acme.com, +01 555 1234 5602

        <u>Database Administration:</u>
        Aaron Brown, aaron.brown@acme.com, +01 555 1234 5603
        Bill Haselnut, bill.haselnut@acme.com, +01 555 1234 5604

        <u>Unix System Administration:</u>
        Mike Green, mike.green@acme.com, +01 555 1234 5605
        Brandon Make, brandon.make@acme.com, +01 555 1234 5606

    :
    :

 

SEE ALSO

edrcintro(1), contrib.doc(1m), edrc(1m), tput(1)

 

NOTES

-

 

BUGS

-

 

AUTHOR

vsdfml was developed by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net . 

 

COPYRIGHT

Copyright © 2021 Christian Walther

This is free software; see edrc/doc/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
OPTIONS
MARKUP TAGS
ENVIRONMENT
EXIT STATUS
FILES
EXAMPLES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html using the manual pages.
Time: 00:14:33 GMT, March 08, 2025