Metadata-Version: 2.1
Name: password_converter
Version: 0.2.5
Summary: Convert Kaspersky password manager exports to Apple Password format
Author-email: Daniel Lozano Gómez <daniellg7@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Daniel Lozano
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/Mr-Physicist/kaspersky_to_apple_parser
Project-URL: Documentation, https://github.com/Mr-Physicist/kaspersky_to_apple_parser#readme
Project-URL: Repository, https://github.com/Mr-Physicist/kaspersky_to_apple_parser.git
Project-URL: Issues, https://github.com/Mr-Physicist/kaspersky_to_apple_parser/issues
Keywords: password,converter,apple,security,kaspersky
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typing-extensions>=4.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: black>=22.0; extra == "dev"
Requires-Dist: isort>=5.0; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Requires-Dist: flake8>=5.0; extra == "dev"

# Password Converter

**Password Converter** is a Python tool designed to convert exported password files from Kaspersky Password Manager into a format compatible with Apple Passwords. This utility simplifies the migration process for users switching between password management systems.

---

## Features

- Converts Kaspersky Password Manager exports into Apple Password format.
- Validates password entries to ensure data integrity.
- Logs invalid entries with helpful error messages for troubleshooting.
- Outputs the converted data as a CSV file for easy import into Apple Passwords.
- Command-line interface (CLI) for simple usage.

---

## Installation

### Requirements
- Python 3.10 or higher.

### Install via pip
```bash
pip install password-converter
```

## Usage

### Command Line

The input.txt file is the file that is generated automatically with the Kaspersky password manager, and the output.csv is the file that is going to be generated with your passwords. You can import this .csv file directly into the Passwords app.

```bash
password-converter input.txt output.csv
password-converter input.txt output.csv --log-level DEBUG --log-file convert.log
```

### Python API

```python
from password_converter import convert_file, convert_text

# Convert a file
convert_file("input.txt", "output.csv")

# Convert text directly
text = """
Website name: example.com
Website URL: https://example.com
Login: user@example.com
Password: secretpass
Comment: My account
---
"""
entries = convert_text(text)
```

## Input Format

The input file should contain password entries separated by "---". Each entry should have the following format:

For websites:
```
Website name: Example Website
Website URL: https://example.com
Login: user@example.com
Password: secretpassword123
Comment: My favorite website
```

For applications:
```
Application: Example App
Login: user@example.com
Password: anotherpassword456
Comment:
```

## Output Format

Title,URL,Username,Password,Notes,OTPAuth
Example Website (user@example.com),https://example.com,user@example.com,secretpassword123,My favorite website,
Example App (user@example.com),,user@example.com,anotherpassword456,,

## Development

1. Clone the repository
2. Install development dependencies:
```bash
pip install -e ".[dev]"
```
3. Run tests:
```bash
pytest
```

## Contributing

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

## License

This project is licensed under the MIT License - see the LICENSE file for details.
