A KeePass/KeePassXC to Nextcloud Passwords converter.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Raoul Snyman ccdd68f3cd
Add some error checking and a new overwrite option
1 year ago
.gitignore Initial commit 1 year ago
LICENSE Initial commit 1 year ago
README.rst Add some error checking and a new overwrite option 1 year ago
keepass2passwords.py Add some error checking and a new overwrite option 1 year ago
setup.cfg Add script 1 year ago

README.rst

keepass2passwords

An improved version of Martin Monperrus' KeePass to Nextcloud Passwords converter.

This script can convert databases from KeePass, KeePassX, KeePassXC and any other password manager that uses a KeePass database into the JSON backup format that Nextcloud Passwords uses. The file can then be imported in Nextcloud Passwords:

Settings >> Backup and Restore >> Restore or import >> Choose Format "Database backup"

Prerequisites

Python 3 PyKeepass

Installation

Clone this repository:

$ git clone https://git.snyman.info/raoul/keepass2passwords.git

Create and update a virtual environment:

$ virtualenv .venv
$ .venv/bin/pip install -U pip setuptools wheel

Install the dependencies:

$ .venv/bin/pip install PyKeepass

Usage

$ .venv/bin/python keepass2passwords.py --help
usage: keepass2passwords.py [-h] [-p PASSWORD] [-k KEYFILE] [-o OUTPUT] [--overwrite] database

positional arguments:
  database              KeePass Database

optional arguments:
  -h, --help            show this help message and exit
  -p PASSWORD, --password PASSWORD
                        The password for the KeePass database
  -k KEYFILE, --keyfile KEYFILE
                        The keyfile for the KeePass database
  -o OUTPUT, --output OUTPUT
                        The name and location of the Passwords file
  --overwrite           Overwrite the Passwords file if it already exists