all quest modify

This commit is contained in:
Chen, Tai-Lin committed 2023-11-23 21:03:32 +08:00
1 parent 4f55dcd929
commit 057635eed6
10 files changed
+106 -91

No files matched your search

+19 -18
View File
@@ -1,8 +1,10 @@
title: 輸出文字 title: 輸出文字
instruction: | instruction: |
在這一關,你將會學到如何使用 `echo` 指令,以及它在遊戲中的特殊功能。 在這個關卡中,你將會學到:
1. 如何使用 `echo` 指令
2. `echo` 指令在遊戲中的用途
請輸入 `echo start` 來開始這一關。 準備好就輸入 `echo start` 開始吧!
requirements: requirements:
- get-started - get-started
@@ -18,7 +20,6 @@ stages:
- id: start - id: start
task: 輸入 `echo start` 來開始教程 task: 輸入 `echo start` 來開始教程
repeatable: false
condition: condition:
output: output:
- ^start$ - ^start$
@@ -34,7 +35,6 @@ stages:
- id: echo - id: echo
task: 在終端機上顯示顯示任意文字 task: 在終端機上顯示顯示任意文字
repeatable: false
requirements: requirements:
- start - start
condition: condition:
@@ -49,12 +49,26 @@ stages:
- id: how-are-you - id: how-are-you
task: 在終端機上顯示 `How are you?` task: 在終端機上顯示 `How are you?`
repeatable: false
requirements: requirements:
- echo - echo
condition: condition:
output: output:
- ^[Hh]ow are you\??$ - ^[Hh]ow are you\??$
exceptions:
- condition:
command:
- ^[Hh]ow are you\??$
responses:
- type: narrative
content:
- 在 `How are you?` 前面必須加上 `echo`
- condition:
command:
- ^echo$
responses:
- type: narrative
content:
- 在 `echo` 後面還需要加上一些文字
responses: responses:
- content: - content:
- 你成功的在終端機上顯示了 `How are you?`。 - 你成功的在終端機上顯示了 `How are you?`。
@@ -67,21 +81,9 @@ stages:
hints: hints:
- ➤ 試著使用 `echo` 來詠唱 `HELP` 咒語 - ➤ 試著使用 `echo` 來詠唱 `HELP` 咒語
- ➤ 注意:咒語要使用大寫 - ➤ 注意:咒語要使用大寫
exceptions:
- condition:
command:
- ^[Hh]ow are you\??$
hints:
- ➤ 在 `How are you?` 前面必須加上 `echo`
- condition:
command:
- ^echo$
hints:
- ➤ 在 `echo` 後面還需要加上一些文字
- id: help - id: help
task: 詠唱 `HELP` 咒語 task: 詠唱 `HELP` 咒語
repeatable: false
requirements: requirements:
- how-are-you - how-are-you
condition: condition:
@@ -103,7 +105,6 @@ stages:
- id: END - id: END
task: 詠唱 `WATER` 咒語 task: 詠唱 `WATER` 咒語
repeatable: false
requirements: requirements:
- help - help
condition: condition:
+4 -3
View File
@@ -1,8 +1,9 @@
title: 複製檔案 title: 複製檔案
instruction: | instruction: |
在這個關卡中,你會學習到: 在這個關卡中,你將會學到:
1. 如何用 `cp` 指令複製檔案。 1. 如何用 `cp` 指令複製檔案
準備好就輸入 `echo start` 來開始吧!
準備好就輸入 `echo start` 開始吧!
requirements: requirements:
- create - create
+2 -1
View File
@@ -1,8 +1,9 @@
title: 建立檔案與資料夾 title: 建立檔案與資料夾
instruction: | instruction: |
在這個關卡中,你會學習到: 在這個關卡中,你將會學到:
1. 如何使用 `touch` 建立檔案 1. 如何使用 `touch` 建立檔案
2. 如何使用 `mkdir` 建立資料夾 2. 如何使用 `mkdir` 建立資料夾
準備好就輸入 `echo start` 開始吧! 準備好就輸入 `echo start` 開始吧!
requirements: requirements:
+35 -29
View File
@@ -4,7 +4,7 @@ instruction: |
1. 如何使用 `ls` 查看資料夾的內容 1. 如何使用 `ls` 查看資料夾的內容
2. 如何使用 `cd` 在資料夾之間移動 2. 如何使用 `cd` 在資料夾之間移動
請輸入 `echo start` 來開始這一關。 準備好就輸入 `echo start` 開始吧!
requirements: requirements:
- get-started - get-started
@@ -20,7 +20,6 @@ stages:
- id: start - id: start
task: 輸入 `echo start` 來開始教程 task: 輸入 `echo start` 來開始教程
repeatable: false
condition: condition:
output: output:
- ^start$ - ^start$
@@ -41,6 +40,23 @@ stages:
condition: condition:
command: command:
- ^ls$ - ^ls$
exceptions:
- condition:
not:
pwd:
- /home/commander
responses:
- type: narrative
content:
- 請先回到 `/home/commander/` 資料夾
- 輸入 `cd ~` 來返回 `/home/commander/` 資料夾
- condition:
command:
- ^[Ii]s$
responses:
- type: narrative
content:
- '!! `ls` 的首字母是小寫的 `L`,不是 `I` !!'
responses: responses:
- content: - content:
- 你應該能看到資料夾中的內容了。 - 你應該能看到資料夾中的內容了。
@@ -55,19 +71,6 @@ stages:
- 現在,請你進入 `folder1` 資料夾。 - 現在,請你進入 `folder1` 資料夾。
hints: hints:
- ➤ 輸入 `cd folder1` 來進入 `folder1` 資料夾 - ➤ 輸入 `cd folder1` 來進入 `folder1` 資料夾
exceptions:
- condition:
not:
pwd:
- /home/commander
hints:
- ➤ 請先回到 `/home/commander/` 資料夾
- ➤ 輸入 `cd ~` 來返回 `/home/commander/` 資料夾
- condition:
command:
- ^[Ii]s$
hints:
- '!! `ls` 的首字母是小寫的 `L`,不是 `I` !!'
- id: cd-folder1 - id: cd-folder1
task: 進入 `folder1` 資料夾 task: 進入 `folder1` 資料夾
@@ -76,6 +79,23 @@ stages:
condition: condition:
pwd: pwd:
- /home/commander/folder1 - /home/commander/folder1
exceptions:
- condition:
pwd:
- /home/commander
responses:
- type: narrative
content:
- 輸入 `cd folder1` 來進入 `folder1` 資料夾
- condition:
not:
pwd:
- /home/commander
responses:
- type: narrative
content:
- 請先回到 `/home/commander/` 資料夾
- 輸入 `cd ~` 來返回 `/home/commander/` 資料夾
responses: responses:
- content: - content:
- 你成功的進入 `folder1` 資料夾了。 - 你成功的進入 `folder1` 資料夾了。
@@ -86,23 +106,9 @@ stages:
- 現在,請查看 `folder1` 資料夾的內容。 - 現在,請查看 `folder1` 資料夾的內容。
hints: hints:
- ➤ 輸入 `ls` 查看資料夾的內容 - ➤ 輸入 `ls` 查看資料夾的內容
exceptions:
- condition:
pwd:
- /home/commander
hints:
- ➤ 輸入 `cd folder1` 來進入 `folder1` 資料夾
- condition:
not:
pwd:
- /home/commander
hints:
- ➤ 請先回到 `/home/commander/` 資料夾
- ➤ 輸入 `cd ~` 來返回 `/home/commander/` 資料夾
- id: ls-folder1 - id: ls-folder1
task: 查看 `folder1` 資料夾的內容 task: 查看 `folder1` 資料夾的內容
repeatable: false
requirements: requirements:
- cd-folder1 - cd-folder1
condition: condition:
+1 -1
View File
@@ -1,7 +1,7 @@
title: 終端機的基本知識 title: 終端機的基本知識
instruction: | instruction: |
歡迎來到 Linux Odyssey! 歡迎來到 Linux Odyssey!
在這一關你將會學到: 在這個關卡中,你將會學到:
1. 如何使用這個網站 1. 如何使用這個網站
2. 如何使用終端機 2. 如何使用終端機
-4
View File
@@ -10,7 +10,6 @@ requirements:
stages: stages:
- id: help - id: help
task: 輸入 `echo help` 來朗誦咒語 task: 輸入 `echo help` 來朗誦咒語
repeatable: false
condition: condition:
pwd: pwd:
- '^/home/commander$' - '^/home/commander$'
@@ -36,7 +35,6 @@ stages:
- id: find-scroll - id: find-scroll
task: 搜索卷軸 task: 搜索卷軸
repeatable: false
requirements: requirements:
- help - help
condition: condition:
@@ -63,7 +61,6 @@ stages:
- id: read-forgotten-scroll - id: read-forgotten-scroll
task: 查看卷軸 task: 查看卷軸
repeatable: false
requirements: requirements:
- find-scroll - find-scroll
condition: condition:
@@ -82,7 +79,6 @@ stages:
- id: END - id: END
task: 解除封印 task: 解除封印
repeatable: false
requirements: requirements:
- read-forgotten-scroll - read-forgotten-scroll
condition: condition:
+8 -7
View File
@@ -1,8 +1,9 @@
title: 移動檔案 title: 移動檔案
instruction: | instruction: |
在這個關卡中,你會學到: 在這個關卡中,你將會學到:
1. 如何用 `mv` 移動檔案與資料夾 1. 如何用 `mv` 移動檔案與資料夾
準備好就輸入 `echo start` 來開始吧!
準備好就輸入 `echo start` 開始吧!
requirements: requirements:
- create - create
@@ -202,11 +203,6 @@ stages:
type: file type: file
- path: docs/hello.txt - path: docs/hello.txt
exists: false exists: false
responses:
- type: narrative
content:
- 你做得很好!
- 你已經學會如何移動檔案與資料夾了!
exceptions: exceptions:
- condition: - condition:
command: command:
@@ -217,3 +213,8 @@ stages:
- 你可以使用 `mv docs/hello.txt hi.txt` 來完成這個任務。 - 你可以使用 `mv docs/hello.txt hi.txt` 來完成這個任務。
hints: hints:
- 使用 `mv docs/hello.txt hi.txt` 來將 `docs/hello.txt` 移動到家目錄底下的 `hi.txt` - 使用 `mv docs/hello.txt hi.txt` 來將 `docs/hello.txt` 移動到家目錄底下的 `hi.txt`
responses:
- type: narrative
content:
- 你做得很好!
- 你已經學會如何移動檔案與資料夾了!
+27 -19
View File
@@ -4,7 +4,7 @@ instruction: |
1. 絕對路徑和相對路徑 1. 絕對路徑和相對路徑
2. 如何使用 `pwd` 顯示目前的路徑 2. 如何使用 `pwd` 顯示目前的路徑
請輸入 `echo start` 來開始這一關。 準備好就輸入 `echo start` 開始吧!
requirements: requirements:
- cast - cast
@@ -72,6 +72,15 @@ stages:
- ^/home/commander/folder2$ - ^/home/commander/folder2$
command: command:
- ^cd \.\./folder2$ - ^cd \.\./folder2$
exceptions:
- condition:
not:
pwd:
- ^/home/commander/folder1$
responses:
- type: narrative
content:
- 請先回到 `folder1` 資料夾,並用指定的方式進入 `folder2` 資料夾。
responses: responses:
- content: - content:
- 你成功的用相對路徑進入了 `folder2` 資料夾。 - 你成功的用相對路徑進入了 `folder2` 資料夾。
@@ -80,13 +89,6 @@ stages:
- 試著用這個方式查看 `folder1` 資料夾中的檔案吧。 - 試著用這個方式查看 `folder1` 資料夾中的檔案吧。
hints: hints:
- ➤ 請輸入 `ls ../folder1` 來查看 `folder1` 資料夾中的檔案。 - ➤ 請輸入 `ls ../folder1` 來查看 `folder1` 資料夾中的檔案。
exceptions:
- condition:
not:
pwd:
- ^/home/commander/folder1$
hints:
- ➤ 請先回到 `folder1` 資料夾,並用指定的方式進入 `folder2` 資料夾。
- id: ls-folder1 - id: ls-folder1
task: 查看 `folder1` 資料夾中的檔案 task: 查看 `folder1` 資料夾中的檔案
@@ -97,6 +99,15 @@ stages:
- ^/home/commander/folder2$ - ^/home/commander/folder2$
command: command:
- ^ls \.\.\/folder1$ - ^ls \.\.\/folder1$
exceptions:
- condition:
not:
pwd:
- ^/home/commander/folder2$
responses:
- type: narrative
content:
- 請先回到 `folder2` 資料夾,並用指定的方式查看 `folder1` 資料夾的內容。
responses: responses:
- content: - content:
- 很好,你現在知道如何運用相對路徑了。 - 很好,你現在知道如何運用相對路徑了。
@@ -107,13 +118,6 @@ stages:
- 現在請你使用 `pwd` 來查看目前所在的絕對路徑。 - 現在請你使用 `pwd` 來查看目前所在的絕對路徑。
hints: hints:
- ➤ 輸入 `pwd` 查看目前所在的絕對路徑 - ➤ 輸入 `pwd` 查看目前所在的絕對路徑
exceptions:
- condition:
not:
pwd:
- ^/home/commander/folder2$
hints:
- ➤ 請先回到 `folder2` 資料夾,並用指定的方式查看 `folder1` 資料夾的內容。
- id: pwd - id: pwd
task: 查看目前所在的絕對路徑 task: 查看目前所在的絕對路徑
@@ -129,8 +133,10 @@ stages:
not: not:
pwd: pwd:
- ^/home/commander/folder2$ - ^/home/commander/folder2$
hints: responses:
- ➤ 請先回到 `folder2` 資料夾,並用 `pwd` 來查看目前所在的絕對路徑 - type: narrative
content:
- 請先回到 `folder2` 資料夾,並用 `pwd` 來查看目前所在的絕對路徑
responses: responses:
- content: - content:
- 你可以看到你現在的絕對路徑是 `/home/commander/folder2`。 - 你可以看到你現在的絕對路徑是 `/home/commander/folder2`。
@@ -167,8 +173,10 @@ stages:
- condition: - condition:
pwd: pwd:
- ^/home/commander$ - ^/home/commander$
hints: responses:
- ➤ 請使用 `cd ~` 回到家目錄 - type: narrative
content:
- 請使用 `cd ~` 回到家目錄
responses: responses:
- content: - content:
- 你回到家目錄了。 - 你回到家目錄了。
+1 -1
View File
@@ -3,7 +3,7 @@ instruction: |
在這個關卡中,你將會學到: 在這個關卡中,你將會學到:
1. 如何使用 `cat` 查看檔案的內容 1. 如何使用 `cat` 查看檔案的內容
請輸入 `echo start` 來開始這一關。 準備好就輸入 `echo start` 開始吧!
requirements: requirements:
- path - path
+9 -8
View File
@@ -1,10 +1,11 @@
title: 刪除檔案與資料夾 title: 刪除檔案與資料夾
instruction: | instruction: |
在這個關卡中,你會學到: 在這個關卡中,你將會學到:
1. 用 `rm` 指令刪除檔案 1. 用 `rm` 指令刪除檔案
2. 用 `rmdir` 與資料夾。 2. 用 `rmdir` 與資料夾
3. 用 `rm -r` 刪除資料夾與它的所有檔案。 3. 用 `rm -r` 刪除資料夾與它的所有檔案
現在資料夾裡有一些檔案與資料夾,請你使用 `ls` 跟 `cat` 來查看它們的內容。 現在資料夾裡有一些檔案與資料夾,請你使用 `ls` 跟 `cat` 來查看它們的內容。
準備好就輸入 `echo start` 開始吧! 準備好就輸入 `echo start` 開始吧!
requirements: requirements:
@@ -157,11 +158,6 @@ stages:
exists: true exists: true
- path: notes/note.txt - path: notes/note.txt
exists: false exists: false
responses:
- content:
- '很好!現在我們再使用 `rmdir` 指令刪除 `notes` 資料夾。'
hints:
- 使用 `rmdir notes` 來刪除 `notes` 資料夾。
exceptions: exceptions:
- condition: - condition:
command: command:
@@ -182,6 +178,11 @@ stages:
- content: - content:
- 這個錯誤的意思是找不到檔案 - 這個錯誤的意思是找不到檔案
- '請先用 `ls notes` 確認 `notes` 資料夾內有哪些檔案,再來試試看吧!' - '請先用 `ls notes` 確認 `notes` 資料夾內有哪些檔案,再來試試看吧!'
responses:
- content:
- '很好!現在我們再使用 `rmdir` 指令刪除 `notes` 資料夾。'
hints:
- 使用 `rmdir notes` 來刪除 `notes` 資料夾。
- condition: - condition:
command: command: