timequiz 0.3 → 1.0

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: 4dfbd11aa927e4fa19f97df85c57fcb4bfbcd54d732629af6a2a97686e1b8725
4
- data.tar.gz: 5e90386c572b4b33dac75535a3fceea7ac8017ca147af10e0a074664a750f47d
3
+ metadata.gz: 0daed4c2b70d554ac2bc2bb05212e049dc91dad41a25e02fe45cd24e0f0e6a90
4
+ data.tar.gz: f1fcd7c7460e89dc2870c3442895253b5c09dde4ca02b7294c0a37e64da1dbfe
5
5
  SHA512:
6
- metadata.gz: b8dadc3a9eba2c6429771d695a53aabc56cb6d09b47b5fdf902364bd54d02939a3c85b41a201e99b70d211a686322a13791e93508f1db5b7cfbcef32734c95b1
7
- data.tar.gz: 86b49f8edb20261267fe989d4e51d721966df45576ecbf6dafeb0a975631ee64a169b26c92ea409e6a52b772c02e4cedb2004a528aca300a0bc765fa61c2d184
6
+ metadata.gz: 878029819eef267aadb8ba572f02cd65f83d9543d989bf9ccd672b5d7229198205bdec4dfb030616d84bab722961ab5522cf182ee23b3e1604a4ab5e1311ab45
7
+ data.tar.gz: 81b25a5d9b955bb381aeef5e644e03d99ec3b064618c9c5cb3cb4a1e098954f68c82dbe23332ff0dda042eac1c01188cff8efb9ab5dcb6e658710ee8df678b6b
@@ -1,67 +1,30 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
3
  <head>
4
- <meta name="generator" content=
5
- "HTML Tidy für Linux, Version 5.8.0" />
6
- <meta charset="utf-8" />
4
+ <meta name="generator" content="vim - Vi Improved, a programmer's editor; HTML Tidy for Linux version 5.8.0
5
+ "/>
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" />
21
+ <meta name="viewport" content=
22
+ "width=device-width, initial-scale=1" />
7
23
  <title>Timequiz</title>
8
- <style type="text/css">
9
- /*<![CDATA[*/
10
-
11
- /*
12
- :Author: Michael Uplawski
13
- :Contact: michael.uplawski@uplawski.eu
14
- :License: WTFPL 2.0, see http://www.wtfpl.net/about/
15
-
16
- Stylesheet for use with Docutils.
17
- */
18
-
19
- body {
20
- background-color:#200030;
21
- font-family: Verdana,Helvetica,Univers;
22
- color:#f0f0f0;
23
- color:#f0f0f0;
24
- }
25
-
26
- h1 {color:cyan;font-size:1.5em;}
27
- h1.title {color:#a0a0f0;font-size:2em;}
28
- h2 {color:#ffffa0;}
29
-
30
- p, ul.simple, ol.simple, dt {margin-left:2em;}
31
- p.first {font-weight:bold;}
32
- dd {margin-left:4em;}
33
- table {
34
- border: 0.5pt dotted #ffa050;
35
- margin-left:2em;
36
- border-radius:1em;
37
- }
38
- td {color:#f0f080;}
39
-
40
- /* correct left margin of nested block tags*/
41
- dd p, li p {margin-left:0;}
42
- dd * ul {margin-left:0 ! important; }
43
- dd ul {margin-left:0 ! important; }
44
- dd dl dt, dd dl dd {margin-left:0 ! important;}
45
- dt {font-weight:bold;}
46
- dt, dd {color:#f0f0f0}
47
-
48
- tt.docutils {color:#000080;
49
- background-color:#a080a0;
50
- padding-left:3px;
51
- padding-right:3px;
52
- white-space:nowrap;
53
- }
54
-
55
- a.external {color:#ff90ff;}
56
-
57
- blockquote {background-color:#ffc090;
58
- padding:0.5em;
59
- border-radius:0.5em;
60
- }
61
-
62
-
63
- /*]]>*/
64
- </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" />
65
28
  </head>
66
29
  <body>
67
30
  <main id="timequiz">
@@ -257,12 +220,12 @@
257
220
 
258
221
  <p>Press a number to view an event’s details,</p>
259
222
 
260
- <p>a to add a new random event, or</p>
223
+ <p><strong>a</strong> to add a new random event, or</p>
261
224
 
262
- <p>q to quit.</p>
225
+ <p><strong>q</strong> to quit.</p>
263
226
 
264
- <p>If you choose a, here’s how the next prompt may
265
- appear:</p>
227
+ <p>If you choose <strong>a</strong>, here’s how the next
228
+ prompt may appear:</p>
266
229
 
267
230
  <table>
268
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
@@ -17,6 +17,7 @@
17
17
  require 'optparse'
18
18
  require 'optparse/time'
19
19
  require 'ostruct'
20
+ require_relative 'version'
20
21
  require_relative 'basic_logging'
21
22
  require_relative 'constants'
22
23
 
@@ -55,7 +56,7 @@ class ArgParser
55
56
  options.debug = 'debug'
56
57
  end
57
58
  opts.on("-v", "--version", 'Show program version') do
58
- puts $APPNAME.dup << ", version " << $VERSION
59
+ puts APPNAME.dup << ", version " << VERSION
59
60
  exit true
60
61
  end
61
62
  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/user_input.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  =begin
4
4
  /***************************************************************************
5
- * ©2017-2024, Michael Uplawski <michael.uplawski@uplawski.eu> *
5
+ * ©2017-2026, 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 WTFPL 2.0 or later, see *
@@ -15,7 +15,8 @@
15
15
  ***************************************************************************/
16
16
  =end
17
17
 
18
- require 'io/wait'
18
+ # Modified for ruby 4.x
19
+ # require 'io/wait'
19
20
  require 'io/console'
20
21
  require_relative 'color_output'
21
22
 
@@ -220,7 +221,10 @@ class UserInput
220
221
 
221
222
  STDIN.raw do
222
223
  STDIN.noecho do
223
- until (STDIN.ready?)
224
+ # STDIN.ready?
225
+ # Modification for ruby 4.0.1 compatibility. Unclear what the
226
+ # requirements are. This works.
227
+ until IO.select([STDIN], nil, nil, 0)
224
228
  sleep(0.1)
225
229
  end
226
230
  char = (STDIN.read_nonblock(1).ord rescue nil)
data/lib/version.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  =begin
4
4
  /***************************************************************************
5
- * ©2017-2025, Michael Uplawski <michael.uplawski@uplawski.eu> *
5
+ * ©2017-2026, 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 WTFPL 2.0 or later, see *
@@ -15,8 +15,9 @@
15
15
  ***************************************************************************/
16
16
  =end
17
17
 
18
- VERSION = '0.3'
19
- SUMMARY = 'Adder: logging and file-operations corrected'
18
+ APPNAME = 'Timequiz'
19
+ VERSION = '1.0'
20
+ SUMMARY = 'Added events, version clashes on rubygems.org resolved'
20
21
  AUTHOR = 'Michael Uplawski'
21
22
  AUTHOR_MAIL = '<michael.uplawski@uplawski.eu>'
22
- YEARS = 2017 - 2025
23
+ YEARS = 2017 - 2026
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timequiz
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: '1.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Uplawski
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-11-08 00:00:00.000000000 Z
10
+ date: 2026-06-06 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: Play a history game
13
13
  email: michael.uplawski@uplawski.eu
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  - !ruby/object:Gem::Version
58
58
  version: '0'
59
59
  requirements: []
60
- rubygems_version: 3.6.7
60
+ rubygems_version: 4.0.13
61
61
  specification_version: 4
62
- summary: 'Adder: logging and file-operations corrected'
62
+ summary: Added events, version clashes on rubygems.org resolved
63
63
  test_files: []