Metadata-Version: 2.4
Name: gitlatex
Version: 1.0.0
Summary: A simple UI for LaTeX projects with Git support. Clone repos, edit, compile, and push.
License-Expression: ISC
Project-URL: Homepage, https://github.com/yourusername/gitlatex
Project-URL: Documentation, https://github.com/yourusername/gitlatex#readme
Project-URL: Repository, https://github.com/yourusername/gitlatex
Keywords: latex,git,ide,editor
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Text Processing :: Markup :: LaTeX
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: flask>=2.0
Requires-Dist: gitpython>=3.1
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"

# GitLaTeX IDE

A simple web-based IDE for LaTeX projects with Git support. Create workspaces, clone repos, edit in a Monaco-powered editor, compile to PDF, and push changes—without Overleaf or the command line.

---

## Installation

Install from PyPI:

```bash
pip install gitlatex
```

**Requirements:** Python 3.8+, and (for full use) Git and a LaTeX distribution with `pdflatex` (e.g. [TeX Live](https://www.tug.org/texlive/), [MiKTeX](https://miktex.org/)).

---

## Quick start

```bash
gitlatex
```

Your browser will open at **http://localhost:5000**. Create a workspace or clone a repo, then open it to edit, compile, and use Git (status, diff, commit, push) from the toolbar.

**Options:**

| Option | Description |
|--------|-------------|
| `--port`, `-p` | Port (default: 5000) |
| `--host` | Bind host (default: 127.0.0.1) |
| `--no-browser` | Do not open the browser on start |
| `--repos` | Directory for workspaces (default: `./repos` in current working directory) |

Example: `gitlatex --port 3000 --repos /path/to/my/repos`

---

## Features

- **Workspaces** – Create local folders or clone from a Git URL (e.g. GitHub).
- **File tree** – Create, rename, move, delete, and upload files and folders.
- **Editor** – Monaco editor, multiple tabs, resizable panels.
- **Compile** – Build with `pdflatex`, view PDF in-app, see errors in the console.
- **Git** – Status, diff, commit, and push from the **Git** dropdown in the toolbar.
- **Settings** – Light/dark theme.

---

## Workflow

1. Run `gitlatex` and open the app in your browser.
2. **Add a project** – Create a new workspace or clone from a Git URL.
3. **Open** – Click a repo to open the editor.
4. **Edit** – Use the file tree and editor; click **Compile** to build.
5. **Git** – Use the **Git** menu for Status, Diff, Commit, Push.

Projects are stored in the `repos` directory (or the path you set with `--repos`).

---

## Troubleshooting

- **Compile fails** – Install a LaTeX distribution and ensure `pdflatex` is on your PATH.
- **Port in use** – Use another port: `gitlatex --port 3000`.
- **Windows: "The process cannot access the file... gitlatex.exe"** – Another instance is running. Close it, then run `gitlatex` again.

---

## Development

Run from source (no PyPI install): clone the repository, then from its root:

```bash
pip install -e .
gitlatex
```

Or run the package without installing:

```bash
pip install flask gitpython
python -m gitlatex
```

---

## Publishing to PyPI

For maintainers publishing a new version:

1. **Bump version** in `pyproject.toml` and `gitlatex/__init__.py` (e.g. `1.0.1`).

2. **Install build tools:**
   ```bash
   pip install build twine
   ```

3. **Build the package:**
   ```bash
   python -m build
   ```
   This creates `dist/gitlatex-1.0.0.tar.gz` (sdist) and `dist/gitlatex-1.0.0-py3-none-any.whl` (wheel).

4. **Upload to PyPI** (requires a [PyPI account](https://pypi.org/account/register/) and API token):
   ```bash
   twine upload dist/*
   ```
   Use `twine upload --repository testpypi dist/*` to upload to Test PyPI first.

5. **Set your token** (one-time): create `~/.pypirc` or use environment variables:
   ```ini
   [pypi]
   username = __token__
   password = pypi-YourAPIToken
   ```
   Or: `set TWINE_PASSWORD=pypi-YourAPIToken` (Windows) / `export TWINE_PASSWORD=...` (Unix) and `twine upload -u __token__ -p $TWINE_PASSWORD dist/*`.

---

## License

ISC
