Metadata-Version: 2.4
Name: tagitmd
Version: 0.2.0
Summary: CLI tool to add tags to markdown frontmatter
Author: Dean Allen
License: MIT
Project-URL: Homepage, https://github.com/deanallen/tagitmd
Project-URL: Repository, https://github.com/deanallen/tagitmd
Project-URL: Issues, https://github.com/deanallen/tagitmd/issues
Keywords: markdown,frontmatter,tags,yaml,cli
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
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 :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: Markup
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0
Requires-Dist: python-frontmatter>=1.0.0
Dynamic: license-file

# tagitmd

CLI tool to add tags to markdown frontmatter.

`tagitmd` scans markdown files in a directory and adds tags to their YAML frontmatter. It intelligently handles existing frontmatter, creating it if needed, and can optionally skip files that already have tags. You can also specify the path and disable recursion.

## Installation

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

## Usage

```bash
tagitmd TAG [TAG...] [OPTIONS]
```

### Examples

```bash
# Add tags to all markdown files in current directory
tagitmd python tutorial

# Add tags to files in a specific directory
tagitmd python --path /path/to/notes

# Preview changes without modifying files
tagitmd python tutorial --dry-run

# Only add tags to files that don't have any tags yet
tagitmd python --only-untagged

# Process only the target directory (not subdirectories)
tagitmd python --no-recursive
```

## Flags

### `--path`, `-p`
- **Type**: Directory path
- **Default**: Current directory (`.`)
- **Description**: Directory to process for markdown files

### `--dry-run`
- **Type**: Flag
- **Default**: False
- **Description**: Preview changes without modifying any files. Shows what would be changed.

### `--only-untagged`
- **Type**: Flag
- **Default**: False
- **Description**: Only modify files that don't have any existing tags in their frontmatter

### `--recursive` / `--no-recursive`
- **Type**: Boolean flag
- **Default**: True (recursive)
- **Description**: Whether to search subdirectories recursively

## Development Guide

### Setup

```bash
# Create virtual environment and install dependencies
make install
```

This will:
1. Create a virtual environment in `venv/`
2. Install the required dependencies
3. Install the package in editable mode

### Manual Setup

If you prefer to set up manually:

```bash
# Create virtual environment
make venv

# Activate virtual environment
source venv/bin/activate

# Install dependencies and package
make install
```

### Available Make Commands

```bash
make venv      # Create virtual environment
make install   # Install dependencies and package in dev mode
make test      # Run tests with coverage
make clean     # Clean build artifacts
make publish   # Build and publish to PyPI
```

### Running Tests

```bash
make test
```

This runs pytest with coverage reporting.

## Requirements

- Python 3.8 or higher
- click >= 8.0
- python-frontmatter >= 1.0.0

## License

MIT
