{"id":15113714,"url":"https://github.com/arshiadadras/term-khor","last_synced_at":"2026-01-30T11:19:49.487Z","repository":{"id":255966886,"uuid":"853999594","full_name":"ArshiaDadras/term-khor","owner":"ArshiaDadras","description":"TermKhor is a Bash script that automates course selection at Sharif University using the university's API, allowing students to quickly and effortlessly register for courses.","archived":false,"fork":false,"pushed_at":"2025-01-27T02:29:04.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T15:26:30.352Z","etag":null,"topics":["api","bash","script","university"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArshiaDadras.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-08T05:55:39.000Z","updated_at":"2025-01-27T02:29:07.000Z","dependencies_parsed_at":"2024-09-08T07:22:51.329Z","dependency_job_id":"dc4282bd-be12-4dba-a968-4620c2dc1932","html_url":"https://github.com/ArshiaDadras/term-khor","commit_stats":null,"previous_names":["arshiadadras/term-khor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArshiaDadras%2Fterm-khor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArshiaDadras%2Fterm-khor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArshiaDadras%2Fterm-khor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArshiaDadras%2Fterm-khor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArshiaDadras","download_url":"https://codeload.github.com/ArshiaDadras/term-khor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247378140,"owners_count":20929296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","bash","script","university"],"created_at":"2024-09-26T01:22:34.734Z","updated_at":"2026-01-30T11:19:49.434Z","avatar_url":"https://github.com/ArshiaDadras.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Term-Khor (ترم‌خوار) 🍽️📚\n\n**Term-Khor** is an automated Bash script designed to assist Sharif University students in the stressful course selection process by interfacing with the university’s API. Let **Term-Khor** handle course registration for you, so you can sit back and relax! 😎\n\n## ✨ Features\n\n- ⚙️ **Automated Course Selection**: Automatically register for courses at a precise time with multiple retry attempts.\n- ⏰ **Customizable Timings**: Set your own start and end times for the registration process.\n- 🔒 **JWT or Credentials Authentication**: Secure access via your university token or use your Student ID and password for dynamic token generation.\n- 📚 **Multi-course Support**: Register for multiple courses and corresponding units in one go.\n- 🛑 **Graceful Shutdown**: Exit the script smoothly using `CTRL+C` without losing progress or leaving tasks incomplete.\n\n## 📋 Requirements\n\nMake sure the following tools are installed on your system:\n\n- **gdate** (GNU date)\n- **curl**\n\nYou can install them using the following commands:\n\n```bash\n# On macOS\nbrew install coreutils\nbrew install curl\n\n# On Ubuntu/Debian\nsudo apt-get install curl\n```\n\nAlso, ensure **Python 3** is installed if you're using Student ID and password for authentication.\n\n## 🚀 Usage\n\nRun the script with either a JWT token or your Student ID and password:\n\n### Method 1: Using JWT Token\n```bash\n./select_course.sh -t \u003ctoken\u003e -c \u003ccourse1,course2,...\u003e -u \u003cunit1,unit2,...\u003e [-s \u003cstart_time\u003e] [-e \u003cend_time\u003e]\n```\n\n### Method 2: Using Student ID and Password\n```bash\n./select_course.sh -i \u003cstudent_id\u003e -p \u003cpassword\u003e -c \u003ccourse1,course2,...\u003e -u \u003cunit1,unit2,...\u003e [-s \u003cstart_time\u003e] [-e \u003cend_time\u003e]\n```\n\n### 🔑 Parameters:\n- `-t \u003ctoken\u003e`: Your JWT token for authentication (required if not using student ID/password).\n- `-i \u003cstudent_id\u003e`: Your student ID for authentication (required if not using token).\n- `-p \u003cpassword\u003e`: Your password for authentication (required if not using token).\n- `-c \u003ccourse1,course2,...\u003e`: Comma-separated list of `courseID-groupID`s (required). Example: `-c 40455-1,40103-2`.\n- `-u \u003cunit1,unit2,...\u003e`: Comma-separated list of units corresponding to each course (required). Example: `-u 3,1`.\n- `-s \u003cstart_time\u003e`: Start time for course registration in `HH:MM` format (default: `08:00`).\n- `-e \u003cend_time\u003e`: End time for course registration in `HH:MM` format (optional).\n\n### 💡 Example:\n\nUsing a JWT token:\n```bash\n./select_course.sh -t eyJhbGciOiJIUzI1... -c 40455-1,40103-2 -u 3,1 -s 08:00 -e 10:00\n```\n\nUsing Student ID and password:\n```bash\n./select_course.sh -i 981234567 -p mypassword -c 40455-1,40103-2 -u 3,1 -s 08:00 -e 10:00\n```\n\n### 📌 Notes:\n- The number of courses (`-c`) should match the number of units (`-u`).\n- The script retries course registration every **50 milliseconds**. You can adjust this delay in the script.\n- You can safely stop the script at any time by pressing `CTRL+C`.\n\n## ⚙️ How It Works\n\n1. ⏳ **Wait Until Start Time**: The script waits until the specified start time before beginning the registration process.\n2. 📜 **Course Registration**: The script continuously sends registration requests for your selected courses until either the registration is successful or the end time is reached.\n3. 🔧 **Graceful Exit**: If interrupted, the script will clean up all background processes and exit smoothly.\n\n## 🛠️ Dependencies\n\n- **gdate**: Required for handling precise time operations in the script.\n- **cURL**: Utilized for sending HTTP POST requests to the university's API for course registration.\n- **Python 3**: Needed if you're using your Student ID and password for dynamic JWT token retrieval.\n\n## 📄 License\n\nThis project is licensed under the **MIT License**. Feel free to use, modify, and share!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farshiadadras%2Fterm-khor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farshiadadras%2Fterm-khor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farshiadadras%2Fterm-khor/lists"}