{"id":24062446,"url":"https://github.com/mathavansg/appscript_codeforce_api-script","last_synced_at":"2026-06-04T23:31:06.326Z","repository":{"id":267443017,"uuid":"901268708","full_name":"MathavanSG/appScript_codeForce_API-Script","owner":"MathavanSG","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-10T10:56:22.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T16:41:16.273Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MathavanSG.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-12-10T10:52:56.000Z","updated_at":"2024-12-10T10:56:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"095ac47e-112f-45c5-9442-663fa50b73dc","html_url":"https://github.com/MathavanSG/appScript_codeForce_API-Script","commit_stats":null,"previous_names":["mathavansg/appscript_codeforce_api-script"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MathavanSG/appScript_codeForce_API-Script","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathavanSG%2FappScript_codeForce_API-Script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathavanSG%2FappScript_codeForce_API-Script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathavanSG%2FappScript_codeForce_API-Script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathavanSG%2FappScript_codeForce_API-Script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MathavanSG","download_url":"https://codeload.github.com/MathavanSG/appScript_codeForce_API-Script/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MathavanSG%2FappScript_codeForce_API-Script/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33924832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-01-09T08:56:03.605Z","updated_at":"2026-06-04T23:31:06.292Z","avatar_url":"https://github.com/MathavanSG.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codeforces Rating Updater\n\nThis repository contains a Google Apps Script that updates problem ratings from Codeforces in a Google Sheets document. The script uses the Codeforces API to fetch problem details and writes the corresponding ratings to the spreadsheet.\n\n## Features\n\n- Fetches problem ratings from the Codeforces API.\n- Parses tags from a specified column in Google Sheets.\n- Handles various edge cases, such as invalid tags or missing problem ratings.\n- Writes the ratings to the next column in the spreadsheet.\n\n## How It Works\n\n1. **Input Tags**: The script reads tags from Column G (e.g., \"1234/A\", \"5678/B\").\n2. **Fetch Ratings**: For each tag, the script fetches the problem rating using the Codeforces API.\n3. **Output Ratings**: The script writes the ratings to Column H of the spreadsheet.\n\n## Prerequisites\n\n- A Google Sheets document where the script will run.\n- Tags in Column G (starting from Row 2).\n- Access to the Codeforces API.\n\n## Setup Instructions\n\n1. Open your Google Sheets document.\n2. Navigate to **Extensions \u003e Apps Script**.\n3. Copy and paste the code from `updateRatings.gs` into the Apps Script editor.\n4. Save the script and authorize the necessary permissions.\n5. Run the `updateRatings()` function to update the ratings in the sheet.\n\n## Script Overview\n\n### `updateRatings()`\nThis function:\n- Fetches tags from Column G.\n- Validates and parses each tag to extract the contest ID and problem index.\n- Calls the `getProblemRating()` function to fetch the rating.\n- Writes the ratings back to Column H.\n\n### `getProblemRating(contestId, problemIndex)`\nThis function:\n- Makes an API call to the Codeforces problem set endpoint.\n- Searches for the specified contest ID and problem index.\n- Returns the problem's rating or an appropriate error message.\n\n## Error Handling\n\n- **Empty Tags**: Tags that are empty will be marked as \"Invalid Tag.\"\n- **Invalid Format**: Tags that do not match the expected format (e.g., \"1234/A\") will be marked as \"Invalid Tag Format.\"\n- **API Errors**: If the Codeforces API fails, an error message will be returned.\n\n## Example\n\n| **Tag (Column G)** | **Rating (Column H)**   |\n|---------------------|-------------------------|\n| `1234/A`           | `Rating: 1500`         |\n| `5678/B`           | `Problem Not Found`    |\n| `abcd`             | `Invalid Tag Format`   |\n| (empty)            | `Invalid Tag`          |\n\n## Dependencies\n\n- Codeforces API: [https://codeforces.com/api/problemset.problems](https://codeforces.com/api/problemset.problems)\n\n## Known Issues\n\n- API Rate Limits: Excessive API calls may result in rate limiting by Codeforces.\n- Missing Data: Some problems may not have a rating available.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathavansg%2Fappscript_codeforce_api-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathavansg%2Fappscript_codeforce_api-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathavansg%2Fappscript_codeforce_api-script/lists"}