{"id":34522305,"url":"https://github.com/demondehellis/corrector","last_synced_at":"2026-05-06T13:04:05.749Z","repository":{"id":222958081,"uuid":"758843081","full_name":"demondehellis/corrector","owner":"demondehellis","description":"External Tool for JetBrains IDEs to correct grammar and punctuation in selected lines.","archived":false,"fork":false,"pushed_at":"2025-02-04T08:16:35.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-04T09:23:34.269Z","etag":null,"topics":["blogging","cli","external-tools","gpt","gpt-4","grammar","ide","intellij-idea","intellij-plugin","markdown","punctuation","spellchecker","writting"],"latest_commit_sha":null,"homepage":"https://github.com/demondehellis/corrector","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/demondehellis.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-02-17T08:38:49.000Z","updated_at":"2025-02-04T08:16:39.000Z","dependencies_parsed_at":"2024-02-17T09:32:23.469Z","dependency_job_id":"a1b16837-f37b-4978-b485-fa0afdff802d","html_url":"https://github.com/demondehellis/corrector","commit_stats":null,"previous_names":["demondehellis/redactor","demondehellis/corrector"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/demondehellis/corrector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demondehellis%2Fcorrector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demondehellis%2Fcorrector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demondehellis%2Fcorrector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demondehellis%2Fcorrector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/demondehellis","download_url":"https://codeload.github.com/demondehellis/corrector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/demondehellis%2Fcorrector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32694980,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["blogging","cli","external-tools","gpt","gpt-4","grammar","ide","intellij-idea","intellij-plugin","markdown","punctuation","spellchecker","writting"],"created_at":"2025-12-24T04:59:32.408Z","updated_at":"2026-05-06T13:04:05.744Z","avatar_url":"https://github.com/demondehellis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# External Tool for Grammar and Punctuation Correction\n\n## Overview\n\nThis simple script is designed for use as an **external tool** in JetBrains IDEs like **IntelliJ IDEA**, **PhpStorm**, and **PyCharm**, enabling quick text corrections on **selected lines** directly from the context menu or through keyboard shortcuts.\n\n![corrector-demo](https://github.com/user-attachments/assets/8a50b8d4-e9c9-4562-bb00-66bf81d2091c)\n\n## Features\n\n- **Correction of selected lines**: Select lines in your IDE and run the tool to correct grammar and punctuation.  \n- **Configurable settings**: Adjust the model and prompt via environment variables or shell configuration files.\n\n## Requirements\n\n- Python 3.7+\n- OpenAI Python library\n- dotenv for optional environment configuration\n\n## Installation\n\n1. Clone the repository:\n\n```bash\ngit clone git@github.com:demondehellis/corrector.git\ncd corrector\n```\n\n2. Install the required dependencies:\n\n```bash\npython3 -m venv venv \u0026\u0026 source venv/bin/activate \u0026\u0026 pip install -r requirements.txt\n```\n\n3. Configure environment variables:\n\nYou can set environment variables in your `.bashrc`, `.zshrc`, or any shell configuration file. Optionally, you can also create a `.env` file with the following variables:\n\n```dotenv\nOPENAI_API_KEY=your-api-key\nCORRECTOR_MODEL=gpt-4o-mini  # Optional, default model is gpt-4o-mini\n```\n\n## Basic Usage\n\nTo correct grammar and punctuation in an entire file:\n\n```bash\n/path/to/corrector/venv/bin/python corrector.py input.txt\n```\n\nTo save the corrected content to a specific file:\n\n```bash\n/path/to/corrector/venv/bin/python corrector.py input.txt --output output.txt\n```\n\nTo correct specific lines from the input file (e.g., lines 1 to 5) and save the result:\n\n```bash\n/path/to/corrector/venv/bin/python corrector.py input.txt --lines 1:5 --output output.txt\n```\n\n## Using as an External Tool in JetBrains IDEs\n\nTo use this script as an external tool, follow these steps:\n\n1. Open your IDE and navigate to `Preferences` \u003e `Tools` \u003e `External Tools`.\n2. Click the `+` button to add a new tool.\n3. Fill in the following details:\n   - **Name**: Grammar Corrector\n   - **Program**: Path to your Python executable (e.g., `/path/to/corrector/venv/bin/python`).\n   - **Arguments**: `/path/to/corrector/corrector.py $FilePath$ --lines $SelectionStartLine$:$SelectionEndLine$`\n   - **Working Directory**: `$ProjectFileDir$`\n   - Enable `Synchronize files after execution`.\n   - (Optional) Check `Open console for tool output` to view the output or any errors.\n4. Click `OK` to save the configuration.\n\n\u003cimg width=\"1118\" alt=\"Screenshot 2024-09-27 at 02 18 17\" src=\"https://github.com/user-attachments/assets/7035c86a-9e33-4f22-bcd1-3fbffb59a609\"\u003e\n\n### Tips for Quick Access\n\n- **Keyboard Shortcuts**: Assign a custom keyboard shortcut to the external tool for instant access. Go to `Preferences` \u003e `Keymap`, search for your external tool, and set your desired shortcut.\n- **Add to Menus or Toolbars**: For even quicker access, add the external tool to your IDE’s menu or toolbar by right-clicking on the menu or toolbar and selecting `Customize Menus and Toolbars`.\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdemondehellis%2Fcorrector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdemondehellis%2Fcorrector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdemondehellis%2Fcorrector/lists"}