# txt2tex

Convert a plain `.txt` resume into a professional PDF — no LaTeX knowledge needed.

```
resume.txt  →  parser  →  struct  →  LaTeX  →  tectonic  →  resume.pdf
```

---

## Install

### macOS / Linux (recommended)
```bash
brew install txt2tex
# then install tectonic: brew install tectonic
```

Or if you don't have Homebrew:
```bash
cargo install txt2tex
brew install tectonic
```

### Windows (PowerShell as Administrator)
```powershell
iex (curl -useb https://github.com/whynotdeep7/txt2tex/releases/download/v0.2.0/install-windows.ps1)
```

This downloads and runs the installer directly — no need to clone the repo.

### Manual installation (any OS with Rust)
```bash
cargo install txt2tex
brew install tectonic  # or: apt-get install tectonic, choco install tectonic, etc.
```

---

## Usage

```bash
# create resume.txt in current folder, open in nvim, generate PDF
txt2tex

# create a fresh resume.txt from template (fails if one already exists)
txt2tex new

# analyze your resume for weak spots and missing info
txt2tex analyze

# skip editor, just regenerate PDF from current resume.txt
txt2tex --no-edit

# parse resume.txt and print the data (no PDF) — good for debugging
txt2tex --dry-run

# show all options
txt2tex --help
```

---

## Resume format

```
# PERSONAL INFORMATION
name: Alex Johnson
email: alex@email.com
phone: +1 555-867-5309
github: github.com/alexjohnson

# EDUCATION
degree: B.Tech Computer Science
university: State Technical University
year: 2020 -- 2024

# SKILLS
Languages: Rust, C++, Python, JavaScript
Frameworks: React, Node.js, Express
Developer Tools: Git, Docker, Linux, AWS

# PROJECTS

project:
title: MyApp
description: What it does. How you built it. What impact it had
tech: Rust, PostgreSQL, Docker

# EXPERIENCE

experience:
company: Some Company
role: Software Intern
duration: Summer 2024
- Built REST APIs handling 10k requests per day
- Reduced latency by 30% through query optimization
```

---

## Requirements

| Tool | Purpose | Install |
|---|---|---|
| Rust | compile txt2tex | https://rustup.rs |
| tectonic | compile LaTeX to PDF | `brew install tectonic` |
| nvim | edit resume.txt | `brew install neovim` |

---

## Project structure

```
txt2tex/
├── src/
│   ├── main.rs       entry point, CLI commands
│   ├── lib.rs        exports modules for tests
│   ├── model.rs      Resume, Project, Experience structs
│   ├── parser.rs     reads .txt file → fills structs
│   ├── template.rs   structs → LaTeX string
│   ├── pdf.rs        runs tectonic, saves PDF
│   ├── editor.rs     opens nvim/vim/nano
│   └── analyzer.rs   checks resume for weak spots
├── templates/
│   └── jake.txt      starter template (jake gutierrez style)
├── tests/
│   └── integration_test.rs
├── install.sh        macOS/Linux installer
├── install.ps1       Windows installer
└── .github/
    └── workflows/
        └── release.yml  builds binaries for all platforms on tag push
```

---

## License

MIT
