Metadata-Version: 2.1
Name: latexcor
Version: 0.2.1
Summary: 
License: MIT
Author: infocornouaille
Author-email: 90894019+infocornouaille@users.noreply.github.com
Requires-Python: >=3.12,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: PyYAML (>=6.0.2,<7.0.0)
Requires-Dist: chardet (>=5.2.0,<6.0.0)
Requires-Dist: pydantic (>=2.9.2,<3.0.0)
Requires-Dist: python-slugify (>=8.0.4,<9.0.0)
Requires-Dist: rich (>=13.9.3,<14.0.0)
Requires-Dist: tomli (>=2.0.2,<3.0.0)
Requires-Dist: typer (>=0.12.5,<0.13.0)
Requires-Dist: watchdog (>=5.0.3,<6.0.0)
Description-Content-Type: text/markdown

# latexcor

[![PyPI version](https://badge.fury.io/py/latexcor.svg)](https://badge.fury.io/py/latexcor)
[![Python Versions](https://img.shields.io/pypi/pyversions/latexcor.svg)](https://pypi.org/project/latexcor/)
[![Downloads](https://pepy.tech/badge/latexcor)](https://pepy.tech/project/latexcor)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

LaTeX Compiler and File Manager - Automate your LaTeX workflow

## Features

- Clean auxiliary LaTeX files
- Convert .tex files to UTF-8 encoding
- Recompile LaTeX files automatically
- Slugify file and directory names
- Watch directory for changes and auto-compile
- Support for XeLaTeX and LuaLaTeX engines

## Installation

```bash
pip install --upgrade latexcor
```

## Usage

```console
$ latexcor [OPTIONS] COMMAND [ARGS]...
```

### Global Options

- `--install-completion`: Install completion for the current shell
- `--show-completion`: Show completion for the current shell
- `--help`: Show help message and exit

### Commands

#### Clean (`clean`)

Clean auxiliary LaTeX files in a directory.

```console
$ latexcor clean [OPTIONS]

Options:
  -p, --path DIRECTORY  Path to clean (defaults to current directory)
  --help               Show this message and exit
```

#### Convert to UTF-8 (`convert-utf8`)

Convert .tex files to UTF-8 encoding.

```console
$ latexcor convert-utf8 [OPTIONS]

Options:
  -p, --path DIRECTORY  Path to process (defaults to current directory)
  --help               Show this message and exit
```

#### Recompile (`recompile`)

Recompile all LaTeX files in a directory.

```console
$ latexcor recompile [OPTIONS]

Options:
  -e, --engine [xelatex|lualatex]  LaTeX engine to use [default: xelatex]
  -p, --path DIRECTORY            Path to process (defaults to current directory)
  -c, --confirm                   Confirm before recompiling each file
  --help                          Show this message and exit
```

#### Slugify (`slugify`)

Rename files and directories using slug format.

```console
$ latexcor slugify [OPTIONS]

Options:
  -p, --path DIRECTORY           Path to process (defaults to current directory)
  -c, --confirm / -C, --no-confirm  Confirm before renaming [default: confirm]
  -v, --preview / -V, --no-preview  Show preview of changes [default: preview]
  --help                         Show this message and exit
```

#### Version (`version`)

Display the current version of latexcor.

```console
$ latexcor version [OPTIONS]

Options:
  --help  Show this message and exit
```

#### Watch (`watch`)

Watch a directory and automatically compile LaTeX files when changes are detected.

```console
$ latexcor watch [OPTIONS]

Options:
  -e, --engine [xelatex|lualatex]  LaTeX engine to use [default: xelatex]
  -p, --path DIRECTORY            Path to watch (defaults to current directory)
  --help                          Show this message and exit
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
