Changing Categories BEFORE Importing.

magicmiles
magicmiles
Community Member

I'm coming from lastpass, using a csv file, and have read and seen you can not change categories AFTER an import. Which is kinda lame but I hear that you're working on it, and it's going to be awhile before that feature is added if at all.

In light of that I'm wondering how to modify my csv file to include your categories?

I know I need to add a field or two that you recognize but where would I find that information? I tried to dig through MrC's wonderful work but got a little hung up. He never actually mentions which field goes where.

So I figured I'd go to the source.

Thanks.

-Miles

Comments

  • MrC
    MrC
    Volunteer Moderator

    Hey @magicmiles ,

    I'm happy to help you if you'd like some assistance.

    Can you tell me what you're wanting in a little more detail? The lastpass converter supports the following import and export categories:

    supported import types:
        bankacct creditcard database driverslicense email healthinsurance identity instantmessage
        insurance login membership note passport server socialsecurity software sshkey wireless
    supported export types:
        bankacct creditcard database driverslicense email identity login membership note passport
        server socialsecurity software wireless
    

    and how each field is mapped is all driven be a large table in the converter. If you open the file Converters/Lastpass.pm, at the top of the table, there is a Category to Field mapping table named %card_field_specs. It looks like:

    my %card_field_specs = (
        bankacct =>                 { textname => 'Bank Account', fields => [
            [ 'bankName',           0, 'Bank Name' ],
            [ 'accountType',        0, 'Account Type',      { func => sub {return bankstrconv($_[0])} } ],
            [ 'routingNo',          0, 'Routing Number' ],
            [ 'accountNo',          0, 'Account Number' ],
            [ 'swift',              0, 'SWIFT Code' ],
            [ 'iban',               0, 'IBAN Number' ],
            [ 'telephonePin',       0, 'Pin' ],
            [ 'branchAddress',      0, 'Branch Address' ],
            [ 'branchPhone',        0, 'Branch Phone' ],
    

    and you see see the mappings, in this case mapping Lastpass' "bankacct" types to 1Password's 'Bank Account' category. And the fields are mapped as you see, 1Password's internal names on the left side, the LastPass labels used to match fields on the right.

    There not much call for describing all these mappings, since a) the source code is definitive, b) it is too complicated to explain all these fields, for example, which are standard 1Password internal fields and which are custom fields, and how the record splitting occurs, and which of these fields get latter special treatment, etc.). Most users are happy with the end result, and that's what really matters.

    So, what are you looking for?

  • magicmiles
    magicmiles
    Community Member

    @MrC Thanks for responding.

    Hmmm my LastPass CSV export does not contain that information. So I wanted to add the proper fields manually.

    There's only 220 entries.

    I'm not looking to use your importer...I have the exported CSV file, so I wanted to edit that manually. Thanks for the tips.

    So the field I want to map to is "%card_field_specs" ? Yes ???

    Miles.

  • MrC
    MrC
    Volunteer Moderator
    edited February 2017

    @magicmiles,

    The Lastpass export is not a pure CSV file - it encodes a bunch of fields for various categories within the Notes column of the CSV proper. And the form fill profile export is also different. It appears LastPass used to have a very simplistic notion of password management (like logins, passwords, and notes), but later extended its capabilities, but retrained its existing CSV export format (and encoded the other fields into Notes).

    You may not have all of those categories - the table above was just a small portion of the entire table.

    I'm confused, you say you're not looking to use the converter, but then you ask me about mapping in the table?

    Maybe you are misunderstanding the converter - it converts your already exported CSV file into 1Password consumable 1PIF file, doing all of the category and field mapping for you.

    I can't possibly spend the time explaining the entire Lastpass export format beyond listing the basic 7 columns:

    url, username, password, extra, name, grouping, fav
    

    The "extra" column is what contains the encoded extended categories. If you want to see what those are, look at the table in the converter and you can see all of the field values.

  • magicmiles
    magicmiles
    Community Member

    Perhaps I confused you sir. I was looking at the converter to see what field I needed to map to, so that I can export my csv file, then clean it up with right fields. Either adding them or something else. I can do it manually.

    url, username, password, extra, name, grouping, fav

    If %extra is what I need to map to...that's fine.

    I just need to know which field does which. If it's %extra or %card_field_specs, I could care less.

    Which field will 1Password recognize mapping to it's categories ?

    Because 'grouping', and 'fav' aren't it, so I'm hoping that 'extra' is.

    If I have to add another field that it will recognize that's fine.

    Just tell me what the name of the field that it will recognize is, that's all.

  • MrC
    MrC
    Volunteer Moderator
    edited February 2017

    @magicmiles

    Perhaps this guide is what you want for the 1Password import via CSV

    https://support.1password.com/create-csv-files/

  • MrC
    MrC
    Volunteer Moderator

    @magicmiles,

    Have you made any progress on this?

This discussion has been closed.