]> git.tuebingen.mpg.de Git - tfortune.git/blob - tfortune.suite
initial
[tfortune.git] / tfortune.suite
1 # SPDX-License-Identifier: GPL-2.0
2
3 [suite tfortune]
4 [supercommand tfortune]
5         purpose = fortune cookies with tags
6         [description]
7                 Like fortune(1), tfortune prints out a random epigram. However,
8                 the epigrams in the input files must contain additional information,
9                 called "tags". The program picks only epigrams which are considered
10                 "admissible" based on the tags and the command line options.
11         [/description]
12         non-opts-name = <file>...
13         [option accept]
14                 short_opt = a
15                 summary = epigrams which contain this tag are admissible
16                 arg_info = required_arg
17                 arg_type = string
18                 typestr = tag
19                 flag multiple
20                 [help]
21                         This option may be given multiple times.
22                 [/help]
23         [option reject]
24                 short_opt = r
25                 summary = epigrams which contain this tag are inadmissible
26                 arg_info = required_arg
27                 arg_type = string
28                 typestr = tag
29                 flag multiple
30                 [help]
31                         Like --accept, this may be given multiple times. See the discussion
32                         below how --accept and --reject interact.
33                 [/help]
34         [option statistics]
35                 short_opt = s
36                 summary = print tags found in input files
37                 [help]
38                         If this option is specified, tfortune does not print any
39                         epigrams. Instead, it prints all tags found in the given input file(s),
40                         together with how many time each tag occurred. The list is sorted by
41                         occurence count.
42                 [/help]
43         [option accept-reject]
44                 summary = Admissible epigrams
45                 flag ignored
46                 [help]
47                         tfortune picks a random epigram from the set of admissible epigrams,
48                         which is computed as follows. If neither --accept nor --reject are
49                         specified, all epigrams are considered admissible. If only --accept
50                         is specified, epigrams with at least one tag given as an argument to
51                         --accept are admissible, all others are inadmissible. Similarly, if
52                         only --reject is specified, epigrams with at least one tag given as an
53                         argument to --reject are inadmissible, all others are admissible. If
54                         both --accept and --reject are specified, an epigram is admissible
55                         if and only if it has at least one tag which is given as an argument
56                         to --accept but no tag which is given as an argument to --reject.
57                 [/help]
58         [option format]
59                 summary = Input file format
60                 flag ignored
61                 [help]
62                         Input files may contain arbitrary many epigrams. The end of each
63                         epigram must be marked with a "tag" line. The tag line consists of
64                         four dashes, a space character, and a comma separated list of tags.
65                         Tags may span multiple words, but no comma is allowed.
66                 [/help]
67
68 [section example]
69 The following is an example input file for tfortune. It contains a single epigram
70 with two tags.
71
72 .RS
73 .EX
74 Anyone who attempts to generate random numbers by deterministic means
75 is, of course, living in a state of sin.          -- John von Neumann
76 ---- math,religion
77 .EE
78 .RE
79 [/section]
80
81 [section copyright]
82         Written by Andre Noll
83         .br
84         Copyright (C) 2016-present Andre Noll
85         .br
86         License: GNU GPL version 3
87         .br
88         This is free software: you are free to change and redistribute it.
89         .br
90         There is NO WARRANTY, to the extent permitted by law.
91         .br
92         Report bugs to
93         .MT <maan@tuebingen.mpg.de>
94         Andre Noll
95         .ME
96         .br
97         Homepage:
98         .UR http://people.tuebingen.mpg.de/~maan/tfortune/
99         .UE
100 [/section]
101 [section see also]
102         .BR fortune (6)
103 [/section]