]> granicus.if.org Git - fortune-mod/blob - fortune-mod/util/randstr.docbook5.xml
appveyor fix #1: better windows/etc. compat
[fortune-mod] / fortune-mod / util / randstr.docbook5.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- lifted from man+troff by doclifter -->
3 <refentry xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en' xml:id='randstrman'>
4
5 <!-- Randstr: grab a random text string from a specified text file
6 Amy A. Lewis, October, 1995 -->
7
8 <refmeta>
9 <refentrytitle>RANDSTR</refentrytitle>
10 <manvolnum>1</manvolnum>
11 <refmiscinfo class='source'>October 1995</refmiscinfo>
12 <refmiscinfo class='manual'>Linux hackery</refmiscinfo>
13 </refmeta>
14 <refnamediv>
15 <refname>randstr</refname>
16 <refpurpose>fetch a random text string from a specified file</refpurpose>
17 </refnamediv>
18 <!-- body begins here -->
19
20 <refsect1 xml:id='synopis'><title>SYNOPIS</title>
21 <para><emphasis role='strong' remap='B'>randstr </emphasis><emphasis remap='I'>filename</emphasis></para>
22 </refsect1>
23
24 <refsect1 xml:id='description'><title>DESCRIPTION</title>
25 <para>In essence,
26 <emphasis role='strong' remap='B'>randstr</emphasis>
27 is a stripped-down, minimalist version of the popular
28 <citerefentry><refentrytitle>fortune</refentrytitle><manvolnum>6</manvolnum></citerefentry>
29 program.</para>
30
31 <para>It reads files with the same structure as the fortunes databases, and
32 displays a random string.</para>
33
34 <refsect2 xml:id='usage'><title>Usage</title>
35 <para><emphasis role='strong' remap='B'>randstr</emphasis>
36 might be used, with a database of signatures created with a text editor
37 and the
38 <citerefentry><refentrytitle>strfile</refentrytitle><manvolnum>8</manvolnum></citerefentry> and <citerefentry><refentrytitle>unstr</refentrytitle><manvolnum>8</manvolnum></citerefentry>
39 utilities, to randomly change the
40 <emphasis remap='I'>$HOME/.signature</emphasis>
41 file.  To do so, create the necessary database as, for example,
42 <emphasis remap='I'>signatures</emphasis> and <emphasis remap='I'>signatures.dat</emphasis>
43 in the home directory, and add the following line to
44 <markup>.profile</markup> or <markup>.login</markup>:</para>
45   <blockquote remap='RS'>
46 <para><emphasis role='strong' remap='B'>randstr </emphasis><emphasis remap='I'>signatures</emphasis>
47 &gt;<markup>.signature</markup>
48   </para></blockquote> <!-- remap='RE' -->
49
50 <para>As superuser, a similar sort of thing could be placed in the
51 <citerefentry><refentrytitle>Pnews</refentrytitle><manvolnum>1</manvolnum></citerefentry> or <citerefentry><refentrytitle>Rnmail</refentrytitle><manvolnum>1</manvolnum></citerefentry>
52 scripts, although it should certainly test to be certain that the files
53 exist, and creating the files of signatures might require a good deal of
54 help for a lot of users.</para>
55
56 <para>Also as superuser, one might use
57 <emphasis role='strong' remap='B'>randstr</emphasis>
58 with a shell or
59 <emphasis role='strong' remap='B'>Perl</emphasis>
60 script to read the
61 <emphasis remap='I'>etc/passwd</emphasis>
62 database and create a
63 <emphasis remap='I'>strfile</emphasis>
64 type database, and use this database to run a monthly lottery.</para>
65 </refsect2>
66 </refsect1>
67
68 <refsect1 xml:id='bugs'><title>BUGS</title>
69 <para>None known.</para>
70 </refsect1>
71
72 <refsect1 xml:id='see_also'><title>SEE ALSO</title>
73 <para><citerefentry><refentrytitle>fortune</refentrytitle><manvolnum>6</manvolnum></citerefentry>, <citerefentry><refentrytitle>strfile</refentrytitle><manvolnum>1</manvolnum></citerefentry></para>
74 </refsect1>
75 </refentry>
76