An open API service indexing awesome lists of open source software.

https://github.com/djav1985/v-chatgpt-editor

Use the power of AI to correct book manuscripts like a real editor.
https://github.com/djav1985/v-chatgpt-editor

author book chatgpt manuscript openai

Last synced: about 2 months ago
JSON representation

Use the power of AI to correct book manuscripts like a real editor.

Awesome Lists containing this project

README

          




❯ v-chatgpt-editor



Transforming Manuscripts, Empowering Creativity!




Built with the tools and technologies:



.ENV
GNU%20Bash
Python



## 🔗 Table of Contents

- [🔗 Table of Contents](#-table-of-contents)
- [📍 Overview](#-overview)
- [👾 Features](#-features)
- [📁 Project Structure](#-project-structure)
- [📂 Project Index](#-project-index)
- [🚀 Getting Started](#-getting-started)
- [☑️ Prerequisites](#️-prerequisites)
- [⚙️ Installation](#️-installation)
- [🔧 Configuration](#-configuration)
- [🖥️ Command-Line Usage](#-command-line-usage)
- [🤝 Contributing](#-contributing)
- [🎗 License](#-license)

---

## 📍 Overview

This project streamlines the editing and translation of DOCX manuscripts, addressing the challenges of document management and content refinement. Key features include flexible API integration, section-based editing, and seamless output formatting. Ideal for writers, editors, and translators, it enhances productivity while preserving the author's voice and style.

---

## 👾 Features

- **API Integration** – `app/api.py` manages requests to OpenAI services.
- **DOCX Processing** – `app/docx_handler.py` splits manuscripts, applies edits, and rebuilds documents.
- **Command Interface** – `app/main.py` exposes `edit`, `translate`, `build`, and `cleanup` commands.

---

## 📁 Project Structure

```sh
└── /
├── README.md
├── IMPROVEMENTS.md
├── app
│ ├── api.py
│ ├── docx_handler.py
│ ├── main.py
│ ├── validate_improvements.py
│ ├── requirements.txt
│ ├── run.sh
│ ├── input/
│ ├── output/
│ └── .env (user-provided)
└── v-chatgpt-editor.png
```

### 📂 Project Index

/




IMPROVEMENTS.md
Summary of code quality improvements and validation steps.




app



api.py
OpenAI API utilities.


docx_handler.py
DOCX splitting and merging helpers.


main.py
CLI entry point.


validate_improvements.py
Internal validation checks.


input/
Source manuscripts.


output/
Processed documents.


requirements.txt
Project dependencies.


run.sh
Interactive helper script.


.env
User-provided environment variables.



---

## 🚀 Getting Started

### ☑️ Prerequisites

Before getting started with `v-chatgpt-editor`, ensure your runtime environment meets the following requirements:

- **Programming Language:** Python
- **Package Manager:** Pip

### ⚙️ Installation

To get started with `v-chatgpt-editor`:

1. Clone the repository:

```sh
❯ git clone
```

2. Navigate to the project directory:

```sh
❯ cd v-chatgpt-editor
```

3. Run the setup script from the repository root to install dependencies and start the app:

```sh
❯ ./app/run.sh
```

The script will automatically install dependencies, and guide you through selecting options such as editing or translating documents.

> 💡 **Smoke test:** Running `./app/run.sh` from the project root confirms the helper script can locate its resources regardless of your current directory.

### 🔧 Configuration

Create a `.env` file in `app/` with the following variables:

```env
OPENAI_API_KEY=
OPENAI_PROJECT_ID=
OPENAI_ORG=
MODEL=gpt-4o-mini
OUTPUT_DIR=output
```

This file is user-provided and should not be committed to version control.

### 🖥️ Command-Line Usage

Run the application directly:

```sh
python3 app/main.py edit path/to/file.docx
python3 app/main.py translate path/to/file.docx
python3 app/main.py build path/to/file.docx
python3 app/main.py cleanup
```

Alternatively, use the interactive helper script:

```sh
./app/run.sh
```

---

## 🤝 Contributing

See [IMPROVEMENTS.md](IMPROVEMENTS.md) for a summary of recent code quality improvements and validation steps. Run `python3 app/validate_improvements.py` to perform internal checks before committing changes.

---

## 🎗 License

This project is protected under the [MIT License](https://github.com/djav1985/v-chatgpt-editor/blob/main/LICENSE) License.

---