Skip to content

khongsomeo/hcmus-dstn

Repository files navigation

HCMUS - DSTN

Graduate information lookup CLI - for those who don't want to use the official HCMUS graduate information lookup website.

Official HCMUS graduate information lookup website

Usage

Installation

Manually - Install required packages

pip install -r requirements.txt

Docker image

docker pull ghcr.io/khongsomeo/hcmus-dstn:latest

Check for a single degree

Usage:

usage: check.py single [-h] [--student_name STUDENT_NAME] [--degree_id DEGREE_ID] [--language LANGUAGE]

optional arguments:
  -h, --help            show this help message and exit
  --student_name STUDENT_NAME
                        Student Name (Vietnamese with/without diacritics; upper/lowercased; or just use your Student ID)
  --degree_id DEGREE_ID
                        Degree ID no.
  --language LANGUAGE   Language (en/vn)

Examples:

# Python
python check.py single --student_name "nguyen van a" --degree_id "QH123456"
# Docker image
docker run ghcr.io/khongsomeo/hcmus-dstn:latest single --student_name "nguyen van a" --degree_id "QH123456"

Check for multiple degrees

Usage:

usage: check.py multiple [-h] [--file FILE]

optional arguments:
  -h, --help   show this help message and exit
  --file FILE  Path to the .csv file to check

The .csv file must follow this format:

name1,degreeid1
name2,degreeid2
...

Examples:

# Python
python check.py multiple --file check.csv
# This command check for degress in test.csv.
# $(pwd)/test.csv - path to test.csv file
docker run -v $(pwd)/test.csv:/hcmus-dstn/test.csv ghcr.io/khongsomeo/hcmus-dstn:latest multiple --file test.csv

Configurations

Configurations can be found in configs/config.json and configs/config.yaml. By default, the program will use configs from config.json (though they have the same content).

configs/config.json:

{
    "api_url": "https://example.com/dstn/api", // Official school API
    "headers": {
      "User-Agent": ... // Do not edit the User-Agent
    },
    "results": {
      "rows": 10,                              // Max of results per row
      "page": 1,                               // Show results per page.
      "sord": "desc"                           // Sorting order
    }
}

configs/config.yaml:

api_url: https://example.com/dstn/api
headers:
    User-Agent: ... # Do not edit the User-Agent
results:
    rows: 10
    page: 1
    sord: desc

LICENSE

This project is licensed under THE GNU GPL v3

About

Graduate information lookup, using HCMUS API.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •