Last active
June 11, 2021 22:11
-
-
Save icostan/67ad186e5a89a11fc404832620a8b48f to your computer and use it in GitHub Desktop.
Transform exported iCloud passwords into Bitwarden's CSV format.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'csv' | |
CSV.open('bitwarden.csv', 'w') do |csv| | |
csv << ['folder', 'favorite', 'type', 'name', 'notes', 'fields', 'login_uri', 'login_username', 'login_password', 'login_totp'] | |
CSV.open('~/Desktop/pm_export.csv', headers: true).each do |row| | |
data = ['', 0, 'login', row['Title'], '', '', row['Login URL'], row['Login Username'], row['Login Password'], ''] | |
csv << data | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment