Skip to main content

Module convert

Module convert 

Source
Expand description

Maps downloaded 1Password vaults onto the importer’s ParsedImport.

Vaults become folders and every item keeps its title and note. Login and the categories built around a credential land on a login; Credit Card, Identity and SSH Key on their own types. Everything else becomes a secure note. Whatever a mapping does not claim survives as a custom field, with dates, month/year values and addresses rendered as text.

This module drives the walk and picks each item’s mapping; login, credential, card, identity and ssh_key hold the mappings, field the leftover pass that keeps whatever they did not claim, and claimed the bookkeeping that joins the two.

Modules§

card 🔒
The Credit Card category.
claimed 🔒
How an item’s fields are addressed: walking them, reading one by name, and recording which a category mapping already took.
credential 🔒
The categories built around a credential, all of which land on a login. Each keeps the same three slots under ids of its own, and everything else rides along as a custom field.
field 🔒
The leftover pass: every field a category mapping did not claim becomes a custom field, so no part of an item is lost.
identity 🔒
The Identity category.
login 🔒
The Login category, and the pieces every category that lands on a login shares.
ssh_key 🔒
The SSH Key category.
value 🔒
Renders a 1Password field value as the text of one Bitwarden custom field.

Constants§

DOCUMENT_NOTE 🔒
Added to a Document item’s note. The item is the file, and an import moves vault data rather than files, so the note is all that is left to say so.
TAGS_FIELD 🔒
Names the custom field that keeps an item’s tags. Bitwarden has nothing else to put them in.
UNNAMED_VAULT 🔒
Stands in for a vault name 1Password left empty, matching the KDBX importer’s group naming.
UNTITLED_ITEM 🔒
Stands in for a title 1Password left empty, matching the KDBX importer.

Functions§

cipher_type 🔒
Picks the Bitwarden cipher type for an item’s 1Password category, and reports which of the item’s fields it read. A category without a mapping becomes a secure note, which loses nothing because every field then becomes a custom field.
convert
Converts every downloaded vault into ciphers, one folder per vault.
convert_item 🔒
notes 🔒
The item’s note, with a line added when the item was a document whose file could not come along.
secure_note 🔒
tags_field 🔒
Keeps an item’s tags in a custom field. They are multi-valued and Bitwarden has no equivalent, so they arrive as one comma-separated field rather than being dropped.
typed 🔒
Wraps what a mapping read in the cipher type it belongs to.