Converting 1Password 1PUX file to csv with mrc-converter-suite

baumaeschi
baumaeschi
Community Member

Hi,
I'm using 1Password for Windows 8.6.0 80600076, im Kanal „PRODUCTION“ on a German Windows 10. After having defined about 50 Objects (Logins, Credit cards, WLAN Routers, Identities..) I've exported all these objects to a 1PUX file, renamed 1PUX to ZIP, unzipped, renamed export .data to data.1pif, and then tried to convert data.1pif to a csv file with the mrc-converter-suite (2021-12-22).

Probably I've not completely understood the command syntax, especially there is no "input file", only an "export file" defined. I hope sombody here can help me to find the correct command syntax. Here is the output in the windows command window:

C:\Users\aesch\Desktop\mrc-converter-suite>perl convert.pl onepif --format csv --debug data.1pif
main : Runninng script from 'C:/Users/aesch/Desktop/mrc-converter-suite'
main : Command Line: onepif --format csv --debug data.1pif
main : Output file: C:\Users\aesch\Desktop\1P_import.1pif
print_fileinfo : Input file info: "data.1pif"
print_fileinfo : size: 192526
Uncaught exception from user code:
, or } expected while parsing object/hash, at character offset 0 (before "{") at C:/Users/aesch/Desktop/mrc-converter-suite/./Utils/PIF.pm line 1014.
JSON::PP::decode_error(", or } expected while parsing object/hash") called at C:/Users/aesch/Desktop/mrc-converter-suite/lib/JSON/PP.pm line 1004
JSON::PP::object() called at C:/Users/aesch/Desktop/mrc-converter-suite/lib/JSON/PP.pm line 724
JSON::PP::value() called at C:/Users/aesch/Desktop/mrc-converter-suite/lib/JSON/PP.pm line 688
JSON::PP::PP_decode_json(JSON::PP=HASH(0x3ecc8b8), "{", 0) called at C:/Users/aesch/Desktop/mrc-converter-suite/lib/JSON/PP.pm line 148
JSON::PP::decode(JSON::PP=HASH(0x3ecc8b8), "{") called at C:/Users/aesch/Desktop/mrc-converter-suite/lib/JSON/PP.pm line 110
JSON::PP::decode_json("{") called at C:/Users/aesch/Desktop/mrc-converter-suite/./Utils/PIF.pm line 1014
Utils::PIF::get_items_from_1pif("data.1pif") called at C:/Users/aesch/Desktop/mrc-converter-suite/./Converters/Onepif.pm line 137
Converters::Onepif::do_import("data.1pif", undef) called at convert.pl line 183


1Password Version: 8.6.0
Extension Version: Not Provided
OS Version: Not Provided

Comments

  • baumaeschi
    baumaeschi
    Community Member

    Hi,
    I'm using 1Password for Windows 8.6.0 80600076, im Kanal „PRODUCTION“ on a German Windows 10. After having defined about 50 Objects (Logins, Credit cards, WLAN Routers, Identities..) I've exported all these objects to a 1PUX file, renamed 1PUX to ZIP, unzipped, renamed export .data to data.1pif, and then tried to convert data.1pif to a csv file with the mrc-converter-suite (2021-12-22).

    Probably I've not completely understood the command syntax, especially there is no "input file", only an "export file" defined. I hope sombody here can help me to find the correct command syntax. Here is the output in the windows command window:

    C:\Users\aesch\Desktop\mrc-converter-suite>perl convert.pl onepif --format csv --debug data.1pif
    main                : Runninng script from 'C:/Users/aesch/Desktop/mrc-converter-suite'
    main                : Command Line: onepif --format csv --debug data.1pif
    main                : Output file: C:\Users\aesch\Desktop\1P_import.1pif
    print_fileinfo      : Input file info: "data.1pif"
    print_fileinfo      :   size: 192526
    Uncaught exception from user code:
            , or } expected while parsing object/hash, at character offset 0 (before "{") at C:/Users/aesch/Desktop/mrc-converter-suite/./Utils/PIF.pm line 1014.
            JSON::PP::decode_error(", or } expected while parsing object/hash") called at C:/Users/aesch/Desktop/mrc-converter-suite/lib/JSON/PP.pm line 1004
            JSON::PP::object() called at C:/Users/aesch/Desktop/mrc-converter-suite/lib/JSON/PP.pm line 724
            JSON::PP::value() called at C:/Users/aesch/Desktop/mrc-converter-suite/lib/JSON/PP.pm line 688
            JSON::PP::PP_decode_json(JSON::PP=HASH(0x3ecc8b8), "{", 0) called at C:/Users/aesch/Desktop/mrc-converter-suite/lib/JSON/PP.pm line 148
            JSON::PP::decode(JSON::PP=HASH(0x3ecc8b8), "{") called at C:/Users/aesch/Desktop/mrc-converter-suite/lib/JSON/PP.pm line 110
            JSON::PP::decode_json("{") called at C:/Users/aesch/Desktop/mrc-converter-suite/./Utils/PIF.pm line 1014
            Utils::PIF::get_items_from_1pif("data.1pif") called at C:/Users/aesch/Desktop/mrc-converter-suite/./Converters/Onepif.pm line 137
            Converters::Onepif::do_import("data.1pif", undef) called at convert.pl line 183
    

    1Password Version: Not Provided
    Extension Version: Not Provided
    OS Version: Not Provided

  • baumaeschi
    baumaeschi
    Community Member

    Sorry, this question was erroneously placed in the mac section. Have made a second post in the windows section.
    On my Mac, using 1Password7, I was able to covert the contents of vaults to csv files with mrc-converter-suite.
    The advantage of 1Password 8.6 on Windows is that you can export ALL Objets of ALL vaults in one go. But, probably, the 1PUX format (which is actually a ZIP file) is not compatible with the 1PIF Format of earlier 1 Password versions?

  • MrC
    MrC
    Volunteer Moderator
    edited March 2022

    @baumaeschi

    I'll have to take a look at that.

    If you can make me a small reproducible case, with no sensitive data, that would expedite the proocess.

    I've merged the comments here in the Windows forum.

  • MrC
    MrC
    Volunteer Moderator
    edited March 2022

    @baumaeschi

    I've taken a closer look at the 1PUX's data file. It is a different format than 1PIF. It includes new sections, Accounts, and within Accounts, Vaults.

    What is your goal for the resulting CSV?

  • baumaeschi
    baumaeschi
    Community Member

    My goal would be a CSV backup of all my objects in 1Password (1Password native CSV backup does only export Login objects)

    I was able to test your converter on a Mac, converting the contents of different vaults (exported as 1PIF) to CSV. And a was very amazed about the quality of the CSV, including almost all fields of the 1Password objects.

    So - if you could do something similar with the new 1PUX format that would be great. But I understand that this is a lot of work and can't be done in some hours. And thanks a lot for all the fantastic converters you have programmed up to now and for this purpose

  • MrC
    MrC
    Volunteer Moderator

    @baumaeschi

    Thanks for you kind words, they are much appreciated.

    To be clear, a 1PUX converted to CSV won't be anything close to a "backup" - it would be quit lossy. Each account, its vault, and all the items within a vault, contain a fair amount of metadata that would be meaningless to a user, and so wouldn't be meaningful to dump such values. For example, here are two fields from an Identity record:

    Only the items highlighted in yellow are useful to humans. All the other stuff is meaningful only to 1Password during a 1PUX import. Any re-import back into 1Password via such a converted CSV would be arduous and by definition, lossy as well.

    I've intentionally and purposefully avoided creating a general export tool, as my goal with the converter suite has always been to help users enter the 1Password ecosystem, not exit it.

    The onepif "converter" was designed as a way to produce a variety of formatted data from a 1PIF source file, primarily for printing purposes. The csv formatter was essentially more a proof of concept and a working demonstration that the framework was functioning as intended. Even at that, I feel like I've strayed beyond my goal.

    So I'm going to leave this as a call for input from the 1Password folks - if they have no issue with the creation of a 1PUX to CSV converter, included in the converter suite, then I'll see what I can do.

  • baumaeschi
    baumaeschi
    Community Member

    @Mrc

    The csv formatter was essentially more a proof of concept and a working demonstration that the framework was functioning as intended. Even at that, I feel like I've strayed beyond my goal.

    The only thing I can say to your statement above: Your "poof of concept" is working very well and is exactly what is needed for a backup copy of 1Password objects. The quality is better than the CSV export function of 1Password 8.6 on windows (e.g. they cannot handle ä,ö,ü, etc. in passwords). So, if I were at 1Password software development I would let YOU implement the CSV export function.

This discussion has been closed.