Metadata-Version: 2.4
Name: ynabkit
Version: 0.4.2
Summary: CLI tool to support data import and export from YNAB
Home-page: https://github.com/zmoog/ynabkit
Author: Maurizio Branca
License: Apache License, Version 2.0
Project-URL: Issues, https://github.com/zmoog/ynabkit/issues
Project-URL: CI, https://github.com/zmoog/ynabkit/actions
Project-URL: Changelog, https://github.com/zmoog/ynabkit/releases
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click
Requires-Dist: openpyxl
Requires-Dist: PyYAML
Requires-Dist: rich
Requires-Dist: xlrd
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: author
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# ynabkit

[![PyPI](https://img.shields.io/pypi/v/ynabkit.svg)](https://pypi.org/project/ynabkit/)
[![Changelog](https://img.shields.io/github/v/release/zmoog/ynabkit?include_prereleases&label=changelog)](https://github.com/zmoog/ynabkit/releases)
[![Tests](https://github.com/zmoog/ynabkit/workflows/Test/badge.svg)](https://github.com/zmoog/ynabkit/actions?query=workflow%3ATest)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/zmoog/ynabkit/blob/master/LICENSE)

YNAB Kit is a CLI tool to support data import and export from YNAB. It provides tools to convert data from Fineco, N26, and Satispay export files to YNAB CSV format.

## Installation

Install this tool using `pip`:

    pip install ynabkit

## Usage

### Fineco Bank

Convert Fineco bank export files to YNAB format:

```bash
# Basic conversion
ynabkit fineco describe-transactions input.xlsx

# With payee configuration
ynabkit fineco describe-transactions input.xlsx --payees payees.yml
```

### N26 Bank

Convert N26 bank export files to YNAB format:

```bash
# Basic conversion
ynabkit n26 describe-transactions input.csv

# With payee configuration
ynabkit n26 describe-transactions input.csv --payees payees.yml
```

### Satispay

Convert Satispay export files to YNAB format:

```bash
# Basic conversion
ynabkit satispay describe-transactions input.csv

# Exclude specific transaction types
ynabkit satispay describe-transactions input.csv --exclude-kinds "Ricarica,Prelievo"

# With payee configuration
ynabkit satispay describe-transactions input.csv --payees payees.yml
```

### Payee Configuration

Create a `payees.yml` file to map transaction descriptions to specific payees:

```yaml
- name: Amazon
  patterns:
  - "AMAZON"
  - "AMAZON.*"
- name: Spotify
  patterns:
  - "SPOTIFY"
- name: Local Supermarket
  patterns:
  - ".*SUPERMARKET.*"
  - "CONAD"
  - "COOP"
```

For help with any command, run:

    ynabkit --help

You can also use:

    python -m ynabkit --help

## Development

To contribute to this tool, first checkout the code. Then create a new virtual environment:

    cd ynabkit
    python -m venv venv
    source venv/bin/activate

Now install the dependencies and test dependencies:

    pip install -e '.[test]'

To run the tests:

    pytest
