@mo7yw4ng/openape 2.1.3 → 2.1.5
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/README.md +29 -29
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -31,17 +31,16 @@ npx @mo7yw4ng/openape --help
|
|
|
31
31
|
## 核心指令
|
|
32
32
|
|
|
33
33
|
### 登入與驗證 (Authentication)
|
|
34
|
-
|
|
34
|
+
第一次使用需先登入,並選擇瀏覽器或終端自動登入。自動登入的帳密會存入作業系統憑證庫,不會寫入參數、環境變數或一般檔案;Session 失效時會自動重登。改選瀏覽器登入或執行 logout 會清除已存帳密。
|
|
35
35
|
```bash
|
|
36
|
-
openape login #
|
|
37
|
-
openape login --id <student-id> --password <password> # 登入並儲存帳密 (自動重登)
|
|
36
|
+
openape login # 有已存帳密時直接自動登入;首次使用才選擇登入方式
|
|
38
37
|
openape status # 檢查當前登入狀態
|
|
39
38
|
openape logout # 登出並清除 session
|
|
40
39
|
```
|
|
41
40
|
|
|
42
41
|
### 課程 (Courses)
|
|
43
42
|
```bash
|
|
44
|
-
openape courses list
|
|
43
|
+
openape courses list [--level in_progress|past|future|all] # 列出課程
|
|
45
44
|
openape courses info <id> # 顯示特定課程的詳細資訊
|
|
46
45
|
openape courses progress <id> # 顯示特定課程的進度
|
|
47
46
|
openape courses syllabus <id> # 顯示課程大綱
|
|
@@ -49,27 +48,28 @@ openape courses syllabus <id> # 顯示課程大綱
|
|
|
49
48
|
|
|
50
49
|
### 影片 (Videos)
|
|
51
50
|
```bash
|
|
52
|
-
openape videos list <course-id>
|
|
53
|
-
openape videos complete <id>
|
|
54
|
-
openape videos complete-all #
|
|
55
|
-
openape videos download <
|
|
51
|
+
openape videos list <course-id> [--incomplete-only] # 列出課程中的影片
|
|
52
|
+
openape videos complete <course-id> [--dry-run] [--force] # 完成課程中的所有影片 (--force 連已完成的影片也重送觀看時長)
|
|
53
|
+
openape videos complete-all [--dry-run] [--force] # 完成所有課程中的未完成影片 (--force 連已完成的影片也重送觀看時長)
|
|
54
|
+
openape videos download <cmid> [--course-id <id>] [--output-dir <path>] # 下載單一影片
|
|
55
|
+
openape videos download-all <course-id> [--output-dir <path>] [--incomplete-only] # 下載課程影片
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
### 測驗與教材 (Quizzes & Materials)
|
|
59
59
|
```bash
|
|
60
|
-
openape quizzes list <course-id>
|
|
61
|
-
openape quizzes list-all
|
|
62
|
-
openape quizzes start <quiz-id>
|
|
63
|
-
openape quizzes info <attempt-id>
|
|
64
|
-
openape quizzes save <attempt-id> '<answers>' # 儲存測驗答案
|
|
65
|
-
openape quizzes submit <attempt-id>
|
|
60
|
+
openape quizzes list <course-id> [--all] # 列出特定課程測驗
|
|
61
|
+
openape quizzes list-all [--level in_progress|all] [--all] # 列出所有課程測驗
|
|
62
|
+
openape quizzes start <quiz-id> [--cmid <cmid>] # 開始測驗
|
|
63
|
+
openape quizzes info <attempt-id> [--page <number>] [--cmid <cmid>] # 查看測驗題目
|
|
64
|
+
openape quizzes save <attempt-id> '<answers>' [--cmid <cmid>] # 儲存測驗答案
|
|
65
|
+
openape quizzes submit <attempt-id> [--cmid <cmid>] # 送出目前已儲存的測驗答案
|
|
66
66
|
openape materials list <course-id> # 列出指定課程教材
|
|
67
|
-
openape materials list-all
|
|
68
|
-
openape materials download <id>
|
|
69
|
-
openape materials download-file <course-id> <query>
|
|
70
|
-
openape materials download-all
|
|
71
|
-
openape materials complete <id>
|
|
72
|
-
openape materials complete-all
|
|
67
|
+
openape materials list-all [--level in_progress|all] # 列出所有可下載教材
|
|
68
|
+
openape materials download <course-id> [--output-dir <path>] # 下載課程所有教材
|
|
69
|
+
openape materials download-file <course-id> <query> [--output-dir <path>] # 下載單一教材
|
|
70
|
+
openape materials download-all [--output-dir <path>] [--level in_progress|past|future|all] # 批次下載教材
|
|
71
|
+
openape materials complete <course-id> [--dry-run] # 完成課程中的教材
|
|
72
|
+
openape materials complete-all [--dry-run] [--level in_progress|past|future|all] # 批次完成教材
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
### 成績與其他查詢 (Grades, Forums, Calendar)
|
|
@@ -77,23 +77,23 @@ openape materials complete-all # 批次標記教材為已完成
|
|
|
77
77
|
openape grades summary # 顯示學期成績總覽
|
|
78
78
|
openape grades course <id> # 顯示特定課程成績
|
|
79
79
|
openape forums list # 列出進行中課程的討論區
|
|
80
|
-
openape forums list-all
|
|
80
|
+
openape forums list-all [--level in_progress|all] # 列出所有討論區
|
|
81
81
|
openape forums discussions <forum-id> # 列出討論區中的討論串
|
|
82
82
|
openape forums posts <discussion-id> # 列出討論串中的貼文
|
|
83
|
-
openape forums reply <post-id> <subject> <message>
|
|
84
|
-
openape forums post <forum-id> <subject> <message>
|
|
83
|
+
openape forums reply <post-id> <subject> <message> [--attachment-id <id>] [--inline-attachment-id <id>] # 回覆貼文
|
|
84
|
+
openape forums post <forum-id> <subject> <message> [--subscribe] [--pin] # 發起新討論
|
|
85
85
|
openape forums delete <post-id> # 刪除討論貼文
|
|
86
|
-
openape announcements list-all
|
|
86
|
+
openape announcements list-all [--unread-only] [--limit <n>] # 列出所有公告
|
|
87
87
|
openape announcements read <id> # 閱讀特定公告
|
|
88
|
-
openape calendar events
|
|
89
|
-
openape calendar export
|
|
88
|
+
openape calendar events [--upcoming] [--days <n>] [--course <id>] # 查詢行事曆事件
|
|
89
|
+
openape calendar export [--output-file <path>] [--days <n>] # 匯出事件
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
### 作業與檔案上傳 (Assignments & Upload)
|
|
93
93
|
```bash
|
|
94
94
|
# 作業查詢與繳交
|
|
95
95
|
openape assignments list <course-id> # 列出課程作業
|
|
96
|
-
openape assignments list-all
|
|
96
|
+
openape assignments list-all [--level in_progress|all] # 列出所有作業
|
|
97
97
|
openape assignments status <assignment-id> # 檢查作業繳交狀態
|
|
98
98
|
openape assignments submit <assignment-id> # 繳交作業
|
|
99
99
|
--text "內容" # 線上文字繳交
|
|
@@ -101,7 +101,7 @@ openape assignments submit <assignment-id> # 繳交作業
|
|
|
101
101
|
--file <path> # 直接上傳檔案並繳交
|
|
102
102
|
|
|
103
103
|
# 檔案上傳至草稿區
|
|
104
|
-
openape upload file <path>
|
|
104
|
+
openape upload file <path> [--filename <name>] # 上傳檔案取得 draft ID
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
### 頁面 (Pages)
|
|
@@ -138,4 +138,4 @@ cargo run -- --help
|
|
|
138
138
|
|
|
139
139
|
此專案之版權規範採用 **MIT License** - 至 [LICENSE](LICENSE) 查看更多相關聲明
|
|
140
140
|
|
|
141
|
-
> **免責聲明**:本工具為非官方開放原始碼專案,與中原大學官方無關。請斟酌使用腳本輔助功能,避免不當操作(如短時間發送大量請求修改系統狀態)而違反學術倫理或導致帳號遭封鎖。
|
|
141
|
+
> **免責聲明**:本工具為非官方開放原始碼專案,與中原大學官方無關。請斟酌使用腳本輔助功能,避免不當操作(如短時間發送大量請求修改系統狀態)而違反學術倫理或導致帳號遭封鎖。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mo7yw4ng/openape",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"description": "CLI tool for CYCU i-Learning platform",
|
|
5
5
|
"bin": {
|
|
6
6
|
"openape": "bin/openape.js"
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
"build": "tsc && npx shx mv bin/index.js bin/openape.js"
|
|
10
10
|
},
|
|
11
11
|
"optionalDependencies": {
|
|
12
|
-
"@mo7yw4ng/openape-linux-x64": "2.1.
|
|
13
|
-
"@mo7yw4ng/openape-linux-arm64": "2.1.
|
|
14
|
-
"@mo7yw4ng/openape-darwin-x64": "2.1.
|
|
15
|
-
"@mo7yw4ng/openape-darwin-arm64": "2.1.
|
|
16
|
-
"@mo7yw4ng/openape-win32-x64": "2.1.
|
|
17
|
-
"@mo7yw4ng/openape-win32-arm64": "2.1.
|
|
12
|
+
"@mo7yw4ng/openape-linux-x64": "2.1.5",
|
|
13
|
+
"@mo7yw4ng/openape-linux-arm64": "2.1.5",
|
|
14
|
+
"@mo7yw4ng/openape-darwin-x64": "2.1.5",
|
|
15
|
+
"@mo7yw4ng/openape-darwin-arm64": "2.1.5",
|
|
16
|
+
"@mo7yw4ng/openape-win32-x64": "2.1.5",
|
|
17
|
+
"@mo7yw4ng/openape-win32-arm64": "2.1.5"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"typescript": "^5.0.0",
|