A lightweight tool for editing and refining scientific paper drafts using the OpenAI GPT API.
This script helps researchers improve clarity, consistency, and structure across sections such as Abstract, Introduction, Results, and Discussion.
- Automatically edits key sections of scientific papers
- Enhances grammar, tone, and structure using GPT
- Loads API key securely from a local file
- Fully reproducible via Conda environment
git clone git@github.com:Faezov/paper-editor.git
cd paper-editorconda env create -f environment.yml
conda activate openaiecho "sk-..." > config/open.key🔒 Your key is ignored by Git via
.gitignore.
Edit the file:
config/rules.jsonTo adjust prompt instructions, formatting behaviors, or section-specific handling.
(openai) python gpt-editor.py <your_paper_google_doc_id>Output:
gpt-edited.json
(Replace
<your_paper_google_doc_id>with the actual document ID.)
- API keys are never tracked in version control.
- Store them locally in
config/open.key. - Rotate your key if you suspect exposure.
- Python (via Conda)
- OpenAI Python SDK
requestspython-docx(optional for DOCX support)- JupyterLab (for notebook workflows)
See environment.yml for full details.
MIT License
Feel free to submit issues or pull requests. All suggestions welcome!