{"id":16596532,"url":"https://github.com/kitesi/gpa-calculator","last_synced_at":"2026-04-17T23:04:26.169Z","repository":{"id":204027236,"uuid":"709910269","full_name":"kitesi/gpa-calculator","owner":"kitesi","description":"gpa calculator cli app that stores data in local files","archived":false,"fork":false,"pushed_at":"2024-03-10T01:59:54.000Z","size":123,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-10T02:47:46.130Z","etag":null,"topics":["gpa","gpa-calculator","grade-calculator","grades"],"latest_commit_sha":null,"homepage":"","language":"Go","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/kitesi.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":"2023-10-25T16:27:35.000Z","updated_at":"2024-06-05T03:56:36.016Z","dependencies_parsed_at":null,"dependency_job_id":"54a79348-78c0-425c-8f24-f0329d238948","html_url":"https://github.com/kitesi/gpa-calculator","commit_stats":null,"previous_names":["kitesi/gpa-calculator"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitesi%2Fgpa-calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitesi%2Fgpa-calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitesi%2Fgpa-calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kitesi%2Fgpa-calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kitesi","download_url":"https://codeload.github.com/kitesi/gpa-calculator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242272837,"owners_count":20100728,"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":["gpa","gpa-calculator","grade-calculator","grades"],"created_at":"2024-10-11T23:53:32.526Z","updated_at":"2026-04-17T23:04:26.135Z","avatar_url":"https://github.com/kitesi.png","language":"Go","funding_links":[],"categories":["\u003ca name=\"office\"\u003e\u003c/a\u003eOffice tools"],"sub_categories":[],"readme":"# GPA Calculator\n\nThis is a simple grade calculator written in go. It gathers the data from local\nfiles written in a special but simple format.\n\n## Calculation of Grades \u0026 GPA\n\n-   GPA ranges from 0.0 to 4.0\n-   A is the highest grades at 94%\n-   Read `./grade-conversions.go` for full details\n\nThere is no config to change the calculation currently, so I would recommend\nmodifying the source code yourself. However, you can also just assign your\nreceived grade to a class in the grade file itself.\n\n## Structure of Folder\n\nI recommend having a folder with all your grades, with the structure as such:\n\n```\ngrades/\n├── 2023\n│   ├── fall\n│   │   ├── cs100.grade\n│   │   ├── gov100.grade\n│   │   ├── lang100.grade\n│   │   └── ma100.grade\n│   └── spring\n│       ├── cs200.grade\n│       ├── gov200.grade\n│       ├── lang200.grade\n│       └── ma200.grade\n└── 2024\n    ├── fall\n    │   ├── cs300.grade\n    │   ├── gov300.grade\n    │   ├── lang300.grade\n    │   └── ma300.grade\n    └── spring\n        ├── cs400.grade\n        ├── gov400.grade\n        ├── lang400.grade\n        └── ma400.grade\n```\n\nThe files contain the data for each class, and they should have the extension \"grade.\"\nHowever, you do not need to have this structure. You can structure your folders however you\nlike, or you can just run the program on a single file. Note: 2023 and 2024 refers to the starting\nacademic year, but obviously spring occurs in the following year. A bit confusing, maybe you would\nwant to rename them \"freshman\" and \"sophomore.\"\n\n### Grade File\n\nThe grade file is just a simple text file with specific syntax. Grade\nparts/categories and denoted with a \"\u003e\" prefix and then their name, and the\nchildren elements are the `weight`, `data`, and `drop_lowest`.\n\n```\n\u003e Homework\nweight = 0.2\ndata =\n    20/20, # Assignment 1: What is a Derivative\n    17/20, # Assignment 2: Exploring Change\n    19/20  # ...\ndrop_lowest = 2 # drop the lowest 2 grades\n\n\u003e Quizes\nweight = 0.4\ndata = 40/50, 10/10, 9/10, 8/10\ndrop_lowest # drop the lowest grade\n\n\u003e Final Exam\nweight = 0.4\ndata = 58/60\n```\n\nComments start with a pound symbol (#) and the program does not consider\nanything past that character for that line. Indentation and extra white space\ndo not matter.\n\nIf you wish to specify options for the entire grade file, use the line \"~ Meta\"\nat the start of your file. For example, each class is assumed to be 4 credits,\nif you wish to change this use the credits option (there are 3 other recognized\noptions, but you can add whatever you like).\n\n```\n~ Meta\n# Amount of credits as an int.\ncredits = 3\n\n# Nice name for when printing.\nname = \"MA160 Multivariable Calculus \u0026 Series\"\n\n# Your desired grade as a float from 0-100. If you have this set to a value,\n# when you run the program with verbosity (-v), it will tell you what you need to\n# get on your final to get this grade.\ndesired_grade = 94\n\n# Describe your actual grade with a letter. This is useful for curves and other\n# unique systems that this program doesn't handle. For example, this program\n# doesn't assign A+ automatically because in my school, as a professor has to\n# manually assign an A+.\n\ngrade = \"A+\"\n\n# Ignore this file when the program is run through a directory.\n# Useful for when you want theoretical grades for other classes.\nignore = true\n# or\n# ignore\n\n# unrecognized option but it's ok\nlocation = Grand Hall 202\n\n# Start a new grade part: homework given every thursday\n\u003e Homework\n# ...snip...\n```\n\n## Output\n\nThis is the structure of the output with no verbosity:\n\n```shell\n$ gpa-calculator ~/grades\n/home/seven/grades (3.08)\n├── 2023 (3.12)\n│   ├── fall (3.08)\n│   │   ├── cs100.grade (85.16) (B)\n│   │   ├── \"GOV100: Introduction to Race \u0026 Politics\"(87.15) (B+)\n│   │   ├── lang100.grade (92.59) (A-)\n│   │   └── math100.grade (78.31) (C+)\n│   └── spring (3.17)\n│       ├── gov200.grade (84.80) (B)\n│       ├── lang200.grade (81.19) (B-)\n│       ├── ma200.grade (86.79) (B)\n│       └── cs200.grade (96.01) (A)\n└── 2024 (3.06)\n    ├── fall (2.91)\n    │   ├── cs300.grade (86.40) (B)\n    │   ├── gov300.grade (79.33) (C+)\n    │   ├── lang300.grade (85.12) (B)\n    │   └── ma300.grade (85.11) (B)\n    └── spring (3.35)\n        ├── cs400.grade (92.93) (A-)\n        ├── gov400.grade (86.98) (B)\n        ├── lang400.grade (94.66) (A)\n        └── ma400.grade (81.66) (B-)\n```\n\nThis is the structure with verbosity:\n\n```shell\n$ gpa-calculator ~/grades-1 - v\n/home/seven/grades-1 (3.08)\n├── 2023 (3.12)\n│   ├── fall (3.08)\n│   │   ├── cs100.grade (85.16) (B)\n│   │   │    ├── Homework (90.25) (A-)\n│   │   │    ├── Quizes (85.66) (B)\n│   │   │    ├── Mid Term (88.00) (B+)\n│   │   │    ├── Final Eaxm (80.36) (B-)\n│   │   │    └── to get a 80.00% you need at least a 72.26% on the final\n# ...snip...\n```\n\n## Installation\n\nInstall with brew:\n\n```shell\nbrew tap kitesi/gpa-calculator https://github.com/kitesi/gpa-calculator\nbrew install gpa-calculator\n```\n\nInstall with Go:\n\n```shell\ngo install github.com/kitesi/gpa-calculator@latest\n```\n\nOtherwise, go to the releases page and install from there.\n\n## Usage\n\n```shell\n$ gpa-calculator [file] [-e|--edit] [-h|--help] [-v|--verbose] [--version] [-u|--unweighted]\n```\n\nThis program only takes one positional argument, the file/folder to examine. If\nnot given, it will default to the environment variable `$GRADES_DIR`. If a file\nis given, but it is not found, the program will try its best to find it if\n`$GRADES_DIR` is set.\n\n```shell\n$ echo $GRADES_DIR\n/home/seven/grades/\n\n$ gpa-calculator cs100 -v\nfound file: /home/seven/grades/2023/fall/cs100.grade\n└── cs100.grade (98.81) (A)\n# ...\n```\n\nThe edit option will open up a specified file in your editor of choice\n(`$EDITOR`). If verbose is on it will display the subsections for a class as\nwell, like the homework, quizzes, etc. It will also show what you need to get\non the final to match your `desired_grade`. I personally have `gpa` aliased to\n`gpa-calculator -v`.\n\n### Syntax Highlighting\n\nSyntax highlighting on vim with tokyonight-night theme:\n\n![syntax highlighting](./syntax-highlighting.png)\n\nIf you would like (light) syntax highlighting for the grade files and you use\nvim, you can copy `./grade.vim` into `$VIMRUNTIME/syntax/grade.vim`. Then\nassociate the file extension with the filetype by adding this to your vim\nconfig:\n\n```vim\nautocmd BufNewFile,BufRead *.grade setf grade\n```\n\nSyntax highlighting for vscode might be implemented in the future.\n\n## Future\n\n-   add configuration\n    -   default folder\n    -   editor\n    -   GPA correlation (A+ = 4.3, A = 4.0)\n    -   Grade correlation (A = 93, A-=90, B+=87)\n-   consider more grading systems (AP, IP, 1-100 scale)\n-   add syntax highlighting to grade file on vscode\n-   make easier install\n-   colored output\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitesi%2Fgpa-calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkitesi%2Fgpa-calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitesi%2Fgpa-calculator/lists"}