Sprichwoerter 0.1 → 1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Sprichwoerter.gemspec +17 -0
- data/bin/proverbs +43 -2
- data/bin/sprichwoerter +48 -2
- data/doc/html/proverbs.html +472 -0
- data/doc/html/sprichwoerter.html +475 -0
- data/doc/man/proverbs.6.gz +0 -0
- data/doc/man/sprichwoerter.6.gz +0 -0
- data/doc/pdf/proverbs.pdf +0 -0
- data/doc/pdf/sprichwoerter.pdf +0 -0
- data/doc/rst/proverbs.rst +117 -0
- data/doc/rst/sprichwoerter.rst +123 -0
- data/lib/adder.rb +91 -0
- data/lib/argparser.rb +128 -0
- data/lib/color_output.rb +44 -0
- data/lib/liste_de.rb +31 -9
- data/lib/liste_en.rb +134 -86
- data/lib/log.conf +55 -0
- data/lib/logging.rb +193 -0
- data/lib/rearranging.rb +47 -0
- data/lib/sprichw/303/266rter.rb +178 -29
- data/lib/translating.rb +101 -0
- data/lib/translations +164 -0
- data/lib/user_input.rb +48 -0
- data/lib/version.rb +25 -0
- metadata +28 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8f5761df30602e53c43f4e3d258a7ef4a6ba26b3afc1fb1d40e8eca29b356054
|
4
|
+
data.tar.gz: 31590ef8d17779a0097e884e16ad92b560fe32a6734dbcc372116d45b9384e49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4e6311ce32fec4b6c5fc6e07b8a10d7e8a11272c43c5dda029c704b25c0a75d87ca048a8155aee1c47afb15acde8af35cda7931c036009a1f0df65d39a40726
|
7
|
+
data.tar.gz: 5cb81fd55b9b1d4b6af6ba3003e30b089652da5dc8641bc4b60192235ed68ea1bb7c2fe9bc0f8a2ff7368842e86150399d91d8f56c441a16ad6839ce3f093aed
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require_relative "lib/version"
|
2
|
+
require 'date'
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.version = VERSION
|
6
|
+
s.name = File.basename(__FILE__, '.gemspec')
|
7
|
+
s.date = Date.today.strftime('%F')
|
8
|
+
s.summary = SUMMARY
|
9
|
+
s.description = "Generates random, senseless proverbs by combining beginnings and endings of existing proverbs."
|
10
|
+
s.authors = ["Michael Uplawski"]
|
11
|
+
s.email = 'michael.uplawski@uplawski.eu'
|
12
|
+
s.files = %w~sprichwoerter proverbs~.collect{|f| 'bin/' << f} + %w~adder.rb color_output.rb argparser.rb rearranging.rb translating.rb translations logging.rb log.conf liste_de.rb sprichwörter.rb liste_en.rb version.rb user_input.rb~.collect{|f| 'lib/' << f} + %w~Sprichwoerter.gemspec~.collect{|f|f} + %w~html/proverbs.html html/sprichwoerter.html man/proverbs.6.gz man/sprichwoerter.6.gz pdf/proverbs.pdf pdf/sprichwoerter.pdf rst/proverbs.rst rst/sprichwoerter.rst~.collect{|f| 'doc/' << f}
|
13
|
+
s.homepage = 'http://rubygems.org'
|
14
|
+
s.executables = "sprichwoerter", "proverbs"
|
15
|
+
s.license = 'GPL-3.0'
|
16
|
+
s.required_ruby_version = '>= 2.5'
|
17
|
+
end
|
data/bin/proverbs
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
#encoding: UTF-8
|
3
3
|
=begin
|
4
4
|
/***************************************************************************
|
5
|
-
* ©2016-
|
5
|
+
* ©2016-2019, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
6
6
|
* *
|
7
7
|
* This program is free software; you can redistribute it and/or modify *
|
8
8
|
* it under the terms of the GNU General Public License as published by *
|
@@ -22,4 +22,45 @@
|
|
22
22
|
=end
|
23
23
|
|
24
24
|
require_relative '../lib/sprichwörter'
|
25
|
-
|
25
|
+
require_relative '../lib/adder'
|
26
|
+
require_relative '../lib/color_output'
|
27
|
+
|
28
|
+
SprichWoerter.new('en', ARGV)
|
29
|
+
=begin
|
30
|
+
if(ARGV.include?("-h") || ARGV.include?("--help"))
|
31
|
+
usage = %q~
|
32
|
+
Usage: proverbs
|
33
|
+
or proverbs list
|
34
|
+
or proverbs add singular "A watched pot" "never boils"
|
35
|
+
or proverbs add plural "cheaters" "never prosper"
|
36
|
+
|
37
|
+
The argument 'add' will add a new, original proverb to the list and write
|
38
|
+
all available English proverbs to
|
39
|
+
/home/user/.proverbs/liste_en.rb.
|
40
|
+
|
41
|
+
A backup-copy of the previous version is also created.
|
42
|
+
|
43
|
+
Proverbs, which are identical in all details will be recognized and
|
44
|
+
duplicates are avoided.
|
45
|
+
~
|
46
|
+
|
47
|
+
puts usage
|
48
|
+
exit 0
|
49
|
+
end
|
50
|
+
|
51
|
+
|
52
|
+
if(ARGV.include?("add") && ARGV.length > 3 )
|
53
|
+
ARGV.delete('add')
|
54
|
+
Adder.new('en', *ARGV)
|
55
|
+
elsif ARGV.include?("list")
|
56
|
+
SprichWoerter.new('en', :list)
|
57
|
+
exit true
|
58
|
+
elsif !ARGV.empty?
|
59
|
+
puts red("\nUnsuitable or insufficient arguments '" << bold(ARGV.join(', ') ) << "'.")
|
60
|
+
puts "Run with '-h' or '--help' to see the usage message."
|
61
|
+
puts
|
62
|
+
exit 0
|
63
|
+
else
|
64
|
+
SprichWoerter.new('en')
|
65
|
+
end
|
66
|
+
=end
|
data/bin/sprichwoerter
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
#encoding: UTF-8
|
3
3
|
=begin
|
4
4
|
/***************************************************************************
|
5
|
-
* ©2016-
|
5
|
+
* ©2016-2019, Michael Uplawski <michael.uplawski@uplawski.eu> *
|
6
6
|
* *
|
7
7
|
* This program is free software; you can redistribute it and/or modify *
|
8
8
|
* it under the terms of the GNU General Public License as published by *
|
@@ -22,4 +22,50 @@
|
|
22
22
|
=end
|
23
23
|
|
24
24
|
require_relative '../lib/sprichwörter'
|
25
|
-
|
25
|
+
require_relative '../lib/adder'
|
26
|
+
require_relative '../lib/color_output'
|
27
|
+
|
28
|
+
SprichWoerter.new('de', ARGV)
|
29
|
+
|
30
|
+
=begin
|
31
|
+
if(ARGV.include?("-h") || ARGV.include?("--hilfe"))
|
32
|
+
usage = %q~
|
33
|
+
Aufrufsyntax: sprichwoerter
|
34
|
+
oder sprichwoerter liste
|
35
|
+
oder sprichwoerter neu singular "Ein König mit Krone" "ist besser als ohne"
|
36
|
+
oder sprichwoerter neu plural "Hunde, die bellen" "beißen nicht"
|
37
|
+
|
38
|
+
Der Parameter 'neu' fügt ein neues, ursprüngliches Sprichwort in die Liste
|
39
|
+
hinzu und schreibt alle verfügbaren, deutschen Sprichwörter in die Datei
|
40
|
+
/home/user/.proverbs/liste_de.rb,
|
41
|
+
|
42
|
+
Außerdem wird bei jedem Schreiben in diese Datei eine Kopie der vorigen Version
|
43
|
+
erzeugt.
|
44
|
+
|
45
|
+
Buchstäblich identische Sprichwörter werden erkannt und Duplikate vermieden.
|
46
|
+
~
|
47
|
+
|
48
|
+
puts usage
|
49
|
+
exit 0
|
50
|
+
end
|
51
|
+
=end
|
52
|
+
|
53
|
+
=begin
|
54
|
+
if(ARGV.include?("neu") && ARGV.length > 3)
|
55
|
+
ARGV.delete('neu')
|
56
|
+
Adder.new('de', *ARGV)
|
57
|
+
elsif ARGV.include?("liste")
|
58
|
+
SprichWoerter.new('de', :list)
|
59
|
+
exit true
|
60
|
+
elsif !ARGV.empty?
|
61
|
+
puts red("\nUnbrauchbare oder zu wenig Programmargumente '" << bold(ARGV.join(', ') ) << "'.")
|
62
|
+
puts "Starten Sie das Programm mit '-h' oder '--hilfe', um die Kurzhilfe zu sehen."
|
63
|
+
puts
|
64
|
+
exit 0
|
65
|
+
else
|
66
|
+
#SprichWoerter.new('de', :create)
|
67
|
+
SprichWoerter.new(ARGV)
|
68
|
+
end
|
69
|
+
=end
|
70
|
+
#
|
71
|
+
#---test
|
@@ -0,0 +1,472 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
|
7
|
+
<title>Proverbs</title>
|
8
|
+
<style type="text/css">
|
9
|
+
|
10
|
+
/*
|
11
|
+
:Author: David Goodger (goodger@python.org)
|
12
|
+
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
|
13
|
+
:Copyright: This stylesheet has been placed in the public domain.
|
14
|
+
|
15
|
+
Default cascading style sheet for the HTML output of Docutils.
|
16
|
+
|
17
|
+
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
18
|
+
customize this style sheet.
|
19
|
+
*/
|
20
|
+
|
21
|
+
/* used to remove borders from tables and images */
|
22
|
+
.borderless, table.borderless td, table.borderless th {
|
23
|
+
border: 0 }
|
24
|
+
|
25
|
+
table.borderless td, table.borderless th {
|
26
|
+
/* Override padding for "table.docutils td" with "! important".
|
27
|
+
The right padding separates the table cells. */
|
28
|
+
padding: 0 0.5em 0 0 ! important }
|
29
|
+
|
30
|
+
.first {
|
31
|
+
/* Override more specific margin styles with "! important". */
|
32
|
+
margin-top: 0 ! important }
|
33
|
+
|
34
|
+
.last, .with-subtitle {
|
35
|
+
margin-bottom: 0 ! important }
|
36
|
+
|
37
|
+
.hidden {
|
38
|
+
display: none }
|
39
|
+
|
40
|
+
.subscript {
|
41
|
+
vertical-align: sub;
|
42
|
+
font-size: smaller }
|
43
|
+
|
44
|
+
.superscript {
|
45
|
+
vertical-align: super;
|
46
|
+
font-size: smaller }
|
47
|
+
|
48
|
+
a.toc-backref {
|
49
|
+
text-decoration: none ;
|
50
|
+
color: black }
|
51
|
+
|
52
|
+
blockquote.epigraph {
|
53
|
+
margin: 2em 5em ; }
|
54
|
+
|
55
|
+
dl.docutils dd {
|
56
|
+
margin-bottom: 0.5em }
|
57
|
+
|
58
|
+
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
59
|
+
overflow: hidden;
|
60
|
+
}
|
61
|
+
|
62
|
+
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
63
|
+
dl.docutils dt {
|
64
|
+
font-weight: bold }
|
65
|
+
*/
|
66
|
+
|
67
|
+
div.abstract {
|
68
|
+
margin: 2em 5em }
|
69
|
+
|
70
|
+
div.abstract p.topic-title {
|
71
|
+
font-weight: bold ;
|
72
|
+
text-align: center }
|
73
|
+
|
74
|
+
div.admonition, div.attention, div.caution, div.danger, div.error,
|
75
|
+
div.hint, div.important, div.note, div.tip, div.warning {
|
76
|
+
margin: 2em ;
|
77
|
+
border: medium outset ;
|
78
|
+
padding: 1em }
|
79
|
+
|
80
|
+
div.admonition p.admonition-title, div.hint p.admonition-title,
|
81
|
+
div.important p.admonition-title, div.note p.admonition-title,
|
82
|
+
div.tip p.admonition-title {
|
83
|
+
font-weight: bold ;
|
84
|
+
font-family: sans-serif }
|
85
|
+
|
86
|
+
div.attention p.admonition-title, div.caution p.admonition-title,
|
87
|
+
div.danger p.admonition-title, div.error p.admonition-title,
|
88
|
+
div.warning p.admonition-title, .code .error {
|
89
|
+
color: red ;
|
90
|
+
font-weight: bold ;
|
91
|
+
font-family: sans-serif }
|
92
|
+
|
93
|
+
/* Uncomment (and remove this text!) to get reduced vertical space in
|
94
|
+
compound paragraphs.
|
95
|
+
div.compound .compound-first, div.compound .compound-middle {
|
96
|
+
margin-bottom: 0.5em }
|
97
|
+
|
98
|
+
div.compound .compound-last, div.compound .compound-middle {
|
99
|
+
margin-top: 0.5em }
|
100
|
+
*/
|
101
|
+
|
102
|
+
div.dedication {
|
103
|
+
margin: 2em 5em ;
|
104
|
+
text-align: center ;
|
105
|
+
font-style: italic }
|
106
|
+
|
107
|
+
div.dedication p.topic-title {
|
108
|
+
font-weight: bold ;
|
109
|
+
font-style: normal }
|
110
|
+
|
111
|
+
div.figure {
|
112
|
+
margin-left: 2em ;
|
113
|
+
margin-right: 2em }
|
114
|
+
|
115
|
+
div.footer, div.header {
|
116
|
+
clear: both;
|
117
|
+
font-size: smaller }
|
118
|
+
|
119
|
+
div.line-block {
|
120
|
+
display: block ;
|
121
|
+
margin-top: 1em ;
|
122
|
+
margin-bottom: 1em }
|
123
|
+
|
124
|
+
div.line-block div.line-block {
|
125
|
+
margin-top: 0 ;
|
126
|
+
margin-bottom: 0 ;
|
127
|
+
margin-left: 1.5em }
|
128
|
+
|
129
|
+
div.sidebar {
|
130
|
+
margin: 0 0 0.5em 1em ;
|
131
|
+
border: medium outset ;
|
132
|
+
padding: 1em ;
|
133
|
+
background-color: #ffffee ;
|
134
|
+
width: 40% ;
|
135
|
+
float: right ;
|
136
|
+
clear: right }
|
137
|
+
|
138
|
+
div.sidebar p.rubric {
|
139
|
+
font-family: sans-serif ;
|
140
|
+
font-size: medium }
|
141
|
+
|
142
|
+
div.system-messages {
|
143
|
+
margin: 5em }
|
144
|
+
|
145
|
+
div.system-messages h1 {
|
146
|
+
color: red }
|
147
|
+
|
148
|
+
div.system-message {
|
149
|
+
border: medium outset ;
|
150
|
+
padding: 1em }
|
151
|
+
|
152
|
+
div.system-message p.system-message-title {
|
153
|
+
color: red ;
|
154
|
+
font-weight: bold }
|
155
|
+
|
156
|
+
div.topic {
|
157
|
+
margin: 2em }
|
158
|
+
|
159
|
+
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
160
|
+
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
161
|
+
margin-top: 0.4em }
|
162
|
+
|
163
|
+
h1.title {
|
164
|
+
text-align: center }
|
165
|
+
|
166
|
+
h2.subtitle {
|
167
|
+
text-align: center }
|
168
|
+
|
169
|
+
hr.docutils {
|
170
|
+
width: 75% }
|
171
|
+
|
172
|
+
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
173
|
+
clear: left ;
|
174
|
+
float: left ;
|
175
|
+
margin-right: 1em }
|
176
|
+
|
177
|
+
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
178
|
+
clear: right ;
|
179
|
+
float: right ;
|
180
|
+
margin-left: 1em }
|
181
|
+
|
182
|
+
img.align-center, .figure.align-center, object.align-center {
|
183
|
+
display: block;
|
184
|
+
margin-left: auto;
|
185
|
+
margin-right: auto;
|
186
|
+
}
|
187
|
+
|
188
|
+
table.align-center {
|
189
|
+
margin-left: auto;
|
190
|
+
margin-right: auto;
|
191
|
+
}
|
192
|
+
|
193
|
+
.align-left {
|
194
|
+
text-align: left }
|
195
|
+
|
196
|
+
.align-center {
|
197
|
+
clear: both ;
|
198
|
+
text-align: center }
|
199
|
+
|
200
|
+
.align-right {
|
201
|
+
text-align: right }
|
202
|
+
|
203
|
+
/* reset inner alignment in figures */
|
204
|
+
div.align-right {
|
205
|
+
text-align: inherit }
|
206
|
+
|
207
|
+
/* div.align-center * { */
|
208
|
+
/* text-align: left } */
|
209
|
+
|
210
|
+
.align-top {
|
211
|
+
vertical-align: top }
|
212
|
+
|
213
|
+
.align-middle {
|
214
|
+
vertical-align: middle }
|
215
|
+
|
216
|
+
.align-bottom {
|
217
|
+
vertical-align: bottom }
|
218
|
+
|
219
|
+
ol.simple, ul.simple {
|
220
|
+
margin-bottom: 1em }
|
221
|
+
|
222
|
+
ol.arabic {
|
223
|
+
list-style: decimal }
|
224
|
+
|
225
|
+
ol.loweralpha {
|
226
|
+
list-style: lower-alpha }
|
227
|
+
|
228
|
+
ol.upperalpha {
|
229
|
+
list-style: upper-alpha }
|
230
|
+
|
231
|
+
ol.lowerroman {
|
232
|
+
list-style: lower-roman }
|
233
|
+
|
234
|
+
ol.upperroman {
|
235
|
+
list-style: upper-roman }
|
236
|
+
|
237
|
+
p.attribution {
|
238
|
+
text-align: right ;
|
239
|
+
margin-left: 50% }
|
240
|
+
|
241
|
+
p.caption {
|
242
|
+
font-style: italic }
|
243
|
+
|
244
|
+
p.credits {
|
245
|
+
font-style: italic ;
|
246
|
+
font-size: smaller }
|
247
|
+
|
248
|
+
p.label {
|
249
|
+
white-space: nowrap }
|
250
|
+
|
251
|
+
p.rubric {
|
252
|
+
font-weight: bold ;
|
253
|
+
font-size: larger ;
|
254
|
+
color: maroon ;
|
255
|
+
text-align: center }
|
256
|
+
|
257
|
+
p.sidebar-title {
|
258
|
+
font-family: sans-serif ;
|
259
|
+
font-weight: bold ;
|
260
|
+
font-size: larger }
|
261
|
+
|
262
|
+
p.sidebar-subtitle {
|
263
|
+
font-family: sans-serif ;
|
264
|
+
font-weight: bold }
|
265
|
+
|
266
|
+
p.topic-title {
|
267
|
+
font-weight: bold }
|
268
|
+
|
269
|
+
pre.address {
|
270
|
+
margin-bottom: 0 ;
|
271
|
+
margin-top: 0 ;
|
272
|
+
font: inherit }
|
273
|
+
|
274
|
+
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
275
|
+
margin-left: 2em ;
|
276
|
+
margin-right: 2em }
|
277
|
+
|
278
|
+
pre.code .ln { color: grey; } /* line numbers */
|
279
|
+
pre.code, code { background-color: #eeeeee }
|
280
|
+
pre.code .comment, code .comment { color: #5C6576 }
|
281
|
+
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
282
|
+
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
283
|
+
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
284
|
+
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
285
|
+
pre.code .inserted, code .inserted { background-color: #A3D289}
|
286
|
+
|
287
|
+
span.classifier {
|
288
|
+
font-family: sans-serif ;
|
289
|
+
font-style: oblique }
|
290
|
+
|
291
|
+
span.classifier-delimiter {
|
292
|
+
font-family: sans-serif ;
|
293
|
+
font-weight: bold }
|
294
|
+
|
295
|
+
span.interpreted {
|
296
|
+
font-family: sans-serif }
|
297
|
+
|
298
|
+
span.option {
|
299
|
+
white-space: nowrap }
|
300
|
+
|
301
|
+
span.pre {
|
302
|
+
white-space: pre }
|
303
|
+
|
304
|
+
span.problematic {
|
305
|
+
color: red }
|
306
|
+
|
307
|
+
span.section-subtitle {
|
308
|
+
/* font-size relative to parent (h1..h6 element) */
|
309
|
+
font-size: 80% }
|
310
|
+
|
311
|
+
table.citation {
|
312
|
+
border-left: solid 1px gray;
|
313
|
+
margin-left: 1px }
|
314
|
+
|
315
|
+
table.docinfo {
|
316
|
+
margin: 2em 4em }
|
317
|
+
|
318
|
+
table.docutils {
|
319
|
+
margin-top: 0.5em ;
|
320
|
+
margin-bottom: 0.5em }
|
321
|
+
|
322
|
+
table.footnote {
|
323
|
+
border-left: solid 1px black;
|
324
|
+
margin-left: 1px }
|
325
|
+
|
326
|
+
table.docutils td, table.docutils th,
|
327
|
+
table.docinfo td, table.docinfo th {
|
328
|
+
padding-left: 0.5em ;
|
329
|
+
padding-right: 0.5em ;
|
330
|
+
vertical-align: top }
|
331
|
+
|
332
|
+
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
333
|
+
font-weight: bold ;
|
334
|
+
text-align: left ;
|
335
|
+
white-space: nowrap ;
|
336
|
+
padding-left: 0 }
|
337
|
+
|
338
|
+
/* "booktabs" style (no vertical lines) */
|
339
|
+
table.docutils.booktabs {
|
340
|
+
border: 0px;
|
341
|
+
border-top: 2px solid;
|
342
|
+
border-bottom: 2px solid;
|
343
|
+
border-collapse: collapse;
|
344
|
+
}
|
345
|
+
table.docutils.booktabs * {
|
346
|
+
border: 0px;
|
347
|
+
}
|
348
|
+
table.docutils.booktabs th {
|
349
|
+
border-bottom: thin solid;
|
350
|
+
text-align: left;
|
351
|
+
}
|
352
|
+
|
353
|
+
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
354
|
+
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
355
|
+
font-size: 100% }
|
356
|
+
|
357
|
+
ul.auto-toc {
|
358
|
+
list-style-type: none }
|
359
|
+
|
360
|
+
</style>
|
361
|
+
</head>
|
362
|
+
<body>
|
363
|
+
<div class="document" id="proverbs">
|
364
|
+
<h1 class="title">PROVERBS</h1>
|
365
|
+
<h2 class="subtitle" id="rearrange-proverbs-into-new-mostly-senseless-proverbs">Rearrange proverbs into new, mostly senseless, proverbs.</h2>
|
366
|
+
|
367
|
+
<p><em>Sprichwörter</em> is the German name for the same program.</p>
|
368
|
+
<div class="section" id="synopsis">
|
369
|
+
<h1>Synopsis</h1>
|
370
|
+
<blockquote>
|
371
|
+
<p><strong>proverbs</strong></p>
|
372
|
+
<p><strong>proverbs -[qc <COLOR>] (--qualify --color <COLOR>)</strong></p>
|
373
|
+
<p><strong>proverbs -f (--favorites)</strong></p>
|
374
|
+
<p><strong>proverbs -a (--add)</strong></p>
|
375
|
+
<p><strong>proverbs -h (--help)</strong></p>
|
376
|
+
<p><strong>proverbs -v (--version)</strong></p>
|
377
|
+
</blockquote>
|
378
|
+
</div>
|
379
|
+
<div class="section" id="description">
|
380
|
+
<h1>DESCRIPTION</h1>
|
381
|
+
<p>The program combines the beginnings and the endings of proverbs randomly picked
|
382
|
+
from a list. The result is a phrase which is still recognizable as "kind of a
|
383
|
+
proverb" but without claiming to convey any real message, let alone "wisdom".</p>
|
384
|
+
<p>Yes. It is intended as a humorous waste of time. You can, for example, call
|
385
|
+
proverbs from your <em>.bashrc</em> file.</p>
|
386
|
+
<p>When called on the command-prompt as <strong>proverbs</strong> without any options, a newly
|
387
|
+
generated proverb will be printed out on screen.</p>
|
388
|
+
</div>
|
389
|
+
<div class="section" id="options">
|
390
|
+
<h1>OPTIONS</h1>
|
391
|
+
<dl class="docutils">
|
392
|
+
<dt><strong>-a</strong> or <strong>--add</strong></dt>
|
393
|
+
<dd>Allows you to add a new, real proverb to the list of original proverbs. You
|
394
|
+
are prompted for each of the details: language (one of <em>en</em> or <em>de</em> at the
|
395
|
+
time of this writing), singular or plural (<em>s</em>, <em>p</em>), beginning and ending of
|
396
|
+
the proverb.</dd>
|
397
|
+
<dt><strong>-f</strong> or <strong>--favorites</strong></dt>
|
398
|
+
<dd>Will dump the list of "qualified", random proverbs, i.e. those that had been
|
399
|
+
found worth saving after a previous call to proverbs.</dd>
|
400
|
+
<dt><strong>-q</strong> or <strong>--qualify</strong></dt>
|
401
|
+
<dd>After a newly created proverb has been presented, you have a few seconds to
|
402
|
+
eventually qualify a proverb, i.e. add it to the list of favorites, by
|
403
|
+
pushing '+'.</dd>
|
404
|
+
<dt><strong>-c</strong> or <strong>--color=COLOR</strong></dt>
|
405
|
+
<dd>Sets the color the border which sourrounds a generated proverb. Must be one
|
406
|
+
of red, green, yellow, purple, cyan, blue, white or black.</dd>
|
407
|
+
<dt><strong>-h</strong> or <strong>--help</strong></dt>
|
408
|
+
<dd>Shows the short help-text for the program.</dd>
|
409
|
+
<dt><strong>-v</strong> or <strong>--version</strong></dt>
|
410
|
+
<dd>Shows version-information</dd>
|
411
|
+
</dl>
|
412
|
+
<div class="section" id="adding-proverbs-to-the-default-list-option-a-or-add">
|
413
|
+
<h2>ADDING PROVERBS to the default list (option -a or --add)</h2>
|
414
|
+
<p>At the time of this writing (october 2019), original ('real') proverbs must
|
415
|
+
conform to the pattern</p>
|
416
|
+
<p>"<em>someone or something</em>" | "<strong>does or is</strong> <em>something</em>"</p>
|
417
|
+
<p>Just execute the program a few times on the command-line, without arguments, to
|
418
|
+
get the idea.</p>
|
419
|
+
<p>For the time, original proverbs are grouped with respect to their subject
|
420
|
+
(someone or something), which is uncountable or in singular for the first group
|
421
|
+
(like in “Fortune | favors the bold”), in plural for the second group (like
|
422
|
+
in “All Roads | lead to Rome”).</p>
|
423
|
+
</div>
|
424
|
+
</div>
|
425
|
+
<div class="section" id="files">
|
426
|
+
<h1>FILES</h1>
|
427
|
+
<p>The hidden directory <em>.proverbs</em> in the user's home-directory can contain three
|
428
|
+
types of file. For the English version, these are:</p>
|
429
|
+
<dl class="docutils">
|
430
|
+
<dt><em>liste_en.rb</em></dt>
|
431
|
+
<dd>This file contains all the currently available, original proverbs. It exists
|
432
|
+
only, if you have already added new original proverbs.</dd>
|
433
|
+
<dt><em>liste_en_bak.rb</em></dt>
|
434
|
+
<dd>A backup-copy of the previous version of the list of proverbs.</dd>
|
435
|
+
<dt><em>qualifile_en</em></dt>
|
436
|
+
<dd>This file contains the list of previously qualified, randomly generated
|
437
|
+
proverbs, i.e. the list of <em>favorites</em>. It is created when you qualify a
|
438
|
+
proverb for the very first time, and dumped to screen, when you use the
|
439
|
+
option -f or --favorites.</dd>
|
440
|
+
</dl>
|
441
|
+
</div>
|
442
|
+
<div class="section" id="other-information">
|
443
|
+
<h1>OTHER INFORMATION</h1>
|
444
|
+
<table class="docutils field-list" frame="void" rules="none">
|
445
|
+
<col class="field-name" />
|
446
|
+
<col class="field-body" />
|
447
|
+
<tbody valign="top">
|
448
|
+
<tr class="field"><th class="field-name">Source-code:</th><td class="field-body">"Proverbs" had been developed in Ruby and is distributed as a
|
449
|
+
ruby-gem. If you installed the program from the gem-file (with
|
450
|
+
<em>gem install</em>), then you find all the source-files in the
|
451
|
+
gem-folder for your Ruby-version. Otherwise, you can also unpack
|
452
|
+
the gem-file (with <em>tar</em>), then uncompress the data-archive and
|
453
|
+
take a look at the files in the resulting, new folders <em>bin</em> and
|
454
|
+
<em>lib</em>.</td>
|
455
|
+
</tr>
|
456
|
+
<tr class="field"><th class="field-name">License:</th><td class="field-body">"Proverbs" is released under the conditions of the
|
457
|
+
GNU General Public License, version 3.0.</td>
|
458
|
+
</tr>
|
459
|
+
<tr class="field"><th class="field-name">Version:</th><td class="field-body">1.6 of 2019/10/15</td>
|
460
|
+
</tr>
|
461
|
+
<tr class="field"><th class="field-name">Author:</th><td class="field-body">"Proverbs" has been programmed by Michael Uplawski
|
462
|
+
<<a class="reference external" href="mailto:michael.uplawski@uplawski.eu">michael.uplawski@uplawski.eu</a>>. The German parlor game
|
463
|
+
<em>"Verrückte Sprichwörter"</em> ("Crazy Proverbs") was the principal
|
464
|
+
inspiration for the project.</td>
|
465
|
+
</tr>
|
466
|
+
</tbody>
|
467
|
+
</table>
|
468
|
+
<p><strong>Ω</strong></p>
|
469
|
+
</div>
|
470
|
+
</div>
|
471
|
+
</body>
|
472
|
+
</html>
|