timequiz 0.32 → 1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7e38d8b9eb74d76bb8e87d548a7ac05427adfd515b34886d83c672dd2c9f8b0
4
- data.tar.gz: e48d79a87c7bb51f4fac84b2a4a957e953657385fc9e91f9ec8102279f5b139f
3
+ metadata.gz: dac86187e1ed798d87accd6cedab49cbffb769000c44da2e325c7558c15879ea
4
+ data.tar.gz: 18f0bcaf694b2a0a4cd9b35d0b7cbdfb30f3407e89ee88602d8574a049ed5cf1
5
5
  SHA512:
6
- metadata.gz: b9db06d19755fb81f085ad3f8d719fd75a4fd81fef834192df149c39bd11adc519211952a8938e64f999ac9e71f265830d64032681962a9f92eec442f9c68103
7
- data.tar.gz: 31aea480b7b839796b7257f4b393dc1c90697f66ff544069a1d262a0b561f2cbb4aa75681eed7673f05d7c07efab363b6a7d68e9f5781ba43c0ae0b1136d46e8
6
+ metadata.gz: cd407d824d85ddb4f8bea586dc9c943b09de3a7b20bd68fa82f637567965d6266cacff51cb26aa42a020f5953924f1df129e700ff5f71d1edd30e1c6ce74d210
7
+ data.tar.gz: 2e091802751e1f73bc72c807d041d6ac1f17de4a3c7c225164dce13be5c2f6396cd005edbbf21044d903c8bcbaa60abfbdc5deadf78fe81c53a07f10116fd6b0
data/changes.txt ADDED
@@ -0,0 +1,5 @@
1
+ V 1.1
2
+ -) version information extended
3
+ -) superfluous code removed
4
+ -) This file changes.txt
5
+ -) License WTFPL
@@ -4,66 +4,27 @@
4
4
  <meta name="generator" content="vim - Vi Improved, a programmer's editor; HTML Tidy for Linux version 5.8.0
5
5
  "/>
6
6
  <meta charset="utf-8" />
7
+ <link rel="preload" as="font" crossorigin="" href=
8
+ "https://www.uplawski.eu/fonts/Classica/Classica-Book.ttf" type=
9
+ "font/ttf" />
10
+ <link rel="preload" as="font" crossorigin="" href=
11
+ "https://www.uplawski.eu/fonts/Classica/Classica-Bold.ttf" type=
12
+ "font/ttf" />
13
+ <link rel="preload" as="font" crossorigin="" href=
14
+ "https://www.uplawski.eu/fonts/Classica/Classica-BookOblique.ttf"
15
+ type="font/ttf" />
16
+ <link rel="preload" as="font" crossorigin="" href=
17
+ "https://www.uplawski.eu/fonts/Fertigo_PRO.otf" type=
18
+ "font/otf" />
19
+ <link rel="icon" type="/image/x-icon" href=
20
+ "images/favicon_Schreibfeder.ico" />
7
21
  <meta name="viewport" content=
8
22
  "width=device-width, initial-scale=1" />
9
23
  <title>Timequiz</title>
10
- <style type="text/css">
11
- /*<![CDATA[*/
12
-
13
- /*
14
- :Author: Michael Uplawski
15
- :Contact: michael.uplawski@uplawski.eu
16
- :License: WTFPL 2.0, see http://www.wtfpl.net/about/
17
-
18
- Stylesheet for use with Docutils.
19
- */
20
-
21
- body {
22
- background-color:#200030;
23
- font-family: Verdana,Helvetica,Univers;
24
- color:#f0f0f0;
25
- color:#f0f0f0;
26
- }
27
-
28
- h1 {color:cyan;font-size:1.5em;}
29
- h1.title {color:#a0a0f0;font-size:2em;}
30
- h2 {color:#ffffa0;}
31
-
32
- p, ul.simple, ol.simple, dt {margin-left:2em;}
33
- p.first {font-weight:bold;}
34
- dd {margin-left:4em;}
35
- table {
36
- border: 0.5pt dotted #ffa050;
37
- margin-left:2em;
38
- border-radius:1em;
39
- }
40
- td {color:#f0f080;}
41
-
42
- /* correct left margin of nested block tags*/
43
- dd p, li p {margin-left:0;}
44
- dd * ul {margin-left:0 ! important; }
45
- dd ul {margin-left:0 ! important; }
46
- dd dl dt, dd dl dd {margin-left:0 ! important;}
47
- dt {font-weight:bold;}
48
- dt, dd {color:#f0f0f0}
49
-
50
- tt.docutils {color:#000080;
51
- background-color:#a080a0;
52
- padding-left:3px;
53
- padding-right:3px;
54
- white-space:nowrap;
55
- }
56
-
57
- a.external {color:#ff90ff;}
58
-
59
- blockquote {background-color:#ffc090;
60
- padding:0.5em;
61
- border-radius:0.5em;
62
- }
63
-
64
-
65
- /*]]>*/
66
- </style>
24
+ <link rel="stylesheet" href="timequiz.css" type="text/css" />
25
+ <link rel="stylesheet" href="fonts.css" type="text/css" />
26
+ <link rel="stylesheet" href="https://www.uplawski.eu/ups.css"
27
+ type="text/css" />
67
28
  </head>
68
29
  <body>
69
30
  <main id="timequiz">
@@ -259,12 +220,12 @@
259
220
 
260
221
  <p>Press a number to view an event’s details,</p>
261
222
 
262
- <p>a to add a new random event, or</p>
223
+ <p><strong>a</strong> to add a new random event, or</p>
263
224
 
264
- <p>q to quit.</p>
225
+ <p><strong>q</strong> to quit.</p>
265
226
 
266
- <p>If you choose a, here’s how the next prompt may
267
- appear:</p>
227
+ <p>If you choose <strong>a</strong>, here’s how the next
228
+ prompt may appear:</p>
268
229
 
269
230
  <table>
270
231
  <tbody>
Binary file
data/doc/pdf/timequiz.pdf CHANGED
Binary file
data/doc/rst/timequiz.rst CHANGED
@@ -114,11 +114,11 @@ To continue:
114
114
 
115
115
  Press a number to view an event’s details,
116
116
 
117
- a to add a new random event, or
117
+ **a** to add a new random event, or
118
118
 
119
- q to quit.
119
+ **q** to quit.
120
120
 
121
- If you choose a, here’s how the next prompt may appear:
121
+ If you choose **a**, here’s how the next prompt may appear:
122
122
 
123
123
  +----------------------------------------------------------------------------------------------------------+
124
124
  |Indicate the event from the previous list, which precedes the following, or '0' (zero) to put it in front:|
data/lib/argparser.rb CHANGED
@@ -57,6 +57,7 @@ class ArgParser
57
57
  end
58
58
  opts.on("-v", "--version", 'Show program version') do
59
59
  puts APPNAME.dup << ", version " << VERSION
60
+ puts "©#{YEARS} #{AUTHOR} #{AUTHOR_MAIL}"
60
61
  exit true
61
62
  end
62
63
  end
data/lib/console.rb CHANGED
@@ -163,7 +163,7 @@ module Console
163
163
  end
164
164
 
165
165
  def ask_new_event
166
- puts "\nEnter number for more information about an event, 'a' to play with one new, random event, 'q' to quit."
166
+ puts "\nEnter number (and return) for more information about an event,\n\t'a' to play with one new, random event,\n\t'q' to quit."
167
167
  UserInput::input()
168
168
  end
169
169
 
data/lib/events.rb CHANGED
@@ -15,6 +15,8 @@
15
15
  =end
16
16
 
17
17
  # All events known.
18
+ $events << ['Ibn Battuta visits the sultanate of Mali', 1352, 'Ibn Battuta, the great Morrocan voyager, in his journal described many of the territories under Muslim domination and became, thus, the only eyewitness of West-African societies and their political organization at that time. His writings contrast with that of later authors who – often in a colonial context – deny the existence of developped societies in this part of the world and, thus, imposed that “Africa has had no history”.']
19
+ $events << ['Obligations towards Britain as the colonial Power create a huge famine in Bengal (India)', 1943, 'Following the Japanese occupation of Burma, Britain demanded material support for its war efforts from the Indian colonies and - at the same time – refused its care for an already suffering population. When the extend of the resulting famine began to get known, feeble counter-measures were sufficient to downplay the the catastrophy.']
18
20
  $events << ['Howard Hughes founds his own aircraft company', 1932,'Hughes was an American manufacturer, aviator, and motion-picture producer and director who acquired enormous wealth and celebrity from his various ventures but was perhaps better known for his eccentricities, especially his reclusiveness (britannica.com).' ]
19
21
  $events << ['Destruction of the German town Dresden', 1945,'The bombing on February 1945 caused a firestorm which left the town ablaze for weeks and killed about 35000 people although the precise number will probably never be established.' ]
20
22
  $events << ['The aviator Charles Lindbergh dies', 1974,'Charles Lindbergh was the first aviator to complete a solo transatlantic flight in May 1927.' ]
data/lib/extstring.rb CHANGED
@@ -149,6 +149,7 @@ if __FILE__ == $0
149
149
  s << "2) Man gab uns mancherlei auf Erden.\nZum Denken gab man uns die Stirn."
150
150
  s << "2a) Man gab uns Herz- und Leibbeschwerden.\nDoch auch den Himmel und den Zwirn."
151
151
  s << "3) Himmel, Ding und Zwirn."
152
- s.wrap(12, /\d\)/)
152
+ s.wrap(80, /\d\)/)
153
+ puts s
153
154
  puts s.box(:min_width=>20, :left => 20)
154
155
  end
data/lib/version.rb CHANGED
@@ -16,8 +16,8 @@
16
16
  =end
17
17
 
18
18
  APPNAME = 'Timequiz'
19
- VERSION = '0.32'
20
- SUMMARY = 'Bugfix (--version) && Ruby 4.x compatibility (STDIN.ready?) '
19
+ VERSION = '1.1'
20
+ SUMMARY = 'Play a history game'
21
21
  AUTHOR = 'Michael Uplawski'
22
22
  AUTHOR_MAIL = '<michael.uplawski@uplawski.eu>'
23
- YEARS = 2017 - 2026
23
+ YEARS = '2017 - 2026'
data/timequiz.gemspec CHANGED
@@ -6,17 +6,18 @@ Gem::Specification.new do |s|
6
6
  s.name = File.basename(__FILE__, '.gemspec')
7
7
  s.date = Date.today.strftime('%F')
8
8
  s.summary = SUMMARY
9
- s.description = "Play a history game"
9
+ s.description = "A game that makes you put historical events in chronological order."
10
10
  s.authors = ["Michael Uplawski"]
11
11
  s.email = 'michael.uplawski@uplawski.eu'
12
- s.files = %w~timequiz~.collect{|f| 'bin/' << f} + %w~basic_logging.rb version.rb file_checking.rb adder.rb argparser.rb busy_indicator.rb color_output.rb console.rb constants.rb event.rb events.rb extstring.rb user_input.rb timequiz.rb~.collect{|f| 'lib/' << f} + %w~timequiz.gemspec~.collect{|f|f} + %w~man/timequiz.6.gz html/timequiz.html pdf/timequiz.pdf rst/timequiz.rst license.txt~.collect{|f| 'doc/' << f} + ["README.md"]
12
+ s.files = %w~timequiz~.collect{|f| 'bin/' << f} + %w~basic_logging.rb version.rb adder.rb argparser.rb busy_indicator.rb color_output.rb console.rb constants.rb event.rb events.rb extstring.rb user_input.rb timequiz.rb~.collect{|f| 'lib/' << f} + %w~timequiz.gemspec changes.txt README.md~.collect{|f|f} + %w~man/timequiz.6.gz html/timequiz.html pdf/timequiz.pdf rst/timequiz.rst license.txt~.collect{|f| 'doc/' << f}
13
13
  #s.requirements = ''
14
14
  #s.add_runtime_dependency ''
15
15
  s.executables = 'timequiz'
16
- s.license = 'Nonstandard'
16
+ s.license = 'WTFPL'
17
17
  s.required_ruby_version = '>= 2.7'
18
18
  s.metadata = {
19
19
  "homepage_uri" => 'https://www.uplawski.eu/software/timequiz/',
20
- "documentation_uri" => 'https://www.uplawski.eu/software/timequiz/man_timequiz.html'
20
+ "documentation_uri" => 'https://www.uplawski.eu/software/timequiz/man_timequiz.html',
21
+ "changelog_uri" => 'https://www.uplawski.eu/software/timequiz/changes.txt'
21
22
  }
22
23
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timequiz
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.32'
4
+ version: '1.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Uplawski
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-04-10 00:00:00.000000000 Z
10
+ date: 2026-09-02 00:00:00.000000000 Z
11
11
  dependencies: []
12
- description: Play a history game
12
+ description: A game that makes you put historical events in chronological order.
13
13
  email: michael.uplawski@uplawski.eu
14
14
  executables:
15
15
  - timequiz
@@ -18,6 +18,7 @@ extra_rdoc_files: []
18
18
  files:
19
19
  - README.md
20
20
  - bin/timequiz
21
+ - changes.txt
21
22
  - doc/html/timequiz.html
22
23
  - doc/license.txt
23
24
  - doc/man/timequiz.6.gz
@@ -33,16 +34,16 @@ files:
33
34
  - lib/event.rb
34
35
  - lib/events.rb
35
36
  - lib/extstring.rb
36
- - lib/file_checking.rb
37
37
  - lib/timequiz.rb
38
38
  - lib/user_input.rb
39
39
  - lib/version.rb
40
40
  - timequiz.gemspec
41
41
  licenses:
42
- - Nonstandard
42
+ - WTFPL
43
43
  metadata:
44
44
  homepage_uri: https://www.uplawski.eu/software/timequiz/
45
45
  documentation_uri: https://www.uplawski.eu/software/timequiz/man_timequiz.html
46
+ changelog_uri: https://www.uplawski.eu/software/timequiz/changes.txt
46
47
  rdoc_options: []
47
48
  require_paths:
48
49
  - lib
@@ -57,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
58
  - !ruby/object:Gem::Version
58
59
  version: '0'
59
60
  requirements: []
60
- rubygems_version: 4.0.10
61
+ rubygems_version: 4.0.18
61
62
  specification_version: 4
62
- summary: Bugfix (--version) && Ruby 4.x compatibility (STDIN.ready?)
63
+ summary: Play a history game
63
64
  test_files: []
data/lib/file_checking.rb DELETED
@@ -1,83 +0,0 @@
1
- #encoding: UTF-8
2
- =begin
3
- /***************************************************************************
4
- * ©2017-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
5
- * *
6
- * This program is free software; you can redistribute it and/or modify *
7
- * it under the terms of the WTFPL 2.0 or later, see *
8
- * http://www.wtfpl.net/about/ *
9
- * *
10
- * This program is distributed in the hope that it will be useful, *
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
13
- * *
14
- ***************************************************************************/
15
- =end
16
-
17
- =begin
18
- A module to facilitate frequently occuring checks on
19
- file-system objects. You can certainly do without this,
20
- but maybe you find it useful.
21
- =end
22
- module File_Checking
23
-
24
- @@text_messages = {
25
- :exist? => "does not exist!",
26
- :exist => "does not exist!",
27
- :readable? => "is not readable!",
28
- :readable => "is not readable!",
29
- :executable? => "is not executable!",
30
- :executable => "is not executable!",
31
- :writable? => "is not writable!",
32
- :writable => "is not writable!",
33
- :directory? => "is not a directory!",
34
- :directory => "is not a directory!",
35
- :file? => "is not a file!",
36
- :file => "is not a file!",
37
- }
38
-
39
- # Checks if the file with the name from the first
40
- # parameter has the properties, listed in the second.
41
- # The messages parameter is an array of one or several
42
- # of :exist?, :readable?, :writable?, :directory? or
43
- # their string-representations, respectively.
44
- # Returns nil in case of success, otherwise an
45
- # informative message, describing the first negative
46
- # test-result.
47
- def file_check(file, *messages)
48
- File_Checking.file_check(file, *messages)
49
- end
50
-
51
- # Checks if the file with the name from the first
52
- # parameter has the properties, listed in the second.
53
- # The messages parameter is an array of one or all
54
- # of :exist?, :readable?, :writable?, :directory? or
55
- # their string-representations, respectively.
56
- # Returns nil in case of success, otherwise an
57
- # informative message, describing the first negative
58
- # test-result.
59
- def self.file_check(file, *messages)
60
- msg = nil
61
- if(file && messages.respond_to?(:to_ary) && !messages.empty?)
62
- messages.each do |k|
63
- if(! k.to_s.end_with?('?'))
64
- k = (k.to_s << '?').to_sym
65
- end
66
- @log.debug ('checking ' << k.to_s) if @log
67
- if(msg == nil && File.respond_to?(k) && ! File.send(k, file.to_s))
68
- msg = "#{file} #{@@text_messages[k.to_sym]}"
69
- end
70
- end
71
- end
72
- msg
73
- end
74
- alias :check_file :file_check
75
- end
76
-
77
- =begin
78
- # example
79
-
80
- include File_Checking
81
- msg = file_check('some_file.txt', [:exist?, :readable?, 'writable'])
82
- puts msg if msg
83
- =end