From d5b02998938e4ffd545f2bf01bd6999c21c92393 Mon Sep 17 00:00:00 2001 From: WindowScary321 <126940686+WindowScary321@users.noreply.github.com> Date: Wed, 18 Nov 2026 11:27:54 +0700 Subject: [PATCH 1/2] =?UTF-8?q?docs:=20d=E1=BB=8Bch=20README=20m=E1=BA=B7c?= =?UTF-8?q?=20=C4=91=E1=BB=8Bnh=20sang=20ti=E1=BA=BFng=20Anh,=20gi?= =?UTF-8?q?=E1=BB=AF=20b=E1=BA=A3n=20ti=E1=BA=BFng=20Vi=E1=BB=87t=20v?= =?UTF-8?q?=C3=A0=20th=C3=AAm=20disclaimer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MANIFEST.in | 4 + README.md | 227 +++++++++++++++++++++++++++------------------------ README.vi.md | 151 ++++++++++++++++++++++++++++++++++ 3 files changed, 276 insertions(+), 106 deletions(-) create mode 100644 README.vi.md diff --git a/MANIFEST.in b/MANIFEST.in index 09529c4..25322ec 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,7 @@ +include LICENSE +include README.md +exclude README.vi.md prune docs prune tasks prune tests +global-exclude *.py[cod] __pycache__ diff --git a/README.md b/README.md index deda84c..791236d 100644 --- a/README.md +++ b/README.md @@ -1,138 +1,153 @@ # MyFAP API CLI -## Giới thiệu +**English** | [Tiếng Việt](./README.vi.md) -Unofficial CLI tương tác với các API internal của ứng dụng myFAP giúp xem lịch học, lịch thi, điểm số (sự thất vọng của gia đình) và thông tin sinh viên +## Introduction -## Tính năng chính -- Hỗ trợ đa nền tảng -- Login thông qua FEID hoặc Google OAuth -- Xem lịch học (từng tuần hoặc cả Kỳ) -- Xem điểm (từng môn hoặc cả Kỳ) -- Check điểm danh (từng môn hoặc cả Kỳ) -- Check tình trạng đơn từ -- Xem thông báo của trường -- Check Info của sinh viên hoặc phòng dvsv -- Convert lịch học Kỳ sang **ICS**, dễ dàng import lịch học vào Google Calendar hoặc các dịch vụ tương tự -- Và nhiều hơn nữa ... +An unofficial CLI that talks to the internal APIs of the myFAP mobile app to check class schedules, exam dates, grades (the family disappointment edition), and student profile info. -## Cách sử dụng +## Disclaimer -- Cài đặt cli +- **Unofficial tool:** This is an independent project built for personal and educational use. It is not affiliated with, authorized, maintained, or endorsed by FPT University (FPTU) or the official myFAP development team. +- **Use at your own risk:** This software is provided "as is", without warranty of any kind. The author is not responsible for any account issues, inaccurate data, service disruptions, or other damages resulting from using this CLI. Always double-check important academic records such as exam schedules, final grades, and tuition fees on the official FAP portal or the official myFAP app. +- **Warnings on internal APIs and session security:** + - **Reverse-engineered internal APIs:** This tool relies on undocumented internal endpoints extracted from the myFAP Android client. Upstream changes can break functionality, alter responses, or block requests at any time without notice. + - **Plaintext local session:** After logging in, your OAuth tokens and `authen_key` are stored in plaintext JSON at `~/.myfap-api-cli/session.json` (or the path passed to `--config`). Never share this file or commit exported `.json`/`.ics` student data to public repositories. Run `myfap logout` when finished on shared machines. + - **Responsible usage:** Avoid automated high-frequency polling or scraping that puts unnecessary load on upstream servers. - ``` +## Key Features +- Cross-platform support (Windows, macOS, Linux) +- Log in via FEID or Google OAuth +- View class schedules (weekly or full semester) +- View grades (per subject or full semester) +- Check attendance (per subject or full semester) +- Check submitted student applications +- Read campus news and announcements +- View student profile and Student Services (DVSV) info +- Export semester class schedules and exam schedules to **ICS** for Google Calendar or other calendar apps +- And more... + +## Usage + +- Install the CLI: + + ```sh pip install myfap ``` -- Lấy danh sách cơ sở +- List available campuses: - ``` + ```sh myfap campuses ``` -- Login vào myFAP api thông qua FEID - ``` +- Log in to the myFAP API via FEID: + + ```sh myfap login --campus HN ``` - Sau khi hoàn thành login, phiên đăng nhập sẽ được lưu ở ``~/.myfap-api-cli/session.json`` -- Login cho cơ sở Xavalo - ``` + After logging in, your session is saved at `~/.myfap-api-cli/session.json`. + +- Log in for the Xavalo (HCM) campus: + + ```sh myfap login -c HCM ``` -- Lấy Lịch học *(tự động lấy kỳ mới nhất)* +- Fetch your class schedule *(automatically picks the latest semester)*: - ``` + ```sh myfap schedule ``` -## Danh sách các Command +## Command Reference -| Command | Tác dụng | +| Command | Description | |:--|:--| -| `version` | Hiển thị phiên bản CLI | -| `doctor` | Kiểm tra cấu hình; thêm `--online` để kiểm tra kết nối bootstrap v2. | -| `login` | Đăng nhập hoặc dùng session hiện có; thêm `--force` để đăng nhập lại | -| `logout` | Xóa session trên máy | -| `refresh` | Làm mới token và session | -| `campuses` | Liệt kê các cơ sở của API đang chọn | -| `semesters` | Liệt kê các kỳ học | -| `schedule` | Xem lịch học theo kỳ; dùng `--ics` để xuất lịch **ICS** | -| `week-timetable` | Xem lịch học theo tuần hoặc ngày | -| `exams` | Xem lịch thi; dùng `--ics` để xuất lịch, thêm `--full` để kèm thông tin phụ | -| `courses` | Xem danh sách khóa học theo kỳ | -| `marks` | Xem điểm theo kỳ, chi tiết theo môn hoặc tổng kết với `--summary` | -| `transcript` | Xem bảng điểm toàn khóa; `--pretty` phân tích dữ liệu bảng HTML sang JSON | -| `attendance` | Xem điểm danh theo kỳ hoặc theo môn và lớp | -| `applications` | Xem danh sách đơn đã gửi | -| `news` | Xem hoặc tìm kiếm tin tức | -| `info student` | Xem thông tin sinh viên | -| `info photo` | Lấy dữ liệu ảnh sinh viên ở dạng JSON | -| `info campus` | Xem thông tin phòng dịch vụ sinh viên | -| `other training` | Xem điểm phong trào theo kỳ | -| `other survey` | Kiểm tra khảo sát cần làm | -| `other feedback` | Kiểm tra feedback đang mở | -| `other feedbacks` | Xem danh sách feedback của sinh viên; chỉ hỗ trợ v2 | -| `other profile` | Kiểm tra yêu cầu cập nhật hồ sơ | -| `other notification` | Xem thông báo của sinh viên | -| `other fee` | Xem các khoản học phí và trạng thái thanh toán | -| `other balance` | Xem số dư tài khoản | -| `other subjects` | Xem danh sách môn; có thể lọc theo kỳ | -| `other rating list` | Xem danh sách đánh giá; chỉ hỗ trợ v1 | - -## Biến môi trường -Gồm 2 biến mặc định -- ``MYFAP_TIMEOUT``: thay đổi thời gian timeout mặc định (mặc định: 10s), danh sách môn timeout 30s -- ``MYFAP_API_VER``: overide phiên bản api (mặc định: v2) - -## Lưu ý -Khi thiếu `--semester`, cli chọn kỳ theo `startDate` gần đây. Với lịch tuần, `--date` quyết định năm nếu bạn không truyền `--year` - -## Các Options -Ví dụ: +| `version` | Show the CLI version | +| `doctor` | Check local configuration; add `--online` to test the v2 bootstrap connection | +| `login` | Log in or reuse an existing session; add `--force` to force re-authentication | +| `logout` | Delete the local session | +| `refresh` | Refresh tokens and session state | +| `campuses` | List campuses for the selected API version | +| `semesters` | List available semesters | +| `schedule` | View semester class schedule; use `--ics` to export an **ICS** calendar | +| `week-timetable` | View weekly or daily class timetable | +| `exams` | View exam schedule; use `--ics` to export an **ICS** file, add `--full` for extra fields | +| `courses` | List courses for a semester | +| `marks` | View semester grades, per-course details, or summary with `--summary` | +| `transcript` | View full academic transcript; `--pretty` parses the HTML table into JSON | +| `attendance` | Check attendance by semester or filter by subject and class | +| `applications` | List submitted student applications | +| `news` | Read or search campus news | +| `info student` | View student profile information | +| `info photo` | Fetch student photo data as JSON | +| `info campus` | View Student Services (DVSV) contact details | +| `other training` | View training points by semester | +| `other survey` | Check pending surveys | +| `other feedback` | Check open feedbacks | +| `other feedbacks` | List student feedbacks; v2 only | +| `other profile` | Check profile update requests | +| `other notification` | View student notifications | +| `other fee` | View tuition fees and payment status | +| `other balance` | View account balance | +| `other subjects` | List subjects; optionally filter by semester | +| `other rating list` | View rating list; v1 only | + +## Environment Variables +Two environment variables are supported by default: +- `MYFAP_TIMEOUT`: override the default request timeout in seconds (default: `10`s; subject listing uses `30`s) +- `MYFAP_API_VER`: override the API version (default: `v2`) + +## Notes +When `--semester` is omitted, the CLI picks the current semester from recent `startDate` values (at least one past semester needs a valid `startDate` for auto-selection to work, which holds true unless you are a freshman whose first semester has not started yet). For `week-timetable`, `--date` determines the year if `--year` is omitted. + +## Options +Examples: ```sh myfap --api-version v2 --campus HN schedule --ics myfap schedule --ics --api-version v2 --campus HN myfap info student --timeout 20 --stdout ``` -Nếu khai báo cùng option ở nhiều cấp, giá trị ở lệnh con được ưu tiên; lặp trong cùng cấp thì dùng giá trị cuối - -|Option|Chú thích| -|:-|:-| -|--help|Hiển thị bảng Commands và Options| -|--config <đường dẫn>|Đường dẫn tới file cấu hình session tùy chỉnh (mặc định: ~/.myfap-api-cli/session.json)| -|--timeout |Tăng hoặc giảm thời gian chờ dữ liệu gửi về từ server, có thể dùng biến môi trường ``MYFAP_TIMEOUT``| -|--api-version |Chọn API; ưu tiên option, biến môi trường `MYFAP_API_VER`, version trong session, rồi mặc định v2. Session cũ thiếu version vẫn là v1| -|-c, --campus |Mã cơ sở; ưu tiên option rồi session. APHL chỉ mặc định cho v1; v2 cần chọn campus nếu chưa có mã phù hợp trong session| -|-s, --semester |Tên kỳ học (VD: ``Fall2026``)| -|-cid, --courseid |Chọn mã môn, chỉ có ở command ``marks``. (VD: 82934, lấy từ bảng điểm của kỳ, ko phải mã môn như PRO192, SWE201c, ...)| -|-w, --week |Chọn tuần, chỉ có ở command ``week-timetable``| -|-y, --year |Chọn năm học, chỉ có ở command ``week-timetable``| -|-d, --date \|Chỉ định ngày chính xác, chỉ có ở command ``week-timetable``| -|-sc, --subjectcode |Chọn môn học, chỉ có ở command ``attendance``| -|-cn, --classname |Chọn lớp học, chỉ có ở command ``attendance``| -|--ics|Convert Sang **ICS**, dễ dàng import lịch vào Google Calendar hoặc các dịch vụ tương tự, áp dụng cho command ``schedule`` (lịch học) và ``exams`` (lịch thi)| -|--full|Kèm toàn bộ thông tin phụ khi xuất ICS ở command ``exams``, mặc định xuất các thông tin quan trọng (môn, phòng thi, ngày công bố)| -|-p, --pretty|Format lại bảng điểm gốc của trường sang dạng json, chỉ có ở command ``marks`` và ``transcript``| -|--output, -o |Thư mục xuất file thay vì thư mục hiện tại| -|--stdout|In kết quả trực tiếp ra màn hình thay vì lưu file| -|-f, --force|Buộc đăng nhập lại, bỏ qua file ``session.json``, chỉ có ở command ``login``| - - -## Thông tin thêm -- [Chọn API v1 hoặc v2](./docs/cli/api-versions.md): v2 là mặc định khi chưa có session; xem thứ tự ưu tiên và cách dùng v1 -- [Các ví dụ sử dụng](./docs/cli/Example.md) -- [Tạo môi trường dev bằng uv](./docs/cli/development.md) -- [CI và kiểm tra artifact](./docs/cli/development.md#ci-và-kiểm-tra-artifact) - -## Ghi công -- Api đã dc reverse engineered từ [myFAP android](https://play.google.com/store/apps/details?id=com.fuct): phiên bản *2.0.6*, versionCode: *31* -- [JADX](https://github.com/skylot/jadx): decompile và unpack apk android -- [Hermes decomp](https://github.com/SymbioticSec/hermes-decomp): decompile index.android.bundle về js có thể đọc dc -- [Burp Suite Community Edition](https://portswigger.net/burp): bắt gói tin và phân tích động ứng dụng myFAP -- [Playwright](https://playwright.dev/): chịu trắch nhiệm chính trong quy trình login -- [Typer](https://typer.tiangolo.com/) & [Rich](https://rich.readthedocs.io/): nền tảng giao diện cli của repo này -- [Beautiful Soup](https://www.crummy.com/software/BeautifulSoup/): bóc tách và xử lý dữ liệu html -- [ics.py](https://icspy.readthedocs.io/): tạo và chuẩn hóa định dạng iCalendar giúp dễ dàng import vào các ứng dụng lịch \ No newline at end of file +If the same option is passed at multiple command levels, the subcommand value takes precedence. If repeated at the same level, the last value wins. + +| Option | Description | +|:--|:--| +| `--help` | Show commands and options help | +| `--config ` | Path to a custom session config file (default: `~/.myfap-api-cli/session.json`) | +| `--timeout ` | Server request timeout in seconds; can also be set via `MYFAP_TIMEOUT` | +| `--api-version ` | Select API version. Precedence: CLI option, `MYFAP_API_VER`, session version, then default `v2`. Legacy sessions without a version still default to `v1` | +| `-c, --campus ` | Campus code. Precedence: CLI option then session. `APHL` is the default only for `v1`; `v2` requires choosing a campus if no compatible code is stored in the session | +| `-s, --semester ` | Semester name (e.g., `Fall2026`) | +| `-cid, --courseid ` | Internal numeric course ID, only available on `marks` (e.g., `82934` from the semester grade table, not subject codes like `PRO192` or `SWE201c`) | +| `-w, --week ` | Week number, only available on `week-timetable` | +| `-y, --year ` | Academic year, only available on `week-timetable` | +| `-d, --date ` | Specific date, only available on `week-timetable` | +| `-sc, --subjectcode ` | Subject code, only available on `attendance` | +| `-cn, --classname ` | Class name, only available on `attendance` | +| `--ics` | Export to **ICS** for easy import into Google Calendar or other calendar apps; supported on `schedule` (classes) and `exams` (exam schedule) | +| `--full` | Include all extra fields when exporting ICS on `exams` (default exports key fields: subject, exam room, and result announcement date) | +| `-p, --pretty` | Parse the raw HTML grade tables into JSON; supported on `marks` and `transcript` | +| `--output, -o ` | Output directory instead of the current working directory | +| `--stdout` | Print output to stdout instead of saving a file | +| `-f, --force` | Force re-login and ignore `session.json`; only available on `login` | + +## Further Documentation +*(Note: detailed documentation under `docs/` is currently written in Vietnamese.)* + +- [Choosing API v1 or v2](./docs/cli/api-versions.md): `v2` is the default when no session exists; precedence rules and using `v1` +- [Usage Examples](./docs/cli/Example.md) +- [Setting up a dev environment with uv](./docs/cli/development.md) +- [CI and Artifact Checks](./docs/cli/development.md#ci-và-kiểm-tra-artifact) + +## Credits +- Internal APIs reverse engineered from [myFAP Android](https://play.google.com/store/apps/details?id=com.fuct): version *2.0.6*, versionCode *31* +- [JADX](https://github.com/skylot/jadx): decompiling and unpacking the Android APK +- [Hermes decomp](https://github.com/SymbioticSec/hermes-decomp): decompiling `index.android.bundle` into readable JavaScript +- [Burp Suite Community Edition](https://portswigger.net/burp): intercepting packets and dynamic analysis of myFAP +- [Playwright](https://playwright.dev/): handles the browser OAuth login flow +- [Typer](https://typer.tiangolo.com/) & [Rich](https://rich.readthedocs.io/): CLI framework and terminal UI +- [Beautiful Soup](https://www.crummy.com/software/BeautifulSoup/): HTML parsing and extraction +- [ics.py](https://icspy.readthedocs.io/): generating and normalizing iCalendar files for calendar imports diff --git a/README.vi.md b/README.vi.md new file mode 100644 index 0000000..3b33d49 --- /dev/null +++ b/README.vi.md @@ -0,0 +1,151 @@ +# MyFAP API CLI + +[English](./README.md) | **Tiếng Việt** + +## Giới thiệu + +Unofficial CLI tương tác với các API internal của ứng dụng myFAP giúp xem lịch học, lịch thi, điểm số (sự thất vọng của gia đình) và thông tin sinh viên. + +## Tuyên bố miễn trừ trách nhiệm (Disclaimer) + +- **Công cụ không chính thức (Unofficial):** Dự án độc lập phục vụ mục đích học tập và tra cứu cá nhân, không liên kết, không được ủy quyền hay chứng thực bởi Trường Đại học FPT (FPTU) hoặc đội ngũ phát triển ứng dụng myFAP. +- **Tự chịu rủi ro khi sử dụng (Use at your own risk):** Phần mềm được cung cấp nguyên trạng ("as-is"), không kèm theo bất kỳ bảo đảm nào. Tác giả không chịu trách nhiệm cho bất kỳ sự cố tài khoản, sai lệch dữ liệu, gián đoạn dịch vụ hay thiệt hại nào phát sinh từ việc sử dụng CLI này. Với các thông tin học vụ quan trọng như lịch thi, điểm tổng kết và học phí, hãy luôn đối chiếu trực tiếp trên cổng FAP hoặc ứng dụng myFAP chính thức. +- **Cảnh báo về API nội bộ và bảo mật session:** + - CLI hoạt động dựa trên các endpoint nội bộ được reverse engineer từ ứng dụng myFAP Android. Phía nhà trường có thể thay đổi, giới hạn hoặc chặn các API này bất cứ lúc nào mà không báo trước. + - Sau khi `login`, token và `authen_key` được lưu dưới dạng JSON thuần (không mã hóa) tại `~/.myfap-api-cli/session.json` (hoặc đường dẫn chỉ định qua `--config`). Không chia sẻ file này, không commit file session hay dữ liệu cá nhân xuất ra (`.json`, `.ics`) lên Git/GitHub, và hãy chạy `myfap logout` để xóa session khi dùng trên máy chung. + - Không dùng công cụ để gửi request tự động tần suất cao gây tải lên hệ thống máy chủ. + +## Tính năng chính +- Hỗ trợ đa nền tảng +- Login thông qua FEID hoặc Google OAuth +- Xem lịch học (từng tuần hoặc cả Kỳ) +- Xem điểm (từng môn hoặc cả Kỳ) +- Check điểm danh (từng môn hoặc cả Kỳ) +- Check tình trạng đơn từ +- Xem thông báo của trường +- Check info của sinh viên hoặc phòng DVSV +- Convert lịch học kỳ sang **ICS**, dễ dàng import lịch học vào Google Calendar hoặc các dịch vụ tương tự +- Và nhiều hơn nữa... + +## Cách sử dụng + +- Cài đặt CLI: + + ```sh + pip install myfap + ``` + +- Lấy danh sách cơ sở: + + ```sh + myfap campuses + ``` + +- Login vào myFAP API thông qua FEID: + + ```sh + myfap login --campus HN + ``` + + Sau khi hoàn thành login, phiên đăng nhập sẽ được lưu ở `~/.myfap-api-cli/session.json`. + +- Login cho cơ sở Xavalo: + + ```sh + myfap login -c HCM + ``` + +- Lấy lịch học *(tự động lấy kỳ mới nhất)*: + + ```sh + myfap schedule + ``` + +## Danh sách các Command + +| Command | Tác dụng | +|:--|:--| +| `version` | Hiển thị phiên bản CLI | +| `doctor` | Kiểm tra cấu hình; thêm `--online` để kiểm tra kết nối bootstrap v2 | +| `login` | Đăng nhập hoặc dùng session hiện có; thêm `--force` để đăng nhập lại | +| `logout` | Xóa session trên máy | +| `refresh` | Làm mới token và session | +| `campuses` | Liệt kê các cơ sở của API đang chọn | +| `semesters` | Liệt kê các kỳ học | +| `schedule` | Xem lịch học theo kỳ; dùng `--ics` để xuất lịch **ICS** | +| `week-timetable` | Xem lịch học theo tuần hoặc ngày | +| `exams` | Xem lịch thi; dùng `--ics` để xuất lịch, thêm `--full` để kèm thông tin phụ | +| `courses` | Xem danh sách khóa học theo kỳ | +| `marks` | Xem điểm theo kỳ, chi tiết theo môn hoặc tổng kết với `--summary` | +| `transcript` | Xem bảng điểm toàn khóa; `--pretty` phân tích dữ liệu bảng HTML sang JSON | +| `attendance` | Xem điểm danh theo kỳ hoặc theo môn và lớp | +| `applications` | Xem danh sách đơn đã gửi | +| `news` | Xem hoặc tìm kiếm tin tức | +| `info student` | Xem thông tin sinh viên | +| `info photo` | Lấy dữ liệu ảnh sinh viên ở dạng JSON | +| `info campus` | Xem thông tin phòng dịch vụ sinh viên | +| `other training` | Xem điểm phong trào theo kỳ | +| `other survey` | Kiểm tra khảo sát cần làm | +| `other feedback` | Kiểm tra feedback đang mở | +| `other feedbacks` | Xem danh sách feedback của sinh viên; chỉ hỗ trợ v2 | +| `other profile` | Kiểm tra yêu cầu cập nhật hồ sơ | +| `other notification` | Xem thông báo của sinh viên | +| `other fee` | Xem các khoản học phí và trạng thái thanh toán | +| `other balance` | Xem số dư tài khoản | +| `other subjects` | Xem danh sách môn; có thể lọc theo kỳ | +| `other rating list` | Xem danh sách đánh giá; chỉ hỗ trợ v1 | + +## Biến môi trường +Gồm 2 biến mặc định: +- `MYFAP_TIMEOUT`: thay đổi thời gian timeout mặc định (mặc định: 10s), danh sách môn timeout 30s +- `MYFAP_API_VER`: override phiên bản API (mặc định: v2) + +## Lưu ý +Khi thiếu `--semester`, CLI chọn kỳ theo `startDate` gần đây (cần ít nhất một học kỳ trước đó có `startDate` hợp lệ để tự động nhận diện kỳ hiện tại). Với lịch tuần, `--date` quyết định năm nếu bạn không truyền `--year`. + +## Các Options +Ví dụ: +```sh +myfap --api-version v2 --campus HN schedule --ics +myfap schedule --ics --api-version v2 --campus HN +myfap info student --timeout 20 --stdout +``` + +Nếu khai báo cùng option ở nhiều cấp, giá trị ở lệnh con được ưu tiên; lặp trong cùng cấp thì dùng giá trị cuối. + +| Option | Chú thích | +|:--|:--| +| `--help` | Hiển thị bảng Commands và Options | +| `--config <đường dẫn>` | Đường dẫn tới file cấu hình session tùy chỉnh (mặc định: `~/.myfap-api-cli/session.json`) | +| `--timeout ` | Tăng hoặc giảm thời gian chờ dữ liệu gửi về từ server, có thể dùng biến môi trường `MYFAP_TIMEOUT` | +| `--api-version ` | Chọn API; ưu tiên option, biến môi trường `MYFAP_API_VER`, version trong session, rồi mặc định `v2`. Session cũ thiếu version vẫn là `v1` | +| `-c, --campus ` | Mã cơ sở; ưu tiên option rồi session. `APHL` chỉ mặc định cho `v1`; `v2` cần chọn campus nếu chưa có mã phù hợp trong session | +| `-s, --semester ` | Tên kỳ học (VD: `Fall2026`) | +| `-cid, --courseid ` | Chọn mã môn, chỉ có ở command `marks` (VD: `82934`, lấy từ bảng điểm của kỳ, không phải mã môn như `PRO192`, `SWE201c`, ...) | +| `-w, --week ` | Chọn tuần, chỉ có ở command `week-timetable` | +| `-y, --year ` | Chọn năm học, chỉ có ở command `week-timetable` | +| `-d, --date ` | Chỉ định ngày chính xác, chỉ có ở command `week-timetable` | +| `-sc, --subjectcode ` | Chọn môn học, chỉ có ở command `attendance` | +| `-cn, --classname ` | Chọn lớp học, chỉ có ở command `attendance` | +| `--ics` | Convert sang **ICS**, dễ dàng import lịch vào Google Calendar hoặc các dịch vụ tương tự, áp dụng cho command `schedule` (lịch học) và `exams` (lịch thi) | +| `--full` | Kèm toàn bộ thông tin phụ khi xuất ICS ở command `exams`, mặc định xuất các thông tin quan trọng (môn, phòng thi, ngày công bố) | +| `-p, --pretty` | Format lại bảng điểm gốc của trường sang dạng JSON, chỉ có ở command `marks` và `transcript` | +| `--output, -o ` | Thư mục xuất file thay vì thư mục hiện tại | +| `--stdout` | In kết quả trực tiếp ra màn hình thay vì lưu file | +| `-f, --force` | Buộc đăng nhập lại, bỏ qua file `session.json`, chỉ có ở command `login` | + +## Thông tin thêm +- [Chọn API v1 hoặc v2](./docs/cli/api-versions.md): v2 là mặc định khi chưa có session; xem thứ tự ưu tiên và cách dùng v1 +- [Các ví dụ sử dụng](./docs/cli/Example.md) +- [Tạo môi trường dev bằng uv](./docs/cli/development.md) +- [CI và kiểm tra artifact](./docs/cli/development.md#ci-và-kiểm-tra-artifact) + +## Ghi công +- API đã được reverse engineer từ [myFAP Android](https://play.google.com/store/apps/details?id=com.fuct): phiên bản *2.0.6*, versionCode: *31* +- [JADX](https://github.com/skylot/jadx): decompile và unpack APK Android +- [Hermes decomp](https://github.com/SymbioticSec/hermes-decomp): decompile `index.android.bundle` về JS có thể đọc được +- [Burp Suite Community Edition](https://portswigger.net/burp): bắt gói tin và phân tích động ứng dụng myFAP +- [Playwright](https://playwright.dev/): chịu trách nhiệm chính trong quy trình login +- [Typer](https://typer.tiangolo.com/) & [Rich](https://rich.readthedocs.io/): nền tảng giao diện CLI của repo này +- [Beautiful Soup](https://www.crummy.com/software/BeautifulSoup/): bóc tách và xử lý dữ liệu HTML +- [ics.py](https://icspy.readthedocs.io/): tạo và chuẩn hóa định dạng iCalendar giúp dễ dàng import vào các ứng dụng lịch From 208d3cfef488ab8e164ee6f3de9de5831075878a Mon Sep 17 00:00:00 2001 From: WindowScary321 <126940686+WindowScary321@users.noreply.github.com> Date: Wed, 18 Nov 2026 12:20:40 +0700 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20th=C3=AAm=20m=E1=BB=A5c=20gi?= =?UTF-8?q?=E1=BA=A5y=20ph=C3=A9p=20MIT=20v=C3=A0o=20README=20ti=E1=BA=BFn?= =?UTF-8?q?g=20Anh=20v=C3=A0=20ti=E1=BA=BFng=20Vi=E1=BB=87t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++++ README.vi.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 791236d..62e109c 100644 --- a/README.md +++ b/README.md @@ -151,3 +151,7 @@ If the same option is passed at multiple command levels, the subcommand value ta - [Typer](https://typer.tiangolo.com/) & [Rich](https://rich.readthedocs.io/): CLI framework and terminal UI - [Beautiful Soup](https://www.crummy.com/software/BeautifulSoup/): HTML parsing and extraction - [ics.py](https://icspy.readthedocs.io/): generating and normalizing iCalendar files for calendar imports + +## License + +This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details. diff --git a/README.vi.md b/README.vi.md index 3b33d49..96be434 100644 --- a/README.vi.md +++ b/README.vi.md @@ -149,3 +149,7 @@ Nếu khai báo cùng option ở nhiều cấp, giá trị ở lệnh con đư - [Typer](https://typer.tiangolo.com/) & [Rich](https://rich.readthedocs.io/): nền tảng giao diện CLI của repo này - [Beautiful Soup](https://www.crummy.com/software/BeautifulSoup/): bóc tách và xử lý dữ liệu HTML - [ics.py](https://icspy.readthedocs.io/): tạo và chuẩn hóa định dạng iCalendar giúp dễ dàng import vào các ứng dụng lịch + +## Giấy phép + +Dự án này được phát hành theo giấy phép MIT. Xem chi tiết tại file [LICENSE](./LICENSE).