typing-game-cli 5.0.0 → 6.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.
package/dist/Results.js CHANGED
@@ -7,7 +7,8 @@ import Menu from './Menu.js';
7
7
  export default function Results({
8
8
  sortBy,
9
9
  isShowAllHistory,
10
- isCompactFormat
10
+ isCompactFormat,
11
+ topN
11
12
  }) {
12
13
  return isCompactFormat ? /*#__PURE__*/React.createElement(Box, {
13
14
  flexDirection: "column",
@@ -27,7 +28,8 @@ export default function Results({
27
28
  flexDirection: "column"
28
29
  }, getResults({
29
30
  sortBy: '-cpm',
30
- showAll: false
31
+ showAll: false,
32
+ topN
31
33
  }).map((result, i, array) => /*#__PURE__*/React.createElement(Box, {
32
34
  key: nanoid(),
33
35
  justifyContent: "center",
package/dist/app.js CHANGED
@@ -7,7 +7,7 @@ import Gradient from 'ink-gradient';
7
7
  import { proxy, useSnapshot } from 'valtio';
8
8
  import random from 'just-random';
9
9
  import { formatISO } from 'date-fns';
10
- import { getBorderColor, getDefaultSuite, getRobotBorderColor, getStatusVariant, getMessageOrPlaceholder, isFinished, isWordTyped, calculateWPM, getTypingWord, getRemainingPart, getWpmTextColor, calculateCPS, calculateCPM, getBestResult, getScoreTextColor, getCompetitionResult, registerResult, registerBestFrames, getBestFrames, getOpponentFrames } from './helpers.js';
10
+ import { getBorderColor, getDefaultSuite, getRobotBorderColor, getStatusVariant, getMessageOrPlaceholder, isFinished, isWordTyped, calculateWPM, getTypingWord, getRemainingPart, getWpmTextColor, calculateCPS, calculateCPM, getBestResult, getScoreTextColor, getCompetitionResult, registerResult, registerBestFrames, getBestFrames, getOpponentFrames, getSuiteByTopic } from './helpers.js';
11
11
  import { optionKeyColor } from './constants.js';
12
12
  import Results from './Results.js';
13
13
  import { config } from './config.js';
@@ -16,6 +16,7 @@ import { exitNow } from './cli.js';
16
16
  const currentTime = () => Date.now();
17
17
  const state = proxy({
18
18
  status: 'PAUSED',
19
+ topic: null,
19
20
  suite: getDefaultSuite(),
20
21
  source: null,
21
22
  firstPart: '',
@@ -53,15 +54,18 @@ const state = proxy({
53
54
  isTimerVisible: true,
54
55
  timerVisibilityCounter: 0,
55
56
  isAnimatingEnd: false,
56
- showGameResult: false
57
+ showGameResult: false,
58
+ topN: undefined
57
59
  });
58
60
  export default function App({
59
61
  robotLevel,
62
+ topic,
60
63
  displayResults = false,
61
64
  sortBy,
62
65
  isShowAllHistory,
63
66
  isCompactFormat,
64
- isCompetingAgainstBestResult
67
+ isCompetingAgainstBestResult,
68
+ topN
65
69
  }) {
66
70
  const snap = useSnapshot(state);
67
71
  const {
@@ -77,7 +81,14 @@ export default function App({
77
81
  if (isCompetingAgainstBestResult) {
78
82
  state.isAgainstMyselft = true;
79
83
  }
80
- }, [displayResults, isCompetingAgainstBestResult]);
84
+ if (topN) {
85
+ state.topN = topN;
86
+ }
87
+ if (topic) {
88
+ state.topic = topic;
89
+ state.suite = getSuiteByTopic(topic);
90
+ }
91
+ }, [displayResults, isCompetingAgainstBestResult, topN, topic]);
81
92
  useInput((input, key) => {
82
93
  if (input === 'y') {
83
94
  const foundBestResult = getBestResult();
@@ -216,7 +227,8 @@ export default function App({
216
227
  return /*#__PURE__*/React.createElement(Results, {
217
228
  sortBy: sortBy,
218
229
  isShowAllHistory: isShowAllHistory,
219
- isCompactFormat: isCompactFormat
230
+ isCompactFormat: isCompactFormat,
231
+ topN: topN
220
232
  });
221
233
  }
222
234
  return snap.status === 'PAUSED' ? /*#__PURE__*/React.createElement(Box, {
package/dist/cli.js CHANGED
@@ -25,6 +25,8 @@ const cli = meow(`
25
25
  --display-results Show cpm and wpm results
26
26
  --sort-by Sort results by specified value (-cpm, cpm, -wpm, wpm, -date, date), Starting "-" indicates descending order, default is "-date"
27
27
  --all-history Show all history when displaying results (otherwise (default) display last 10 results respecting sorting parameter)
28
+ --topic Use sentences from works written by specified author
29
+ --top-n Display top n results in displaying results mode
28
30
 
29
31
  Short flags and aliases for options:
30
32
  --against-my-best: -b, --best, --my-best, --myself, --against-my-best-result
@@ -36,6 +38,8 @@ const cli = meow(`
36
38
  --sort-by -s
37
39
  --show-all-history: -a, --all, --all-history
38
40
  --clear-results: -c, --clear
41
+ --topic: --author
42
+ --top-n: --top
39
43
 
40
44
 
41
45
  Examples
@@ -47,11 +51,14 @@ const cli = meow(`
47
51
  $ typing-game-cli -m
48
52
  $ typing-game-cli --low
49
53
  $ typing-game-cli --display-results
54
+ $ typing-game-cli --display-results --top 5
50
55
  $ typing-game-cli -r
51
56
  $ typing-game-cli -r --sort-by="-wpm"
52
57
  $ typing-game-cli -r -s="wpm"
53
58
  $ typing-game-cli -r -s="-wpm" --all-history
54
59
  $ typing-game-cli -r -s="-wpm" -a
60
+ $ typing-game-cli --topic mark-twain
61
+ $ typing-game-cli --author ambrose-bierce
55
62
  `, {
56
63
  importMeta: import.meta,
57
64
  flags: {
@@ -104,6 +111,14 @@ const cli = meow(`
104
111
  type: 'boolean',
105
112
  aliases: ['cmpc'],
106
113
  default: false
114
+ },
115
+ topN: {
116
+ type: 'number',
117
+ aliases: ['top']
118
+ },
119
+ topic: {
120
+ type: 'string',
121
+ aliases: ['author']
107
122
  }
108
123
  }
109
124
  });
@@ -119,7 +134,9 @@ const {
119
134
  sortBy,
120
135
  showAllHistory,
121
136
  againstMyBest,
122
- compactResult
137
+ compactResult,
138
+ topN,
139
+ topic
123
140
  } = cli.flags;
124
141
  render(/*#__PURE__*/React.createElement(App, {
125
142
  robotLevel: robotLevel,
@@ -127,6 +144,8 @@ render(/*#__PURE__*/React.createElement(App, {
127
144
  sortBy: sortBy,
128
145
  isShowAllHistory: showAllHistory,
129
146
  isCompetingAgainstBestResult: againstMyBest,
130
- isCompactFormat: compactResult
147
+ isCompactFormat: compactResult,
148
+ topN: topN,
149
+ topic: topic
131
150
  }));
132
151
  export { exitNow };
package/dist/helpers.js CHANGED
@@ -3,6 +3,7 @@ import path from 'node:path';
3
3
  import { fileURLToPath } from 'node:url';
4
4
  import { fdir as Fdir } from 'fdir';
5
5
  import random from 'just-random';
6
+ import compose from 'just-compose';
6
7
  import sortBy from 'just-sort-by';
7
8
  import { format, formatISO, isValid, parseISO } from 'date-fns';
8
9
  import Config from './config.js';
@@ -15,6 +16,13 @@ const sourcesPath = path.join(__dirname, 'sentences');
15
16
  const isWon = value => value === won;
16
17
  const isLost = value => value === lost;
17
18
  const files = new Fdir().filter((path, _isDirectory) => path.endsWith('.json')).withFullPaths().crawl(sourcesPath).sync();
19
+ const getFilesByTopic = topic => {
20
+ return new Fdir().filter((path, _isDirectory) => path.endsWith('.json')).withFullPaths().crawl(path.join(sourcesPath, topic)).sync();
21
+ };
22
+ const readFile = file => fs.readFileSync(file, 'utf8');
23
+ const getSuiteByTopic = topic => {
24
+ return compose(getFilesByTopic, random, readFile, JSON.parse)(topic);
25
+ };
18
26
  const getDefaultSuite = () => {
19
27
  return JSON.parse(fs.readFileSync(random(files), 'utf8'));
20
28
  };
@@ -109,7 +117,8 @@ const getRemainingPart = (source, typed, hasErroredPart = false) => {
109
117
  };
110
118
  const getResults = ({
111
119
  sortBy: sortByValue = '-wpm',
112
- showAll = false
120
+ showAll = false,
121
+ topN
113
122
  }) => {
114
123
  const config = new Config();
115
124
  const data = config.get();
@@ -140,7 +149,7 @@ const getResults = ({
140
149
  return -parseISO(item.date);
141
150
  });
142
151
  if (!showAll) {
143
- return result.slice(0, 10);
152
+ return result.slice(0, topN === undefined ? 10 : topN);
144
153
  }
145
154
  return result;
146
155
  };
@@ -210,4 +219,4 @@ const registerBestFrames = (config, frames) => {
210
219
  bestFrames: frames
211
220
  });
212
221
  };
213
- export { getDefaultSuite, getStatusVariant, getWpmTextColor, getScoreTextColor, getMessage, getMessageOrPlaceholder, getBorderColor, getRobotBorderColor, getIntervalMs, isFinished, isWordTyped, calculateWPM, calculateCPS, calculateCPM, getCompetitionResult, getTypingWord, getRemainingPart, getResults, getBestResult, getBestResultCompactString, getBestFrames, getOpponentFrames, getResultByWordCount, getBestWpmResult, getSortedByString, getWordCount, registerResult, registerBestFrames };
222
+ export { getDefaultSuite, getStatusVariant, getWpmTextColor, getScoreTextColor, getMessage, getMessageOrPlaceholder, getBorderColor, getRobotBorderColor, getIntervalMs, isFinished, isWordTyped, calculateWPM, calculateCPS, calculateCPM, getCompetitionResult, getTypingWord, getRemainingPart, getResults, getBestResult, getBestResultCompactString, getBestFrames, getOpponentFrames, getResultByWordCount, getBestWpmResult, getSortedByString, getWordCount, getSuiteByTopic, registerResult, registerBestFrames };
@@ -0,0 +1,13 @@
1
+ {
2
+ "sentences": [
3
+ "It is certain that the gulch was at one time pretty thoroughly prospected by miners, who must have had some means of getting in with at least pack animals carrying tools and supplies; their profits, apparently, were not such as would have justified any considerable outlay to connect Macarger's Gulch with any centre of civilization enjoying the distinction of a sawmill. The house, however, was there, most of it.",
4
+ "It lacked a door and a window frame, and the chimney of mud and stones had fallen into an unlovely heap, overgrown with rank weeds. Such humble furniture as there may once have been and much of the lower weather-boarding, had served as fuel in the camp fires of hunters; as had also, probably, the kerbing of an old well, which at the time I write of existed in the form of a rather wide but not very deep depression near by.",
5
+ "After rather carelessly inspecting the ruin I resumed my sport, and having fairly good success prolonged it until near sunset, when it occurred to me that I was a long way from any human habitation - too far to reach one by nightfall. But in my game bag was food, and the old house would afford shelter, if shelter were needed on a warm and dewless night in the foothills of the Sierra Nevada, where one may sleep in comfort on the pine needles, without covering.",
6
+ "The smoke escaped out of the ruined chimney, the light illuminated the room with a kindly glow, and as I ate my simple meal of plain bird and drank the remains of a bottle of red wine which had served me all the afternoon in place of the water, which the region did not supply, I experienced a sense of comfort which better fare and accommodations do not always give.",
7
+ "Outside these apertures all was black, and I was unable to repress a certain feeling of apprehension as my fancy pictured the outer world and filled it with unfriendly entities, natural and supernatural - chief among which, in their respective classes were the grizzly bear, which I knew was occasionally still seen in that region, and the ghost, which I had reason to think was not.",
8
+ "Unfortunately, our feelings do not always respect the law of probabilities, and to me that evening, the possible and the impossible were equally disquieting. Every one who has had experience in the matter must have observed that one confronts the actual and imaginary perils of the night with far less apprehension in the open air than in a house with an open doorway.",
9
+ "I felt this now as I lay on my leafy couch in a corner of the room next to the chimney and permitted my fire to die out. So strong became my sense of the presence of something malign and menacing in the place, that I found myself almost unable to withdraw my eyes from the opening, as in the deepening darkness it became more and more indistinct.",
10
+ "And when the last little flame flickered and went out I grasped the shotgun which I had laid at my side and actually turned the muzzle in the direction of the now invisible entrance, my thumb on one of the hammers, ready to cock the piece, my breath suspended, my muscles rigid and tense. But later I laid down the weapon with a sense of shame and mortification. What did I fear, and why? - I, to whom the night had been a more familiar face than that of man."
11
+ ],
12
+ "tags": ["ambrose-bierce", "the-secret-of-macargers-gulch"]
13
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "sentences": [
3
+ "For several days, in snow and rain, General Schofield's little army had crouched in its hastily constructed defenses at Columbia, Tennessee. It had retreated in hot haste from Pulaski, thirty miles to the south, arriving just in time to foil Hood, who, marching from Florence, Alabama, by another road, with a force of more than double our strength, had hoped to intercept us. Had he succeeded, he would indubitably have bagged the whole bunch of us.",
4
+ "As it was, he simply took position in front of us and gave us plenty of employment, but did not attack; he knew a trick worth two of that. Duck River was directly in our rear; I suppose both our flanks rested on it. The town was between them. One night--that of November 27, 1864--we pulled up stakes and crossed to the north bank to continue our retreat to Nashville, where Thomas and safety lay - such safety as is known in war.",
5
+ "It was high time too, for before noon of the next day Forrest's cavalry forded the river a few miles above us and began pushing back our own horse toward Spring Hill, ten miles in our rear, on our only road. Why our infantry was not immediately put in motion toward the threatened point, so vital to our safety, General Schofield could have told better than I. Howbeit, we lay there inactive all day. The next morning - a bright and beautiful one - the brigade of Colonel P. Sidney Post was thrown out, up the river four or five miles, to see what it could see.",
6
+ "What it saw was Hood's head-of-column coming over on a pontoon bridge, and a right pretty spectacle it would have been to one whom it did not concern. It concerned us rather keenly. As a member of Colonel Post's staff, I was naturally favored with a good view of the performance. We formed in line of battle at a distance of perhaps a half-mile from the bridge-head, but that unending column of gray and steel gave us no more attention than if we had been a crowd of farmer-folk. Why should it?",
7
+ "It had only to face to the left to be itself a line of battle. Meantime it had more urgent business on hand than brushing away a small brigade whose only offense was curiosity; it was making for Spring Hill with all its legs and wheels. Hour after hour we watched that unceasing flow of infantry and artillery toward the rear of our army. It was an unnerving spectacle, yet we never for a moment doubted that, acting on the intelligence supplied by our succession of couriers, our entire force was moving rapidly to the point of contact. The battle of Spring Hill was obviously decreed.",
8
+ "Obviously, too, our brigade of observation would be among the last to have a hand in it. The thought annoyed us, made us restless and resentful. Our mounted men rode forward and back behind the line, nervous and distressed; the men in the ranks sought relief in frequent changes of posture, in shifting their weight from one leg to the other, in needless inspection of their weapons and in that unfailing resource of the discontented soldier, audible damning of those in the saddles of authority. But never for more than a moment at a time did anyone remove his eyes from that fascinating and portentous pageant.",
9
+ "Toward evening we were recalled, to learn that of our five divisions of infantry, with their batteries, numbering twenty-three thousand men, only one--Stanley's, four thousand weak--had been sent to Spring Hill to meet that formidable movement of Hood's three veteran corps! Why Stanley was not immediately effaced is still a matter of controversy. Hood, who was early on the ground, declared that he gave the needful orders and tried vainly to enforce them; Cheatham, in command of his leading corps, declared that he did not.",
10
+ "Doubtless the dispute is still being carried on between these chieftains from their beds of asphodel and moly in Elysium. So much is certain: Stanley drove away Forrest and successfully held the junction of the roads against Cleburne's division, the only infantry that attacked him. That night the entire Confederate army lay within a half mile of our road, while we all sneaked by, infantry, artillery, and trains. The enemy's camp-fires shone redly - miles of them - seeming only a stone's throw from our hurrying column.",
11
+ "His men were plainly visible about them, cooking their suppers - a sight so incredible that many of our own, thinking them friends, strayed over to them and did not return. At intervals of a few hundred yards we passed dim figures on horseback by the roadside, enjoining silence. Needless precaution; we could not have spoken if we had tried, for our hearts were in our throats. But fools are God's peculiar care, and one of his protective methods is the stupidity of other fools. By daybreak our last man and last wagon had passed the fateful spot unchallenged, and our first were entering Franklin, ten miles away.",
12
+ "Despite spirited cavalry attacks on trains and rear-guard, all were in Franklin by noon and such of the men as could be kept awake were throwing up a slight line of defense, inclosing the town. Franklin lies - or at that time did lie; I know not what exploration might now disclose - on the south bank of a small river, the Harpeth by name. For two miles southward was a nearly flat, open plain, extending to a range of low hills through which passed the turnpike by which we had come.",
13
+ "From some bluffs on the precipitous north bank of the river was a commanding overlook of all this open ground, which, although more than a mile away, seemed almost at one's feet. On this elevated ground the wagon-train had been parked and General Schofield had stationed himself - the former for security, the latter for outlook. Both were guarded by General Wood's infantry division, of which my brigade was a part. \"We are in beautiful luck,\" said a member of the division staff. With some prevision of what was to come and a lively recollection of the nervous strain of helpless observation, I did not think it luck."
14
+ ],
15
+ "tags": ["ambrose-bierce", "what-occured-at-franklin"]
16
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "sentences": [
3
+ "He paused a moment at the door, and seemed struggling to command his feelings sufficiently to enable him to speak, and then, nodding his head toward his manuscript, ejaculated in a broken voice, \"Friend of mine-oh! how sad!\" and burst into tears. We were so moved at his distress that we did not think to call him back and endeavor to comfort him until he was gone, and it was too late.",
4
+ "The paper had already gone to press, but knowing that our friend would consider the publication of this item important, and cherishing the hope that to print it would afford a melancholy satisfaction to his sorrowing heart, we stopped, the press at once and inserted it in our columns: But such is life. Let us all take warning by this solemn occurrence, and let us endeavor so to conduct ourselves that when we come to die we can do it.",
5
+ "Let us place our hands upon our heart, and say with earnestness and sincerity that from this day forth we will beware of the intoxicating bowl.-'First Edition of the Californian.' The head editor has been in here raising the mischief, and tearing his hair and kicking the furniture about, and abusing me like a pickpocket. He says that every time he leaves me in charge of the paper for half an hour I get imposed upon by the first infant or the first idiot that comes along.",
6
+ "If I had been as unaccommodating and unsympathetic as some people, I would have told Mr. Bloke that I wouldn't receive his communication at such a late hour; but no, his snuffling distress touched my heart, and I jumped at the chance of doing something to modify his misery. I never read his item to see whether there was anything wrong about it, but hastily wrote the few lines which preceded it, and sent it to the printers. And what has my kindness done for me?",
7
+ "It has done nothing but bring down upon me a storm of abuse and ornamental blasphemy. Now I will read that item myself, and see if there is any foundation for all this fuss. And if there is, the author of it shall hear from me. I have read it, and I am bound to admit that it seems a little mixed at a first glance. However, I will peruse it once more. I have read it again, and it does really seem a good deal more mixed than ever.",
8
+ "Who is William Schuyler, anyhow, and what part of South Park did he live in, and if he started down-town at six o'clock, did he ever get there, and if he did, did anything happen to him? Is he the individual that met with the \"distressing accident\"? Considering the elaborate circumstantiality of detail observable in the item, it seems to me that it ought to contain more information than it does. On the contrary, it is obscure and not only obscure, but utterly incomprehensible.",
9
+ "Was the breaking of Mr. Schuyler's leg, fifteen years ago, the \"distressing accident\" that plunged Mr. Bloke into unspeakable grief, and caused him to come up here at dead of night and stop our press to acquaint the world with the circumstance? Or did the \"distressing accident\" consist in the destruction of Schuyler's mother-in-law's property in early times?",
10
+ "Or did it consist in the death of that person herself three years ago (albeit it does not appear that she died by accident)? In a word, what did that \"distressing accident\" consist in? What did that driveling ass of a Schuyler stand in the wake of a runaway horse for, with his shouting and gesticulating, if he wanted to stop him? And how the mischief could he get run over by a horse that had already passed beyond him? And what are we to take \"warning\" by?",
11
+ "And how is this extraordinary chapter of incomprehensibilities going to be a \"lesson\" to us? And, above all, what has the intoxicating \"bowl\" got to do with it, anyhow? It is not stated that Schuyler drank, or that his wife drank, or that his mother-in-law drank, or that the horse drank wherefore, then, the reference to the intoxicating bowl?",
12
+ "There certainly seems to have been an accident of some kind or other, but it is impossible to determine what the nature of it was, or who was the sufferer by it. I do not like to do it, but I feel compelled to request that the next time anything happens to one of Mr. Bloke's friends, he will append such explanatory notes to his account of it as will enable me to find out what sort of an accident it was and whom it happened to."
13
+ ],
14
+ "tags": ["marktwain", "mrblokesitem"]
15
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typing-game-cli",
3
3
  "description": "Command line game to practice your typing speed by competing against typer-robot or against your best result",
4
- "version": "5.0.0",
4
+ "version": "6.1.0",
5
5
  "homepage": "https://github.com/akgondber/typing-game-cli",
6
6
  "repository": "akgondber/typing-game-cli",
7
7
  "author": "Rushan Alyautdinov <akgondber@gmail.com>",
@@ -25,7 +25,9 @@
25
25
  "go": "node dist/cli.js",
26
26
  "prettify": "prettier . --write",
27
27
  "xofix": "xo --fix",
28
- "pretcheck": "prettier --check ."
28
+ "pretcheck": "prettier --check .",
29
+ "telint": "textlint README.md",
30
+ "bumpp": "bumpp"
29
31
  },
30
32
  "files": [
31
33
  "dist"
@@ -52,6 +54,7 @@
52
54
  "@babel/cli": "^7.22.5",
53
55
  "@babel/preset-react": "^7.25.9",
54
56
  "ava": "^6.1.2",
57
+ "bumpp": "^10.2.0",
55
58
  "eslint-config-xo-react": "^0.27.0",
56
59
  "eslint-plugin-react": "^7.34.1",
57
60
  "eslint-plugin-react-hooks": "^4.6.0",
@@ -59,6 +62,9 @@
59
62
  "ink-testing-library": "^3.0.0",
60
63
  "loadr": "^0.1.1",
61
64
  "prettier": "^3.2.5",
65
+ "textlint": "^15.2.0",
66
+ "textlint-rule-doubled-spaces": "^1.0.2",
67
+ "textlint-rule-no-dead-link": "^5.2.0",
62
68
  "xo": "^0.58.0"
63
69
  },
64
70
  "ava": {
package/readme.md CHANGED
@@ -31,6 +31,8 @@ $ npm install --global typing-game-cli
31
31
  --sort-by Sort results by specified value (-cpm, cpm, -wpm, wpm, -date, date), Starting "-" indicates descending order, default is "-date"
32
32
  --all-hostory Show all history when displaying results (otherwise (default) display last 10 results respecting sorting parameter)
33
33
  --compact-result Display top result in compact format
34
+ --topic Use sentences from works written by specified author
35
+ --top-n Display top n results when `--display-results` is being used
34
36
 
35
37
  Short flags and aliases for options:
36
38
  --against-my-best: -b, --best, --my-best, --myself, --against-my-best-result
@@ -43,6 +45,8 @@ $ npm install --global typing-game-cli
43
45
  --show-all-history: -a, --all, --all-history
44
46
  --clear-results: -c, --clear
45
47
  --compact-result --cmpc
48
+ --topic --author
49
+ --top-n --top
46
50
 
47
51
 
48
52
  Examples
@@ -54,11 +58,14 @@ $ npm install --global typing-game-cli
54
58
  $ typing-game-cli -m
55
59
  $ typing-game-cli --low
56
60
  $ typing-game-cli --display-results
61
+ $ typing-game-cli --display-results --top 3
57
62
  $ typing-game-cli -r
58
63
  $ typing-game-cli -r --sort-by="-wpm"
59
64
  $ typing-game-cli -r -s="wpm"
60
65
  $ typing-game-cli -r -s="-wpm" --all-history
61
66
  $ typing-game-cli -r -s="-wpm" -a
67
+ $ typing-game-cli --topic ambrose-bierce
68
+ $ typing-game-cli --author mark-twain
62
69
  ```
63
70
 
64
71
  ## Demo
@@ -93,6 +100,10 @@ $ tgc -b
93
100
 
94
101
  ![](media/competition-against-best-result-2.png)
95
102
 
103
+ #### Example - Display top n results
104
+
105
+ ![](media/display-top-n-results.png)
106
+
96
107
  ## License
97
108
 
98
109
  MIT © [Rushan Alyautdinov](https://github.com/akgondber)