terminal-quest 1.1.2 → 1.2.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/App.js +2 -2
- package/dist/components/HintBar.js +3 -2
- package/dist/data/commands-meta.js +112 -106
- package/dist/data/stories/00-beginner-pc.js +127 -112
- package/dist/data/stories/01-first-server.js +11 -5
- package/dist/data/stories/02-messy-project.js +14 -7
- package/dist/data/stories/03-log-detective.js +22 -6
- package/dist/data/stories/04-deploy-day.js +64 -10
- package/dist/data/stories/05-git-incident.js +80 -19
- package/dist/data/stories/06-pipe-master.js +74 -14
- package/dist/data/stories/07-dangerous-commands.js +79 -12
- package/dist/data/stories/k1-treasure-hunt.js +160 -145
- package/dist/data/types.d.ts +1 -1
- package/dist/engine/CommandFeedback.js +10 -3
- package/dist/engine/CommandHandler.js +5 -0
- package/dist/engine/commands/cat.js +12 -1
- package/dist/engine/commands/cut.js +3 -0
- package/dist/engine/commands/grep.js +6 -0
- package/dist/engine/commands/head.js +3 -0
- package/dist/engine/commands/help.js +7 -3
- package/dist/engine/commands/sort.js +3 -0
- package/dist/engine/commands/tail.js +3 -0
- package/dist/engine/commands/uniq.js +3 -0
- package/dist/screens/StorySelectScreen.d.ts +2 -1
- package/dist/screens/StorySelectScreen.js +55 -7
- package/dist/screens/TerminalScreen.js +67 -17
- package/dist/state/useGameState.d.ts +1 -0
- package/dist/state/useGameState.js +13 -2
- package/package.json +1 -1
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
const mission1FS = {
|
|
3
3
|
type: 'directory',
|
|
4
4
|
children: {
|
|
5
|
-
|
|
5
|
+
world: {
|
|
6
6
|
type: 'directory',
|
|
7
7
|
children: {
|
|
8
|
-
|
|
8
|
+
start: {
|
|
9
9
|
type: 'directory',
|
|
10
10
|
children: {
|
|
11
|
-
'
|
|
11
|
+
'sign.txt': {
|
|
12
12
|
type: 'file',
|
|
13
13
|
content: 'ようこそ、冒険の世界へ!\nここからきみの冒険がはじまるよ。\nまずは、いまいる場所をたしかめてみよう!\n',
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
|
-
|
|
17
|
+
forest: {
|
|
18
18
|
type: 'directory',
|
|
19
19
|
children: {},
|
|
20
20
|
},
|
|
21
|
-
|
|
21
|
+
castle: {
|
|
22
22
|
type: 'directory',
|
|
23
23
|
children: {},
|
|
24
24
|
},
|
|
@@ -30,30 +30,30 @@ const mission1FS = {
|
|
|
30
30
|
const mission2FS = {
|
|
31
31
|
type: 'directory',
|
|
32
32
|
children: {
|
|
33
|
-
|
|
33
|
+
world: {
|
|
34
34
|
type: 'directory',
|
|
35
35
|
children: {
|
|
36
|
-
|
|
36
|
+
start: {
|
|
37
37
|
type: 'directory',
|
|
38
38
|
children: {
|
|
39
|
-
'
|
|
39
|
+
'sign.txt': {
|
|
40
40
|
type: 'file',
|
|
41
41
|
content: 'ようこそ、冒険の世界へ!\nここからきみの冒険がはじまるよ。\nまずは、いまいる場所をたしかめてみよう!\n',
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
|
-
|
|
45
|
+
forest: {
|
|
46
46
|
type: 'directory',
|
|
47
47
|
children: {
|
|
48
|
-
'
|
|
48
|
+
'flower.txt': {
|
|
49
49
|
type: 'file',
|
|
50
50
|
content: 'きれいに光る花だ。さわるとあたたかい。\n',
|
|
51
51
|
},
|
|
52
|
-
'
|
|
52
|
+
'scroll.txt': {
|
|
53
53
|
type: 'file',
|
|
54
54
|
content: 'この巻物には古い言い伝えが書いてある。\n『北の洞窟に宝が眠る』\n',
|
|
55
55
|
},
|
|
56
|
-
'
|
|
56
|
+
'hint.txt': {
|
|
57
57
|
type: 'file',
|
|
58
58
|
content: '森を抜けたら、スタート地点に戻ってこよう。\n',
|
|
59
59
|
},
|
|
@@ -67,10 +67,10 @@ const mission2FS = {
|
|
|
67
67
|
const mission3FS = {
|
|
68
68
|
type: 'directory',
|
|
69
69
|
children: {
|
|
70
|
-
|
|
70
|
+
world: {
|
|
71
71
|
type: 'directory',
|
|
72
72
|
children: {
|
|
73
|
-
|
|
73
|
+
start: {
|
|
74
74
|
type: 'directory',
|
|
75
75
|
children: {},
|
|
76
76
|
},
|
|
@@ -82,25 +82,25 @@ const mission3FS = {
|
|
|
82
82
|
const mission4FS = {
|
|
83
83
|
type: 'directory',
|
|
84
84
|
children: {
|
|
85
|
-
|
|
85
|
+
world: {
|
|
86
86
|
type: 'directory',
|
|
87
87
|
children: {
|
|
88
|
-
|
|
88
|
+
forest: {
|
|
89
89
|
type: 'directory',
|
|
90
90
|
children: {
|
|
91
|
-
'
|
|
91
|
+
'gem.txt': {
|
|
92
92
|
type: 'file',
|
|
93
93
|
content: 'キラキラ光る美しい宝石だ。\n',
|
|
94
94
|
},
|
|
95
95
|
},
|
|
96
96
|
},
|
|
97
|
-
|
|
97
|
+
castle: {
|
|
98
98
|
type: 'directory',
|
|
99
99
|
children: {
|
|
100
|
-
|
|
100
|
+
treasure: {
|
|
101
101
|
type: 'directory',
|
|
102
102
|
children: {
|
|
103
|
-
'
|
|
103
|
+
'sword.txt': {
|
|
104
104
|
type: 'file',
|
|
105
105
|
content: '古代の勇者が使っていた伝説の剣だ。\n',
|
|
106
106
|
},
|
|
@@ -108,10 +108,10 @@ const mission4FS = {
|
|
|
108
108
|
},
|
|
109
109
|
},
|
|
110
110
|
},
|
|
111
|
-
|
|
111
|
+
base: {
|
|
112
112
|
type: 'directory',
|
|
113
113
|
children: {
|
|
114
|
-
|
|
114
|
+
treasure: {
|
|
115
115
|
type: 'directory',
|
|
116
116
|
children: {},
|
|
117
117
|
},
|
|
@@ -125,32 +125,32 @@ const mission4FS = {
|
|
|
125
125
|
const mission5FS = {
|
|
126
126
|
type: 'directory',
|
|
127
127
|
children: {
|
|
128
|
-
|
|
128
|
+
world: {
|
|
129
129
|
type: 'directory',
|
|
130
130
|
children: {
|
|
131
|
-
|
|
131
|
+
cave: {
|
|
132
132
|
type: 'directory',
|
|
133
133
|
children: {
|
|
134
|
-
'
|
|
134
|
+
'trap1.txt': {
|
|
135
135
|
type: 'file',
|
|
136
136
|
content: '⚠ これはトラップだ!さわると大変!\n',
|
|
137
137
|
},
|
|
138
|
-
'
|
|
138
|
+
'trap2.txt': {
|
|
139
139
|
type: 'file',
|
|
140
140
|
content: '⚠ これはトラップだ!さわると大変!\n',
|
|
141
141
|
},
|
|
142
|
-
'
|
|
142
|
+
'map.txt': {
|
|
143
143
|
type: 'file',
|
|
144
144
|
content: '宝はこの洞窟の奥にあるらしい。\n',
|
|
145
145
|
},
|
|
146
|
-
|
|
146
|
+
'back-room': {
|
|
147
147
|
type: 'directory',
|
|
148
148
|
children: {
|
|
149
|
-
'
|
|
149
|
+
'trap3.txt': {
|
|
150
150
|
type: 'file',
|
|
151
151
|
content: '⚠ これはトラップだ!さわると大変!\n',
|
|
152
152
|
},
|
|
153
|
-
'
|
|
153
|
+
'chest.txt': {
|
|
154
154
|
type: 'file',
|
|
155
155
|
content: 'おめでとう!宝箱を見つけた!\n中には金貨がたくさん入っている。\n',
|
|
156
156
|
},
|
|
@@ -166,13 +166,13 @@ const mission5FS = {
|
|
|
166
166
|
const mission6FS = {
|
|
167
167
|
type: 'directory',
|
|
168
168
|
children: {
|
|
169
|
-
|
|
169
|
+
world: {
|
|
170
170
|
type: 'directory',
|
|
171
171
|
children: {
|
|
172
|
-
|
|
172
|
+
cave: {
|
|
173
173
|
type: 'directory',
|
|
174
174
|
children: {
|
|
175
|
-
'
|
|
175
|
+
'cipher.txt': {
|
|
176
176
|
type: 'file',
|
|
177
177
|
content: [
|
|
178
178
|
'むかしむかし、ある国に王様がいました。',
|
|
@@ -216,16 +216,16 @@ const magicBookContent = [
|
|
|
216
216
|
const mission7FS = {
|
|
217
217
|
type: 'directory',
|
|
218
218
|
children: {
|
|
219
|
-
|
|
219
|
+
world: {
|
|
220
220
|
type: 'directory',
|
|
221
221
|
children: {
|
|
222
|
-
|
|
222
|
+
castle: {
|
|
223
223
|
type: 'directory',
|
|
224
224
|
children: {
|
|
225
|
-
|
|
225
|
+
library: {
|
|
226
226
|
type: 'directory',
|
|
227
227
|
children: {
|
|
228
|
-
'
|
|
228
|
+
'spellbook.txt': {
|
|
229
229
|
type: 'file',
|
|
230
230
|
content: magicBookContent,
|
|
231
231
|
},
|
|
@@ -241,13 +241,13 @@ const mission7FS = {
|
|
|
241
241
|
const mission8FS = {
|
|
242
242
|
type: 'directory',
|
|
243
243
|
children: {
|
|
244
|
-
|
|
244
|
+
world: {
|
|
245
245
|
type: 'directory',
|
|
246
246
|
children: {
|
|
247
|
-
|
|
247
|
+
castle: {
|
|
248
248
|
type: 'directory',
|
|
249
249
|
children: {
|
|
250
|
-
'
|
|
250
|
+
'party.csv': {
|
|
251
251
|
type: 'file',
|
|
252
252
|
content: [
|
|
253
253
|
'名前,職業,レベル',
|
|
@@ -271,22 +271,22 @@ const mission8FS = {
|
|
|
271
271
|
const mission9FS = {
|
|
272
272
|
type: 'directory',
|
|
273
273
|
children: {
|
|
274
|
-
|
|
274
|
+
world: {
|
|
275
275
|
type: 'directory',
|
|
276
276
|
children: {
|
|
277
|
-
|
|
277
|
+
castle: {
|
|
278
278
|
type: 'directory',
|
|
279
279
|
children: {
|
|
280
|
-
'
|
|
280
|
+
'seal.sh': {
|
|
281
281
|
type: 'file',
|
|
282
282
|
content: '#!/bin/bash\necho "封印が解けた!大きな扉が開く!"\n',
|
|
283
283
|
permissions: '-rw-r--r--',
|
|
284
284
|
},
|
|
285
|
-
'
|
|
285
|
+
'stone.txt': {
|
|
286
286
|
type: 'file',
|
|
287
287
|
content: '火の魔法\n水の魔法\n風の魔法\n土の魔法\n光の魔法\n闇の魔法\n',
|
|
288
288
|
},
|
|
289
|
-
'
|
|
289
|
+
'wand.txt': {
|
|
290
290
|
type: 'file',
|
|
291
291
|
content: '古代の杖 - すべての魔法を増幅する\n',
|
|
292
292
|
},
|
|
@@ -322,17 +322,17 @@ const gitStatusOutput = [
|
|
|
322
322
|
' (use "git add <file>..." to update what will be committed)',
|
|
323
323
|
' (use "git restore <file>..." to discard changes in working directory)',
|
|
324
324
|
'',
|
|
325
|
-
'\tmodified:
|
|
325
|
+
'\tmodified: diary.txt',
|
|
326
326
|
'',
|
|
327
327
|
'no changes added to commit (use "git add" to track)',
|
|
328
328
|
].join('\n');
|
|
329
329
|
const mission10FS = {
|
|
330
330
|
type: 'directory',
|
|
331
331
|
children: {
|
|
332
|
-
|
|
332
|
+
world: {
|
|
333
333
|
type: 'directory',
|
|
334
334
|
children: {
|
|
335
|
-
|
|
335
|
+
base: {
|
|
336
336
|
type: 'directory',
|
|
337
337
|
children: {
|
|
338
338
|
'.git': {
|
|
@@ -344,19 +344,19 @@ const mission10FS = {
|
|
|
344
344
|
},
|
|
345
345
|
branches: {
|
|
346
346
|
type: 'file',
|
|
347
|
-
content: '
|
|
347
|
+
content: 'main',
|
|
348
348
|
},
|
|
349
349
|
log: {
|
|
350
350
|
type: 'file',
|
|
351
351
|
content: gitLogContent,
|
|
352
352
|
},
|
|
353
|
-
|
|
353
|
+
status: {
|
|
354
354
|
type: 'file',
|
|
355
355
|
content: gitStatusOutput,
|
|
356
356
|
},
|
|
357
357
|
},
|
|
358
358
|
},
|
|
359
|
-
'
|
|
359
|
+
'diary.txt': {
|
|
360
360
|
type: 'file',
|
|
361
361
|
content: '今日は秘密基地で冒険の記録をまとめた。\n新しい仲間もできた。\n明日はもっと遠くへ冒険しよう。\n',
|
|
362
362
|
},
|
|
@@ -385,8 +385,8 @@ export const storyK1 = {
|
|
|
385
385
|
correctIndex: 2,
|
|
386
386
|
explanation: 'pwd はいまいるばしょ(ディレクトリ)をひょうじするコマンドだよ。「Print Working Directory」のりゃくだよ。',
|
|
387
387
|
},
|
|
388
|
-
narrative: '
|
|
389
|
-
initialCwd: '
|
|
388
|
+
narrative: 'きみは冒険の世界(world)にやってきた!start(スタート地点)にいるみたいだけど、ここはどこだろう?まずは「いまいる場所」をたしかめて、まわりに何があるか見てみよう。',
|
|
389
|
+
initialCwd: '/world/start',
|
|
390
390
|
initialFS: mission1FS,
|
|
391
391
|
newCommands: ['pwd', 'ls'],
|
|
392
392
|
objectives: [
|
|
@@ -426,7 +426,7 @@ export const storyK1 = {
|
|
|
426
426
|
{
|
|
427
427
|
id: 'mission-k1-02',
|
|
428
428
|
title: '森を冒険しよう',
|
|
429
|
-
description: '
|
|
429
|
+
description: 'forest(もり)にいって、scroll.txt(巻物)を読んでみよう!',
|
|
430
430
|
goal: 'cd でべつの場所にいどうし、cat でファイルを読めるようになる',
|
|
431
431
|
review: {
|
|
432
432
|
question: 'べつのばしょにいどうするコマンドはどれかな?',
|
|
@@ -434,19 +434,19 @@ export const storyK1 = {
|
|
|
434
434
|
correctIndex: 2,
|
|
435
435
|
explanation: 'cd はべつのばしょ(ディレクトリ)にいどうするコマンドだよ。「Change Directory」のりゃくだよ。',
|
|
436
436
|
},
|
|
437
|
-
narrative: '
|
|
438
|
-
initialCwd: '
|
|
437
|
+
narrative: '案内板(sign.txt)に「森(forest)には何かひみつがある」と書いてあった。forest にいって、手がかりをさがそう!巻物を読んだら、start(スタート地点)にもどってこよう。',
|
|
438
|
+
initialCwd: '/world/start',
|
|
439
439
|
initialFS: mission2FS,
|
|
440
440
|
newCommands: ['cd', 'cat'],
|
|
441
441
|
objectives: [
|
|
442
442
|
{
|
|
443
443
|
id: 'obj-k1-02-01',
|
|
444
|
-
description: '
|
|
445
|
-
checks: [{ type: 'cwd_equals', path: '
|
|
444
|
+
description: 'forest(もり)にいどうしよう',
|
|
445
|
+
checks: [{ type: 'cwd_equals', path: '/world/forest' }],
|
|
446
446
|
hints: [
|
|
447
447
|
{ level: 1, text: 'べつの場所にいどうするコマンドがあるよ。' },
|
|
448
448
|
{ level: 2, text: '「cd」のあとに、いきたい場所の名前を書くよ。' },
|
|
449
|
-
{ level: 3, text: '「cd
|
|
449
|
+
{ level: 3, text: '「cd /world/forest」とにゅうりょくしてね。forest はもりのことだよ。' },
|
|
450
450
|
],
|
|
451
451
|
feedbacks: [
|
|
452
452
|
{ pattern: 'pwd', message: 'pwd はいまいる場所をたしかめるコマンドだよ。べつの場所にいくには、いどうするコマンドをつかうよ。' },
|
|
@@ -456,12 +456,15 @@ export const storyK1 = {
|
|
|
456
456
|
},
|
|
457
457
|
{
|
|
458
458
|
id: 'obj-k1-02-02',
|
|
459
|
-
description: '
|
|
460
|
-
checks: [
|
|
459
|
+
description: 'scroll.txt(巻物)を読んでみよう',
|
|
460
|
+
checks: [
|
|
461
|
+
{ type: 'command_executed', command: 'cat' },
|
|
462
|
+
{ type: 'output_contains', pattern: '宝' },
|
|
463
|
+
],
|
|
461
464
|
hints: [
|
|
462
465
|
{ level: 1, text: 'ファイルの中身を読むコマンドがあるよ。' },
|
|
463
466
|
{ level: 2, text: '「cat」のあとにファイル名を書くと、中身が読めるよ。' },
|
|
464
|
-
{ level: 3, text: '「cat
|
|
467
|
+
{ level: 3, text: '「cat scroll.txt」とにゅうりょくしてね。scroll は巻物のことだよ。' },
|
|
465
468
|
],
|
|
466
469
|
feedbacks: [
|
|
467
470
|
{ pattern: 'pwd', message: 'pwd はいまいる場所をたしかめるコマンドだよ。ファイルの中身を読むには、べつのコマンドをつかうよ。' },
|
|
@@ -471,12 +474,12 @@ export const storyK1 = {
|
|
|
471
474
|
},
|
|
472
475
|
{
|
|
473
476
|
id: 'obj-k1-02-03',
|
|
474
|
-
description: '
|
|
475
|
-
checks: [{ type: 'cwd_equals', path: '
|
|
477
|
+
description: 'start(スタート地点)にもどろう',
|
|
478
|
+
checks: [{ type: 'cwd_equals', path: '/world/start' }],
|
|
476
479
|
hints: [
|
|
477
480
|
{ level: 1, text: 'さっきつかった「cd」コマンドでもどれるよ。' },
|
|
478
|
-
{ level: 2, text: '
|
|
479
|
-
{ level: 3, text: '「cd
|
|
481
|
+
{ level: 2, text: 'start のフルパスを指定しよう。' },
|
|
482
|
+
{ level: 3, text: '「cd /world/start」とにゅうりょくしてね。start はスタート地点のことだよ。' },
|
|
480
483
|
],
|
|
481
484
|
feedbacks: [
|
|
482
485
|
{ pattern: 'pwd', message: 'pwd はいまいる場所をたしかめるコマンドだよ。もどるには、いどうするコマンドをつかうよ。' },
|
|
@@ -490,7 +493,7 @@ export const storyK1 = {
|
|
|
490
493
|
{
|
|
491
494
|
id: 'mission-k1-03',
|
|
492
495
|
title: '秘密基地を作ろう',
|
|
493
|
-
description: '
|
|
496
|
+
description: 'じぶんだけの秘密基地(base)をつくろう!部屋もつくって、ノートもおこう。',
|
|
494
497
|
goal: 'mkdir でフォルダをつくり、touch でファイルをつくれるようになる',
|
|
495
498
|
review: {
|
|
496
499
|
question: 'あたらしいフォルダをつくるコマンドはどれかな?',
|
|
@@ -498,19 +501,19 @@ export const storyK1 = {
|
|
|
498
501
|
correctIndex: 1,
|
|
499
502
|
explanation: 'mkdir はあたらしいフォルダ(ディレクトリ)をつくるコマンドだよ。「Make Directory」のりゃくだよ。',
|
|
500
503
|
},
|
|
501
|
-
narrative: '
|
|
502
|
-
initialCwd: '
|
|
504
|
+
narrative: '冒険には秘密基地がひつようだ!まずは base(秘密基地)をつくって、たからものをしまう treasure(宝物庫)と、冒険のきろくをつける note.txt(冒険ノート)を用意しよう。',
|
|
505
|
+
initialCwd: '/world',
|
|
503
506
|
initialFS: mission3FS,
|
|
504
507
|
newCommands: ['mkdir', 'touch'],
|
|
505
508
|
objectives: [
|
|
506
509
|
{
|
|
507
510
|
id: 'obj-k1-03-01',
|
|
508
|
-
description: '
|
|
509
|
-
checks: [{ type: 'file_exists', path: '
|
|
511
|
+
description: 'base(秘密基地)をつくろう',
|
|
512
|
+
checks: [{ type: 'file_exists', path: '/world/base' }],
|
|
510
513
|
hints: [
|
|
511
514
|
{ level: 1, text: 'あたらしいフォルダをつくるコマンドがあるよ。' },
|
|
512
515
|
{ level: 2, text: '「mkdir」のあとにフォルダの名前を書くよ。' },
|
|
513
|
-
{ level: 3, text: '「mkdir
|
|
516
|
+
{ level: 3, text: '「mkdir base」とにゅうりょくしてね。base は秘密基地のことだよ。' },
|
|
514
517
|
],
|
|
515
518
|
feedbacks: [
|
|
516
519
|
{ pattern: 'touch', message: 'touch はからっぽのファイルをつくるコマンドだよ。フォルダをつくるには、べつのコマンドをつかうよ。' },
|
|
@@ -520,12 +523,12 @@ export const storyK1 = {
|
|
|
520
523
|
},
|
|
521
524
|
{
|
|
522
525
|
id: 'obj-k1-03-02',
|
|
523
|
-
description: '
|
|
524
|
-
checks: [{ type: 'file_exists', path: '
|
|
526
|
+
description: 'base の中に treasure(宝物庫)をつくろう',
|
|
527
|
+
checks: [{ type: 'file_exists', path: '/world/base/treasure' }],
|
|
525
528
|
hints: [
|
|
526
529
|
{ level: 1, text: '秘密基地の中にもうひとつフォルダをつくろう。' },
|
|
527
530
|
{ level: 2, text: '「mkdir」でパスを指定して、中にフォルダがつくれるよ。' },
|
|
528
|
-
{ level: 3, text: '「mkdir
|
|
531
|
+
{ level: 3, text: '「mkdir base/treasure」とにゅうりょくしてね。treasure は宝物庫のことだよ。' },
|
|
529
532
|
],
|
|
530
533
|
feedbacks: [
|
|
531
534
|
{ pattern: 'touch', message: 'touch はファイルをつくるコマンドだよ。フォルダをつくるには、さっきとおなじコマンドをつかうよ。' },
|
|
@@ -534,14 +537,14 @@ export const storyK1 = {
|
|
|
534
537
|
},
|
|
535
538
|
{
|
|
536
539
|
id: 'obj-k1-03-03',
|
|
537
|
-
description: '
|
|
540
|
+
description: 'note.txt(冒険ノート)をつくろう',
|
|
538
541
|
checks: [
|
|
539
|
-
{ type: 'file_exists', path: '
|
|
542
|
+
{ type: 'file_exists', path: '/world/base/note.txt' },
|
|
540
543
|
],
|
|
541
544
|
hints: [
|
|
542
545
|
{ level: 1, text: 'からっぽのファイルをつくるコマンドがあるよ。' },
|
|
543
546
|
{ level: 2, text: '「touch」のあとにファイル名を書くと、ファイルがつくれるよ。' },
|
|
544
|
-
{ level: 3, text: '「touch
|
|
547
|
+
{ level: 3, text: '「touch base/note.txt」とにゅうりょくしてね。note は冒険ノートのことだよ。' },
|
|
545
548
|
],
|
|
546
549
|
feedbacks: [
|
|
547
550
|
{ pattern: 'mkdir', message: 'mkdir はフォルダをつくるコマンドだよ。からっぽのファイルをつくるには、べつのコマンドをつかうよ。' },
|
|
@@ -555,7 +558,7 @@ export const storyK1 = {
|
|
|
555
558
|
{
|
|
556
559
|
id: 'mission-k1-04',
|
|
557
560
|
title: '宝物を集めよう',
|
|
558
|
-
description: '
|
|
561
|
+
description: 'いろんな場所にある宝物を base(秘密基地)の treasure(宝物庫)にあつめよう!',
|
|
559
562
|
goal: 'cp でコピー、mv でいどうができるようになる',
|
|
560
563
|
review: {
|
|
561
564
|
question: 'ファイルをコピーするコマンドはどれかな?',
|
|
@@ -563,26 +566,26 @@ export const storyK1 = {
|
|
|
563
566
|
correctIndex: 1,
|
|
564
567
|
explanation: 'cp はファイルをコピーするコマンドだよ。もとのファイルはそのままのこるよ。「copy」のりゃくだよ。',
|
|
565
568
|
},
|
|
566
|
-
narrative: '
|
|
567
|
-
initialCwd: '
|
|
569
|
+
narrative: '冒険の世界にはたからものがいっぱい!forest(もり)にある gem.txt(宝石)をコピーして、castle(お城)にある sword.txt(伝説の剣)を base/treasure(秘密基地の宝物庫)にうつそう。',
|
|
570
|
+
initialCwd: '/world',
|
|
568
571
|
initialFS: mission4FS,
|
|
569
572
|
newCommands: ['cp', 'mv'],
|
|
570
573
|
objectives: [
|
|
571
574
|
{
|
|
572
575
|
id: 'obj-k1-04-01',
|
|
573
|
-
description: '
|
|
576
|
+
description: 'gem.txt(宝石)を base/treasure(宝物庫)にコピーしよう',
|
|
574
577
|
checks: [
|
|
575
578
|
{
|
|
576
579
|
type: 'file_exists',
|
|
577
|
-
path: '
|
|
580
|
+
path: '/world/base/treasure/gem.txt',
|
|
578
581
|
},
|
|
579
582
|
],
|
|
580
583
|
hints: [
|
|
581
584
|
{ level: 1, text: 'ファイルをコピーするコマンドがあるよ。' },
|
|
582
|
-
{ level: 2, text: '「cp
|
|
585
|
+
{ level: 2, text: '「cp」のあとに「もとのファイル」「コピーさき」を書くよ。もとのファイルは「forest/gem.txt」で、コピーさきは「base/treasure/」だよ。' },
|
|
583
586
|
{
|
|
584
587
|
level: 3,
|
|
585
|
-
text: '「cp
|
|
588
|
+
text: '「cp forest/gem.txt base/treasure/gem.txt」とにゅうりょくしてね。gem は宝石のことだよ。',
|
|
586
589
|
},
|
|
587
590
|
],
|
|
588
591
|
feedbacks: [
|
|
@@ -593,11 +596,11 @@ export const storyK1 = {
|
|
|
593
596
|
},
|
|
594
597
|
{
|
|
595
598
|
id: 'obj-k1-04-02',
|
|
596
|
-
description: '
|
|
599
|
+
description: 'sword.txt(伝説の剣)を base/treasure(宝物庫)にうつそう',
|
|
597
600
|
checks: [
|
|
598
601
|
{
|
|
599
602
|
type: 'file_exists',
|
|
600
|
-
path: '
|
|
603
|
+
path: '/world/base/treasure/sword.txt',
|
|
601
604
|
},
|
|
602
605
|
],
|
|
603
606
|
hints: [
|
|
@@ -605,7 +608,7 @@ export const storyK1 = {
|
|
|
605
608
|
{ level: 2, text: '「mv」のあとに「もとのファイル」「うつしさき」を書くよ。コピーとちがって、もとのファイルはなくなるよ。' },
|
|
606
609
|
{
|
|
607
610
|
level: 3,
|
|
608
|
-
text: '「mv
|
|
611
|
+
text: '「mv castle/treasure/sword.txt base/treasure/sword.txt」とにゅうりょくしてね。sword は剣のことだよ。',
|
|
609
612
|
},
|
|
610
613
|
],
|
|
611
614
|
feedbacks: [
|
|
@@ -620,7 +623,7 @@ export const storyK1 = {
|
|
|
620
623
|
{
|
|
621
624
|
id: 'mission-k1-05',
|
|
622
625
|
title: 'トラップを片付けよう',
|
|
623
|
-
description: '
|
|
626
|
+
description: 'cave(ひみつの洞窟)にしかけられたトラップを見つけて、かたづけよう!',
|
|
624
627
|
goal: 'find でファイルをさがし、rm でけせるようになる',
|
|
625
628
|
review: {
|
|
626
629
|
question: 'ファイルをけすコマンドはどれかな?',
|
|
@@ -628,21 +631,24 @@ export const storyK1 = {
|
|
|
628
631
|
correctIndex: 2,
|
|
629
632
|
explanation: 'rm はファイルをけすコマンドだよ。「remove」のりゃくだよ。けしたファイルはもとにもどせないから、きをつけてつかおうね。',
|
|
630
633
|
},
|
|
631
|
-
narrative: '
|
|
632
|
-
initialCwd: '
|
|
634
|
+
narrative: 'cave(ひみつの洞窟)にはトラップがしかけてある!まずはトラップがどこにあるか見つけて、ぜんぶかたづけよう。そうすれば安全にたからものがとれるよ。',
|
|
635
|
+
initialCwd: '/world/cave',
|
|
633
636
|
initialFS: mission5FS,
|
|
634
637
|
newCommands: ['rm', 'find'],
|
|
635
638
|
objectives: [
|
|
636
639
|
{
|
|
637
640
|
id: 'obj-k1-05-01',
|
|
638
|
-
description: '
|
|
639
|
-
checks: [
|
|
641
|
+
description: 'find コマンドでトラップをさがそう',
|
|
642
|
+
checks: [
|
|
643
|
+
{ type: 'command_executed', command: 'find' },
|
|
644
|
+
{ type: 'output_contains', pattern: 'trap' },
|
|
645
|
+
],
|
|
640
646
|
hints: [
|
|
641
647
|
{ level: 1, text: 'ファイルをさがすコマンドがあるよ。' },
|
|
642
|
-
{ level: 2, text: '「find
|
|
648
|
+
{ level: 2, text: '「find」コマンドで名前をしていしてさがせるよ。-name のあとにさがしたい名前を書くよ。' },
|
|
643
649
|
{
|
|
644
650
|
level: 3,
|
|
645
|
-
text: '「find . -name
|
|
651
|
+
text: '「find . -name trap*」とにゅうりょくしてね。trap はトラップのことだよ。* は「なんでもOK」というマークで、trap ではじまるファイルをぜんぶさがすよ。',
|
|
646
652
|
},
|
|
647
653
|
],
|
|
648
654
|
feedbacks: [
|
|
@@ -653,17 +659,17 @@ export const storyK1 = {
|
|
|
653
659
|
},
|
|
654
660
|
{
|
|
655
661
|
id: 'obj-k1-05-02',
|
|
656
|
-
description: '
|
|
662
|
+
description: 'trap1.txt(トラップ1)をけそう',
|
|
657
663
|
checks: [
|
|
658
664
|
{
|
|
659
665
|
type: 'file_not_exists',
|
|
660
|
-
path: '
|
|
666
|
+
path: '/world/cave/trap1.txt',
|
|
661
667
|
},
|
|
662
668
|
],
|
|
663
669
|
hints: [
|
|
664
670
|
{ level: 1, text: 'ファイルをけすコマンドがあるよ。' },
|
|
665
671
|
{ level: 2, text: '「rm」のあとにけしたいファイル名を書くよ。' },
|
|
666
|
-
{ level: 3, text: '「rm
|
|
672
|
+
{ level: 3, text: '「rm trap1.txt」とにゅうりょくしてね。trap はトラップのことだよ。' },
|
|
667
673
|
],
|
|
668
674
|
feedbacks: [
|
|
669
675
|
{ pattern: 'mv', message: 'mv はファイルをいどうするコマンドだよ。ファイルをけすには、べつのコマンドをつかうよ。' },
|
|
@@ -672,17 +678,17 @@ export const storyK1 = {
|
|
|
672
678
|
},
|
|
673
679
|
{
|
|
674
680
|
id: 'obj-k1-05-03',
|
|
675
|
-
description: '
|
|
681
|
+
description: 'trap2.txt(トラップ2)をけそう',
|
|
676
682
|
checks: [
|
|
677
683
|
{
|
|
678
684
|
type: 'file_not_exists',
|
|
679
|
-
path: '
|
|
685
|
+
path: '/world/cave/trap2.txt',
|
|
680
686
|
},
|
|
681
687
|
],
|
|
682
688
|
hints: [
|
|
683
689
|
{ level: 1, text: 'さっきとおなじようにけしてみよう。' },
|
|
684
690
|
{ level: 2, text: '「rm」コマンドをつかおう。' },
|
|
685
|
-
{ level: 3, text: '「rm
|
|
691
|
+
{ level: 3, text: '「rm trap2.txt」とにゅうりょくしてね。' },
|
|
686
692
|
],
|
|
687
693
|
feedbacks: [
|
|
688
694
|
{ pattern: 'mv', message: 'mv はいどうするコマンドだよ。けすには、さっきとおなじコマンドをつかおう。' },
|
|
@@ -690,17 +696,17 @@ export const storyK1 = {
|
|
|
690
696
|
},
|
|
691
697
|
{
|
|
692
698
|
id: 'obj-k1-05-04',
|
|
693
|
-
description: '
|
|
699
|
+
description: 'back-room(奥の部屋)の trap3.txt もけそう',
|
|
694
700
|
checks: [
|
|
695
701
|
{
|
|
696
702
|
type: 'file_not_exists',
|
|
697
|
-
path: '
|
|
703
|
+
path: '/world/cave/back-room/trap3.txt',
|
|
698
704
|
},
|
|
699
705
|
],
|
|
700
706
|
hints: [
|
|
701
|
-
{ level: 1, text: '
|
|
707
|
+
{ level: 1, text: '奥の部屋(back-room)の中にあるファイルもけせるよ。' },
|
|
702
708
|
{ level: 2, text: 'パスを指定すればべつのフォルダの中のファイルもけせるよ。' },
|
|
703
|
-
{ level: 3, text: '「rm
|
|
709
|
+
{ level: 3, text: '「rm back-room/trap3.txt」とにゅうりょくしてね。back-room は奥の部屋のことだよ。' },
|
|
704
710
|
],
|
|
705
711
|
feedbacks: [
|
|
706
712
|
{ pattern: 'cd', message: 'cd でいどうしなくても、パスをしていすればべつのフォルダの中のファイルもけせるよ。' },
|
|
@@ -712,7 +718,7 @@ export const storyK1 = {
|
|
|
712
718
|
{
|
|
713
719
|
id: 'mission-k1-06',
|
|
714
720
|
title: '暗号を解読しよう',
|
|
715
|
-
description: '
|
|
721
|
+
description: 'cipher.txt(暗号文)から手がかりをさがして、けっかを書きのこそう!',
|
|
716
722
|
goal: 'grep でことばをさがし、echo でファイルに書きこめるようになる',
|
|
717
723
|
review: {
|
|
718
724
|
question: 'ファイルの中からことばをさがすコマンドはどれかな?',
|
|
@@ -720,19 +726,22 @@ export const storyK1 = {
|
|
|
720
726
|
correctIndex: 2,
|
|
721
727
|
explanation: 'grep はファイルの中からことばをさがすコマンドだよ。find がファイルの「名前」をさがすのにたいして、grep はファイルの「中身」をさがすよ。',
|
|
722
728
|
},
|
|
723
|
-
narrative: '
|
|
724
|
-
initialCwd: '
|
|
729
|
+
narrative: '洞窟のおくで cipher.txt(暗号文)を見つけた!この中に「魔法」というキーワードがかくれているらしい。さがしだして、わかったことを decoded.txt(解読結果)に書きのこそう。',
|
|
730
|
+
initialCwd: '/world/cave',
|
|
725
731
|
initialFS: mission6FS,
|
|
726
732
|
newCommands: ['grep', 'echo'],
|
|
727
733
|
objectives: [
|
|
728
734
|
{
|
|
729
735
|
id: 'obj-k1-06-01',
|
|
730
|
-
description: '
|
|
731
|
-
checks: [
|
|
736
|
+
description: 'cipher.txt(暗号文)から「魔法」という言葉をさがそう',
|
|
737
|
+
checks: [
|
|
738
|
+
{ type: 'command_executed', command: 'grep' },
|
|
739
|
+
{ type: 'output_contains', pattern: '魔法' },
|
|
740
|
+
],
|
|
732
741
|
hints: [
|
|
733
742
|
{ level: 1, text: 'ファイルの中からことばをさがすコマンドがあるよ。' },
|
|
734
743
|
{ level: 2, text: '「grep」のあとにさがしたいことばとファイル名を書くよ。' },
|
|
735
|
-
{ level: 3, text: '「grep 魔法
|
|
744
|
+
{ level: 3, text: '「grep 魔法 cipher.txt」とにゅうりょくしてね。cipher は暗号文のことだよ。' },
|
|
736
745
|
],
|
|
737
746
|
feedbacks: [
|
|
738
747
|
{ pattern: 'cat', message: 'cat はファイルのぜんぶを読むコマンドだよ。とくていのことばだけさがすには、べつのコマンドをつかうよ。' },
|
|
@@ -741,19 +750,19 @@ export const storyK1 = {
|
|
|
741
750
|
},
|
|
742
751
|
{
|
|
743
752
|
id: 'obj-k1-06-02',
|
|
744
|
-
description: '
|
|
753
|
+
description: 'grep で見つけた内容を echo と > で decoded.txt に書こう',
|
|
745
754
|
checks: [
|
|
746
755
|
{
|
|
747
756
|
type: 'file_exists',
|
|
748
|
-
path: '
|
|
757
|
+
path: '/world/cave/decoded.txt',
|
|
749
758
|
},
|
|
750
759
|
],
|
|
751
760
|
hints: [
|
|
752
761
|
{ level: 1, text: 'もじをファイルに書きこむコマンドがあるよ。' },
|
|
753
|
-
{ level: 2, text: '「echo
|
|
762
|
+
{ level: 2, text: '「echo」のあとに書きたいもじを「"」で囲んで、「>」のあとにファイル名を書くよ。「>」は「ファイルに書きこむ」というマークだよ。' },
|
|
754
763
|
{
|
|
755
764
|
level: 3,
|
|
756
|
-
text: '「echo "魔法使いが宝の地図をくれた" >
|
|
765
|
+
text: '「echo "魔法使いが宝の地図をくれた" > decoded.txt」とにゅうりょくしてね。decoded は解読結果のことだよ。',
|
|
757
766
|
},
|
|
758
767
|
],
|
|
759
768
|
feedbacks: [
|
|
@@ -767,7 +776,7 @@ export const storyK1 = {
|
|
|
767
776
|
{
|
|
768
777
|
id: 'mission-k1-07',
|
|
769
778
|
title: '古い書物を読もう',
|
|
770
|
-
description: '
|
|
779
|
+
description: 'ながい spellbook.txt(魔法の書)の最初と最後をかくにんして、何ページあるかかぞえよう!',
|
|
771
780
|
goal: 'head と tail でファイルの一部を読み、wc で行数をかぞえられるようになる',
|
|
772
781
|
review: {
|
|
773
782
|
question: 'ファイルのさいしょの方だけ読むコマンドはどれかな?',
|
|
@@ -775,19 +784,19 @@ export const storyK1 = {
|
|
|
775
784
|
correctIndex: 1,
|
|
776
785
|
explanation: 'head はファイルのさいしょの方だけひょうじするコマンドだよ。さいごの方を見るには tail をつかうよ。',
|
|
777
786
|
},
|
|
778
|
-
narrative: '
|
|
779
|
-
initialCwd: '
|
|
787
|
+
narrative: 'castle(古いお城)の library(図書室)で、ぶあつい spellbook.txt(魔法の書)を見つけた!ぜんぶ読むのは大変だから、最初と最後だけ読んで、ページ数もかくにんしよう。',
|
|
788
|
+
initialCwd: '/world/castle/library',
|
|
780
789
|
initialFS: mission7FS,
|
|
781
790
|
newCommands: ['head', 'tail', 'wc'],
|
|
782
791
|
objectives: [
|
|
783
792
|
{
|
|
784
793
|
id: 'obj-k1-07-01',
|
|
785
|
-
description: '
|
|
794
|
+
description: 'spellbook.txt(魔法の書)のさいしょの部分を読もう',
|
|
786
795
|
checks: [{ type: 'command_executed', command: 'head' }],
|
|
787
796
|
hints: [
|
|
788
797
|
{ level: 1, text: 'ファイルのさいしょだけ読むコマンドがあるよ。' },
|
|
789
798
|
{ level: 2, text: '「head」コマンドをつかうと、ファイルのさいしょの方だけ見られるよ。' },
|
|
790
|
-
{ level: 3, text: '「head
|
|
799
|
+
{ level: 3, text: '「head spellbook.txt」とにゅうりょくしてね。spellbook は魔法の書のことだよ。' },
|
|
791
800
|
],
|
|
792
801
|
feedbacks: [
|
|
793
802
|
{ pattern: 'cat', message: 'cat はファイルのぜんぶをひょうじするよ。さいしょの方だけ見るには、べつのコマンドをつかうよ。' },
|
|
@@ -796,12 +805,12 @@ export const storyK1 = {
|
|
|
796
805
|
},
|
|
797
806
|
{
|
|
798
807
|
id: 'obj-k1-07-02',
|
|
799
|
-
description: '
|
|
808
|
+
description: 'spellbook.txt(魔法の書)のさいごの部分を読もう',
|
|
800
809
|
checks: [{ type: 'command_executed', command: 'tail' }],
|
|
801
810
|
hints: [
|
|
802
811
|
{ level: 1, text: 'ファイルのさいごだけ読むコマンドがあるよ。' },
|
|
803
812
|
{ level: 2, text: '「tail」コマンドをつかうと、ファイルのさいごの方だけ見られるよ。' },
|
|
804
|
-
{ level: 3, text: '「tail
|
|
813
|
+
{ level: 3, text: '「tail spellbook.txt」とにゅうりょくしてね。spellbook は魔法の書のことだよ。' },
|
|
805
814
|
],
|
|
806
815
|
feedbacks: [
|
|
807
816
|
{ pattern: 'cat', message: 'cat はファイルのぜんぶをひょうじするよ。さいごの方だけ見るには、べつのコマンドをつかうよ。' },
|
|
@@ -810,15 +819,15 @@ export const storyK1 = {
|
|
|
810
819
|
},
|
|
811
820
|
{
|
|
812
821
|
id: 'obj-k1-07-03',
|
|
813
|
-
description: '
|
|
822
|
+
description: 'spellbook.txt(魔法の書)が何行あるかかぞえよう',
|
|
814
823
|
checks: [
|
|
815
824
|
{ type: 'command_executed', command: 'wc' },
|
|
816
|
-
{ type: 'output_contains', pattern: '
|
|
825
|
+
{ type: 'output_contains', pattern: '21' },
|
|
817
826
|
],
|
|
818
827
|
hints: [
|
|
819
828
|
{ level: 1, text: 'ファイルの行数をかぞえるコマンドがあるよ。' },
|
|
820
829
|
{ level: 2, text: '「wc」コマンドをつかうと、行の数がわかるよ。' },
|
|
821
|
-
{ level: 3, text: '「wc
|
|
830
|
+
{ level: 3, text: '「wc spellbook.txt」とにゅうりょくしてね。spellbook は魔法の書のことだよ。' },
|
|
822
831
|
],
|
|
823
832
|
feedbacks: [
|
|
824
833
|
{ pattern: 'cat', message: 'cat はファイルの中身をひょうじするよ。行の数をかぞえるには、べつのコマンドをつかうよ。' },
|
|
@@ -832,7 +841,7 @@ export const storyK1 = {
|
|
|
832
841
|
{
|
|
833
842
|
id: 'mission-k1-08',
|
|
834
843
|
title: '仲間リストを整理しよう',
|
|
835
|
-
description: '
|
|
844
|
+
description: 'party.csv(冒険者の名簿)をきれいに整理しよう!',
|
|
836
845
|
goal: 'sort、uniq、cut をつかってデータを整理できるようになる',
|
|
837
846
|
review: {
|
|
838
847
|
question: 'おなじ行をまとめてくれるコマンドはどれかな?',
|
|
@@ -840,8 +849,8 @@ export const storyK1 = {
|
|
|
840
849
|
correctIndex: 1,
|
|
841
850
|
explanation: 'uniq はとなりあうおなじ行をまとめるコマンドだよ。sort でならべてから uniq をつかうと、ぜんぶのおなじ行をまとめられるよ。',
|
|
842
851
|
},
|
|
843
|
-
narrative: '
|
|
844
|
-
initialCwd: '
|
|
852
|
+
narrative: 'castle(古いお城)で party.csv(冒険者の名簿)を見つけた。でも同じ名前が何回も書いてある。きれいに整理して、どんな職業の仲間がいるか調べよう。',
|
|
853
|
+
initialCwd: '/world/castle',
|
|
845
854
|
initialFS: mission8FS,
|
|
846
855
|
newCommands: ['sort', 'uniq', 'cut'],
|
|
847
856
|
objectives: [
|
|
@@ -852,7 +861,7 @@ export const storyK1 = {
|
|
|
852
861
|
hints: [
|
|
853
862
|
{ level: 1, text: 'ならびかえるコマンドがあるよ。' },
|
|
854
863
|
{ level: 2, text: '「sort」コマンドで行をじゅんばんにできるよ。' },
|
|
855
|
-
{ level: 3, text: '「sort
|
|
864
|
+
{ level: 3, text: '「sort party.csv」とにゅうりょくしてね。party は冒険者名簿のことだよ。' },
|
|
856
865
|
],
|
|
857
866
|
feedbacks: [
|
|
858
867
|
{ pattern: 'cat', message: 'cat はファイルをそのままひょうじするよ。じゅんばんにならべるには、べつのコマンドをつかうよ。' },
|
|
@@ -865,8 +874,8 @@ export const storyK1 = {
|
|
|
865
874
|
checks: [{ type: 'command_executed', command: 'uniq' }],
|
|
866
875
|
hints: [
|
|
867
876
|
{ level: 1, text: 'おなじものをまとめるコマンドがあるよ。パイプ「|」もつかってみよう。' },
|
|
868
|
-
{ level: 2, text: '「sort
|
|
869
|
-
{ level: 3, text: '「sort
|
|
877
|
+
{ level: 2, text: '「sort」したあとに「|」(パイプ)で「uniq」につなげると、おなじ行をまとめられるよ。「|」は「けっかをつぎのコマンドにわたす」マークだよ。' },
|
|
878
|
+
{ level: 3, text: '「sort party.csv | uniq」とにゅうりょくしてね。' },
|
|
870
879
|
],
|
|
871
880
|
feedbacks: [
|
|
872
881
|
{ pattern: 'grep', message: 'grep はことばをさがすコマンドだよ。おなじ行をまとめるには、べつのコマンドをつかうよ。' },
|
|
@@ -875,14 +884,17 @@ export const storyK1 = {
|
|
|
875
884
|
},
|
|
876
885
|
{
|
|
877
886
|
id: 'obj-k1-08-03',
|
|
878
|
-
description: '
|
|
879
|
-
checks: [
|
|
887
|
+
description: '名簿の2番目(職業)だけをとりだそう',
|
|
888
|
+
checks: [
|
|
889
|
+
{ type: 'command_executed', command: 'cut' },
|
|
890
|
+
{ type: 'output_contains', pattern: '職業' },
|
|
891
|
+
],
|
|
880
892
|
hints: [
|
|
881
893
|
{ level: 1, text: 'とくていの部分だけきりだすコマンドがあるよ。' },
|
|
882
894
|
{ level: 2, text: '「cut」コマンドで「,」でくぎって2ばんめの部分をとりだせるよ。' },
|
|
883
895
|
{
|
|
884
896
|
level: 3,
|
|
885
|
-
text: '「cut -d, -f2
|
|
897
|
+
text: '「cut -d, -f2 party.csv」とにゅうりょくしてね。party は冒険者名簿のことだよ。',
|
|
886
898
|
},
|
|
887
899
|
],
|
|
888
900
|
feedbacks: [
|
|
@@ -896,7 +908,7 @@ export const storyK1 = {
|
|
|
896
908
|
{
|
|
897
909
|
id: 'mission-k1-09',
|
|
898
910
|
title: '封印を解こう',
|
|
899
|
-
description: '
|
|
911
|
+
description: 'ふういんされた seal.sh(呪文)をとけるようにして、魔法をつかおう!',
|
|
900
912
|
goal: 'chmod でけんげんをかえ、パイプで grep をつなげられるようになる',
|
|
901
913
|
review: {
|
|
902
914
|
question: 'ファイルのけんげん(つかえるかどうか)をかえるコマンドはどれかな?',
|
|
@@ -904,19 +916,19 @@ export const storyK1 = {
|
|
|
904
916
|
correctIndex: 1,
|
|
905
917
|
explanation: 'chmod はファイルのけんげん(パーミッション)をかえるコマンドだよ。「change mode」のりゃくだよ。',
|
|
906
918
|
},
|
|
907
|
-
narrative: '
|
|
908
|
-
initialCwd: '
|
|
919
|
+
narrative: 'castle(古いお城)のおくで、ふういんされた seal.sh(封印の呪文)を見つけた!ふういんを解いて実行できるようにしよう。そして stone.txt(魔法の石)の中から「光の魔法」をさがしだそう。',
|
|
920
|
+
initialCwd: '/world/castle',
|
|
909
921
|
initialFS: mission9FS,
|
|
910
922
|
newCommands: ['chmod'],
|
|
911
923
|
objectives: [
|
|
912
924
|
{
|
|
913
925
|
id: 'obj-k1-09-01',
|
|
914
|
-
description: '
|
|
926
|
+
description: 'seal.sh(封印の呪文)のふういんを解こう',
|
|
915
927
|
checks: [{ type: 'command_executed', command: 'chmod' }],
|
|
916
928
|
hints: [
|
|
917
929
|
{ level: 1, text: 'ファイルのけんげん(つかえるかどうか)をかえるコマンドがあるよ。' },
|
|
918
930
|
{ level: 2, text: '「chmod」コマンドで「+x」をつけると、実行できるようになるよ。' },
|
|
919
|
-
{ level: 3, text: '「chmod +x
|
|
931
|
+
{ level: 3, text: '「chmod +x seal.sh」とにゅうりょくしてね。seal は封印の呪文のことだよ。' },
|
|
920
932
|
],
|
|
921
933
|
feedbacks: [
|
|
922
934
|
{ pattern: 'cat', message: 'cat はファイルの中身を読むコマンドだよ。ふういんを解く(けんげんをかえる)には、べつのコマンドをつかうよ。' },
|
|
@@ -925,12 +937,15 @@ export const storyK1 = {
|
|
|
925
937
|
},
|
|
926
938
|
{
|
|
927
939
|
id: 'obj-k1-09-02',
|
|
928
|
-
description: '
|
|
929
|
-
checks: [
|
|
940
|
+
description: 'stone.txt(魔法の石)から「光」の魔法をさがそう',
|
|
941
|
+
checks: [
|
|
942
|
+
{ type: 'command_executed', command: 'grep' },
|
|
943
|
+
{ type: 'output_contains', pattern: '光の魔法' },
|
|
944
|
+
],
|
|
930
945
|
hints: [
|
|
931
946
|
{ level: 1, text: 'パイプ「|」をつかって、コマンドをつなげてみよう。' },
|
|
932
947
|
{ level: 2, text: '「cat」でファイルを読んで、「|」で「grep」につなげると、ほしい行だけとりだせるよ。' },
|
|
933
|
-
{ level: 3, text: '「cat
|
|
948
|
+
{ level: 3, text: '「cat stone.txt | grep 光」とにゅうりょくしてね。stone は魔法の石のことだよ。' },
|
|
934
949
|
],
|
|
935
950
|
feedbacks: [
|
|
936
951
|
{ pattern: 'find', message: 'find はファイルの名前をさがすコマンドだよ。ファイルの中身からさがすには、grep をつかうよ。パイプ「|」でつなげてみよう。' },
|
|
@@ -950,8 +965,8 @@ export const storyK1 = {
|
|
|
950
965
|
correctIndex: 1,
|
|
951
966
|
explanation: 'git log はいままでのへんこうのきろく(コミット)をひょうじするコマンドだよ。git status はいまのじょうたいをたしかめるコマンドだよ。',
|
|
952
967
|
},
|
|
953
|
-
narrative: '
|
|
954
|
-
initialCwd: '
|
|
968
|
+
narrative: 'base(秘密基地)にもどってきた。冒険のきろくがgitでのこしてある。いままでの冒険をふりかえってみよう!',
|
|
969
|
+
initialCwd: '/world/base',
|
|
955
970
|
initialFS: mission10FS,
|
|
956
971
|
newCommands: ['git'],
|
|
957
972
|
objectives: [
|
|
@@ -977,7 +992,7 @@ export const storyK1 = {
|
|
|
977
992
|
description: 'いままでの冒険のきろくを見よう',
|
|
978
993
|
checks: [
|
|
979
994
|
{ type: 'command_executed', command: 'git' },
|
|
980
|
-
{ type: 'output_contains', pattern: '
|
|
995
|
+
{ type: 'output_contains', pattern: 'Author:' },
|
|
981
996
|
],
|
|
982
997
|
hints: [
|
|
983
998
|
{ level: 1, text: 'きろく(ログ)を見るgitコマンドがあるよ。' },
|