Metadata-Version: 2.3
Name: git2wp
Version: 0.1.0
Summary: A command-line tool for publishing Git repository changes to WordPress.
License: MIT
Author: Your Name
Author-email: your.email@example.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
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: Programming Language :: Python :: 3.13
Requires-Dist: click (>=8.1.7,<9.0.0)
Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
Requires-Dist: requests (>=2.31.0,<3.0.0)
Requires-Dist: rich (>=13.7.0,<14.0.0)
Description-Content-Type: text/markdown

# Git2WP CLI

A command-line tool for publishing Git repository changes to WordPress.

## Features

- Publish Git commits to WordPress as posts
- Test WordPress connection
- Dry-run mode to preview changes
- Support for different post statuses (draft, publish, pending, private)
- Colorful terminal output with rich formatting
- Environment-based configuration
- Git repository validation
- Detailed commit information display
- Changed files tracking

## Installation

1. Make sure you have Python 3.7+ installed
2. Install the package in development mode:

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

Or install it globally:

```bash
pip install git+https://github.com/yourusername/git2wp.git
```

## Configuration

Create a `.env` file in your home directory under `~/.config/git2wp/` with the following variables:

```ini
WORDPRESS_URL=https://your-wordpress-site.com
WORDPRESS_USERNAME=your-username
WORDPRESS_PASSWORD=your-password
# OR use an application password
# WORDPRESS_TOKEN=your-application-password

# Optional: Default path to look for Git repositories
GIT_PATH=~/repos
```

## Usage

```bash
# Publish the latest commit from a repository
git2wp publish /path/to/your/repo

# Publish a specific commit
git2wp publish /path/to/your/repo --commit abc1234

# Publish as a published post (default is draft)
git2wp publish /path/to/your/repo --status publish

# Dry run (show what would be published)
git2wp publish /path/to/your/repo --dry-run

# Test WordPress connection
git2wp test-connection

# Show help
git2wp --help
```

## Development

1. Clone the repository
2. Create a virtual environment:
   ```bash
   python -m venv venv
   source venv/bin/activate  # On Windows: venv\Scripts\activate
   ```
3. Install development dependencies:
   ```bash
   pip install -e .[dev]
   ```

## License

MIT

