MrC's Convert to 1Password Utility (mrc-converter-suite)

Options
1212224262752

Comments

  • MrC
    MrC
    Volunteer Moderator
    Options

    @ionblue ,

    Please use the 1.09 version of the converter in Testing Bits, mentioned in the first post of the converter suite.

  • ionblue
    ionblue
    Community Member
    Options

    @MrC

    That's what I'm using. Now what?

  • MrC
    MrC
    Volunteer Moderator
    edited December 2016
    Options

    @ionblue,

    Use the command line:

    perl  convert_to_1p4.pl  keychain ~/logins.csv -v
    

    not the one you were using above.

  • ionblue
    ionblue
    Community Member
    Options

    @MrC

    Ok, that got me something, but I'm not sure if it's complete. I got this error and then what looks like a whole bunch of entries separated by commas:

    Keychain parse failed, after entry 0; unexpected:

    Ideas?

  • MrC
    MrC
    Volunteer Moderator
    Options

    @ionblue,

    I'm not clear on from where these items came. You're using the keychain converter, but are importing a csv suffixed file, and the odd entries are also implying you are importing a CSV file. But the Keychain export is not a CSV file. How did you get or make this file? The README.pdf explains how to export OS X or iCloud Keychain items (in the OS X Keychain specific export instructions).

  • ionblue
    ionblue
    Community Member
    Options

    @MrC

    Hmm... well, I used a tool that was linked to here, possibly in another thread, but it was something you recommended to get everything out of Keychain. There was the security command line bit, and then a ruby script after that. Maybe I completely misread things as I was hunting and looking at several things?

  • MrC
    MrC
    Volunteer Moderator
    Options

    @ionblue,

    It was not my recommendation for that old, broken script. Someone wrote it a while ago, and it was problematic, and I think I commented on that brokenness.

    Just follow the directions in the README.pdf, especially the keychain export instructions, for the 1.09 version of the converter suite.

  • ionblue
    ionblue
    Community Member
    Options

    @MrC

    My bad. I did read it, but obviously not good enough. I'll give it another go.

  • ionblue
    ionblue
    Community Member
    Options

    @MrC

    Thank you! I got it now. No idea why I went the direction I did in the first place! :)

  • MrC
    MrC
    Volunteer Moderator
    Options

    @ionblue,

    No worries, that's great to hear you got your data converted. Enjoy 1Password!

  • rskipw
    rskipw
    Community Member
    Options

    hello Mr C - have 1password 6.5.2. OS X 10.12.1 tried to use the csv converter with a .csv and got a error who's general message is "Can't open perl script "convert_to_1p4.pl": No such file or directory". Any thoughts? do I need to attack this some other way?

  • MrC
    MrC
    Volunteer Moderator
    edited December 2016
    Options

    Hi @rskipw ,

    Don't use the AppleScript Converter Utility for now - I have to rework it to support Sierra better. There's a problem when users leave the extracted folder in the Downloads area instead of placing it on the Desktop.

    Place the convert_to_1p4 folder onto your Desktop. And then use the command line, which will look something like the following two commands:

    cd ~/Desktop/convert_to_1p4
    perl  convert_to_1p4.pl  csv  ~/name_of_your_csv_file.csv  -v
    
  • rskipw
    rskipw
    Community Member
    Options

    Ok - so, not quite a code guy! this is what I tried and what the response was:

    Richard-Skipworths-iMac:convert_to_1p4 Skipworth$ cd ~/Desktop/convert_to_1p4
    [1]+ Exit 1 perl convert_to_1p4.pl csv ~/name_of_your_csv_file.csv -v161206 User Names
    Richard-Skipworths-iMac:convert_to_1p4 Skipworth$ perl  convert_to_1p4.pl  csv  ~/161206 User Names & Passwords.csv  -v
    [1] 10805
    -bash: perl : command not found
    -bash: Passwords.csv : command not found
    [1]+ Exit 127 perl  convert_to_1p4.pl  csv  ~/161206 User Names
    Richard-Skipworths-iMac:convert_to_1p4 Skipworth$

  • MrC
    MrC
    Volunteer Moderator
    Options

    @rskipw ,

    There's a bunch of stuff not right there. The first CD command is failing, which says the convert_to_1p4 folder is not on your Desktop. But there's more...

    Would you like some remote help? If so, send me an email and we'll take it from there. My email is at the top of the convert_to_1p4.pl script.

  • rskipw
    rskipw
    Community Member
    Options

    Well ALL RIGHT!! THANKS for the remote help! All is working well and I am a happy camper!!

  • AGAlumB
    AGAlumB
    1Password Alumni
    Options

    @rskipw: I'm glad to hear that MrC was able to help you convert your data. If you have any questions about 1Password itself, be sure to start a new discussion. We're here for you! :)

  • DigitalMan
    DigitalMan
    Community Member
    Options

    I'm looking for the easiest way to print my 1Password list out and discovered your scripts. Thanks much for creating these. I am using 1Password v6.1.308d on Windows 7. If there is an easier way to do something that should be built into 1Password, please let me know.

    Is Strawberry Perl required or should any version of perl work? I already have ActiveState ActivePerl 5.20.1 Build 2000 (64-bit) installed so I was wondering if I could use it. Not sure how it would work installing two versions of perl on one system. If Strawberry is required, I may try installing it on another system that doesn't already have ActivePerl installed.

    This version of 1Password only allows me to export to text or CSV, not 1PIF. Do I understand correctly that I export to CSV and then use the CSV converter? What commands exactly would I use?

    I tried using ActivePerl and ran into a few problems. Can you let me know if switching to Strawberry should resolve these or if I have something else wrong?

    These commands seem to complete successfully for me:
    3c. Enter the command cpan Text::CSV and hit Enter.
    3d. Enter the command cpan Date::Calc and hit Enter.
    3e. Enter the command cpan XML::XPath and hit Enter

    However, when I tried to view the script help I got an error:

    C:\Users\gkendall\Desktop\convert_to_1p4>perl convert_to_1p4.pl onepif2html --help
    Error: failed to load converter module 'onepif2html'
    Can't locate XML/LibXSLT.pm in @INC (you may need to install the XML::LibXSLT module) (@INC contains: C:/Perl64/site/lib
    C:/Perl64/lib .) at Converters/Onepif2html.pm line 26.
    BEGIN failed--compilation aborted at Converters/Onepif2html.pm line 26.
    Compilation failed in require at convert_to_1p4.pl line 38.

    Usage: convert_to_1p4.pl

    Select a converter:
    clipperz csv dataguardian datavault essentialpim ewallet fsecurekey handysafe ironkeyim
    keepass2 keepassx keeper keychain lastpass licensekeeper msecure nortonis onepif2html
    passpack passwordagent passworddepot passwordsplus passwordwallet roboform safeincloud
    safewallet spbwallet splashid txt2notes vcard

    Select one of the converters above and add it to the command line to see more
    complete options. Example:

        perl convert_to_1p4.pl ewallet --help
    

    So I tried to figure out how to install XML::LibXSLT by trying:

    C:\Users\gkendall\Desktop\convert_to_1p4>cpan XML::LibXSLT

    But that didn't seem to work, so now I'm not sure what to do next. It says I have exceeded the number of lines in this post, so I'll see if it will let me post the cpan XML::LibXSLT error log in my next post.

    Should I switch to Strawberry Perl or do I have something else wrong?

    Thanks,
    Guy

  • DigitalMan
    DigitalMan
    Community Member
    Options

    The error with cpan XML::LibXSLT is still way too long to post here, so I'll wait until you respond to my first post and we'll go from there.

    Thanks,
    Guy

  • MrC
    MrC
    Volunteer Moderator
    edited December 2016
    Options

    Hi @DigitalMan ,

    I haven't used ActivePerl for the converter in a while now, but as long as the modules can be installed, it should work fine.

    You need to use the PPM module installer. To install, for example, Text::CSV, you'd do

    ppm install Text-CSV
    

    You can also use the PPM GUI. Just type ppm in the command window, and select the modules to install.

    Do likewise for the others. See how that works for you.

  • DigitalMan
    DigitalMan
    Community Member
    Options

    Thanks, I tried the following:

    C:\Users\gkendall\Desktop\convert_to_1p4>ppm install Text-CSV
    No missing packages to install

    C:\Users\gkendall\Desktop\convert_to_1p4>ppm install Date-Calc
    No missing packages to install

    C:\Users\gkendall\Desktop\convert_to_1p4>ppm install XML-XPath
    No missing packages to install

    However, I still get the same error:

    C:\Users\gkendall\Desktop\convert_to_1p4>perl convert_to_1p4.pl onepif2html --help
    Error: failed to load converter module 'onepif2html'
    Can't locate XML/LibXSLT.pm in @INC (you may need to install the XML::LibXSLT module) (@INC contains: C:/Perl64/site/lib
    C:/Perl64/lib .) at Converters/Onepif2html.pm line 26.
    BEGIN failed--compilation aborted at Converters/Onepif2html.pm line 26.
    Compilation failed in require at convert_to_1p4.pl line 38.

    Usage: convert_to_1p4.pl

    Select a converter:
    clipperz csv dataguardian datavault essentialpim ewallet fsecurekey handysafe ironkeyim
    keepass2 keepassx keeper keychain lastpass licensekeeper msecure nortonis onepif2html
    passpack passwordagent passworddepot passwordsplus passwordwallet roboform safeincloud
    safewallet spbwallet splashid txt2notes vcard

    Select one of the converters above and add it to the command line to see more
    complete options. Example:

        perl convert_to_1p4.pl ewallet --help
    

    So I tried this, but it doesn't look like it can find this one, guess that's the problem:

    C:\Users\gkendall\Desktop\convert_to_1p4>ppm install XML-LibXSLT
    Syncing perl PPM database with .packlists...done
    ppm install failed: Can't find any package that provides XML-LibXSLT

  • MrC
    MrC
    Volunteer Moderator
    Options

    @DigitalMan,

    Modules are named differently in ActivePerl. Instead of XML::LibXSLT, try this:

    ppm install XML-XSLT 
    
  • DigitalMan
    DigitalMan
    Community Member
    Options

    OK, I tried that:

    C:\Users\gkendall\Desktop\convert_to_1p4>ppm install XML-XSLT
    Downloading XML-XSLT-0.48...done
    Downloading XML-DOM-1.45...done
    Downloading libxml-perl-0.08...done
    Downloading XML-RegExp-0.04...done
    Unpacking XML-XSLT-0.48...done
    Unpacking XML-DOM-1.45...done
    Unpacking libxml-perl-0.08...done
    Unpacking XML-RegExp-0.04...done
    Generating HTML for XML-XSLT-0.48...done
    Generating HTML for XML-DOM-1.45...done
    Generating HTML for libxml-perl-0.08...done
    Generating HTML for XML-RegExp-0.04...done
    Updating files in site area...done
    92 files installed

    So that seems to have worked. However, it looks like it's confused at the names of the libraries:

    C:\Users\gkendall\Desktop\convert_to_1p4>perl convert_to_1p4.pl onepif2html --help
    Error: failed to load converter module 'onepif2html'
    Can't locate XML/LibXSLT.pm in @INC (you may need to install the XML::LibXSLT module) (@INC contains: C:/Perl64/site/lib
    C:/Perl64/lib .) at Converters/Onepif2html.pm line 26.
    BEGIN failed--compilation aborted at Converters/Onepif2html.pm line 26.
    Compilation failed in require at convert_to_1p4.pl line 38.

    Usage: convert_to_1p4.pl

    Select a converter:
    clipperz csv dataguardian datavault essentialpim ewallet fsecurekey handysafe ironkeyim
    keepass2 keepassx keeper keychain lastpass licensekeeper msecure nortonis onepif2html
    passpack passwordagent passworddepot passwordsplus passwordwallet roboform safeincloud
    safewallet spbwallet splashid txt2notes vcard

    Select one of the converters above and add it to the command line to see more
    complete options. Example:

        perl convert_to_1p4.pl ewallet --help
    

    So at this point I think it's obvious my problems are due to trying to use ActivePerl. So I installed Strawberry Perl on another system and it works just fine. I was able to export to CSV, convert CSV to 1PIF and then convert 1PIF to HTML.

    Looking at the HTML file, my login entries have the title, password, tags which I want printed, but it also has notes and created, is there a way to exclude these? The notes field has really long URLs, and fields such as aiinfo:, autosubmit:, uuid:, etc. In some cases my password is buried in these notes along with this extra junk, other times it's listed separately.

    I'm looking to create a really basic printout with just title, password and the plain notes text. I'm trying to create a printout a non-technical person can understand. I understand how insecure this is, but need this capability to sell switching to 1Password to non-technical family members.

    Thanks a lot for your help.

  • MrC
    MrC
    Volunteer Moderator
    edited December 2016
    Options

    @DigitalMan,

    I gave up on ActivePerl, since they've made many things much too difficult, and their support is awful. Anyway...

    Do you know CSS or XSLT? We can customize the output to your needs. You can see also there is a onepif2html2 in the 1.09 version (which you should be using anyway - in Testing Bits mentioned in the converter suite thread). It is a customized version that includes multi-line notes fields. If you can give/show me a layout you'd like, I'll see what I can do.

  • DigitalMan
    DigitalMan
    Community Member
    Options

    No, I don't know CSS or XSLT. I'm a C programmer and only use Perl/Python scripts that others in my company have written. Haven't done any XML/html, etc. either.

    Don't get me wrong, what you have is great, it's mainly all the extra stuff in the notes section that is confusing. There is a bunch of other stuff beyond the actual text that 1Password shows in the "notes" section of a login in the html output. I would suggest a basic option that would include title, username and password on one line, sorted alphabetically by title. Then the text shown in the 1Password notes (not the extra stuff) on the next line. So really the only change would be to reduce what is printed for notes and eliminate "created". Some people may still want the more verbose output, so you might want to make it an option.

    The next Category I have most are Passwords, so when you add it maybe have a similar basic output, minus the username which doesn't appear to be present.

    Being able to print was the last thing I needed to be able to switch over to 1Password. Everything else does exactly what I need.

    Thanks!

  • MrC
    MrC
    Volunteer Moderator
    edited December 2016
    Options

    Hi @DigitalMan ,

    I'll take a crack at what I think you want, and produce a sample (or modified converter) for you to comment on. I'll look at it this weekend.

    They way I work, building these converters, is to base features on user requests or my desires/needs; that way, I get pretty fast feedback as to what works, and focus effort in areas most desired. There aren't too many folks that I'm aware of printing out their data via the onepif2html converter, so I haven't spent much time adding features to it. At some point, too many command line features becomes overwhelming to novice command line users, so I have to be careful.

  • zeagz
    zeagz
    Community Member
    Options

    Dear MRC hi

    Sorry to disturb
    I am trying to convert my ewallet file to 1password but i get an error message:

    Can’t make «class ctnr» of alias "7F84DF2C-E477-411A-AFB9-B7A246F2CA64:d:AppleScript_Conversion_Helper.app:" into type alias. (-1700)

    Can you help please?

    Many thanks
    Zaf

  • MrC
    MrC
    Volunteer Moderator
    edited December 2016
    Options

    @zeagz ,

    I'm really sorry about this. It appears that for some users, for some reason on OS X Sierra, the AppleScript is not working, and I haven't had the time to work out the issues.

    For now, use the 1.09 version in Testing Bits, mentioned in the converter suite and use the command line. It will look something like:

    cd ~/Desktop/convert_to_1p4
    perl convert_to_1p4.pl ewallet ~/Desktop/name_of_your_ewallet_export_file.txt -v

    where name_of_your_ewallet_export_file.txt is the name you used to save your exported file (assuming it's on your Desktop). Please see the README.pdf file for full step-by-step directions.

  • zeagz
    zeagz
    Community Member
    Options

    Wow
    Many many thanks

  • MrC
    MrC
    Volunteer Moderator
    edited December 2016
    Options

    @zeagz,

    You're welcome.

    I've updated the 1.09 version of the converter suite. It should allow the AppleScript to run, but does require you to place the convert_to_1p4 folder on your Desktop with exactly that name. If you want to try it out, I'd appreciate any feedback.

  • MrC
    MrC
    Volunteer Moderator
    edited December 2016
    Options

    @DigitalMan ,

    I've started dabbling in what I think you're asking for; that is, essentially a spreadsheet like layout for Title, Username, Password, and I presume URL, and on a next line, the Notes. So this will require a tabular output, since we can't use any character as a field separator, since you cannot distinguish a comma or space in a field's value from a space or comma separating the fields. So it would require a tabular output with 4 cells in one line, and 1 cell in the next (for Notes). But this too becomes confusing, since some entries won't have Notes, so the strict line alternation is broken. With sufficient Notes data, the output can become difficult to distinguish (without borders or boxes around the full Item's contents as a unit.

    Finally, how do you want multi-line notes data to be presented? Collapsed like it is now in the onepif2html converter, using a special Return marker of ⏎ ? Or do you want the Notes to be multi-line like the onepif2html2 converter?

    If you want strict tabular output, you can now export your Login items as CSV, and remove any columns you don't want, order them the way you want, and print. This won't provide Notes on the second line, however.

    I really could use your guidance via a sample or mockup, since coding this takes time, and re-coding due to insufficient requirements is a waste of time (as a C coder, you and I both know this).

This discussion has been closed.