On Nov 30, 2007, at 9:45 AM, Robert Snyder wrote:
Has anyone done this before? What is the best way to do it? Password
Retriever can export records as delimited data files, but when I try
to import it into Yojimbo, I run into field mapping issues. Before I
start migrating seven years of passwords, serial numbers, etc, from
Password Retriever to Yojimbo, I wanted to check and see if anyone
had any suggestions for making this a less painful task.
Jim DeVona posted the following script earlier this year. Worked for me.
-- Example script to import passwords or serial numbers from tab
delimited files into Yojimbo
-- Jim DeVona 8 March 2007
set _type to button returned of (display alert "Select what kind of
data to import to Yojimbo:" buttons {"Cancel", "Serial Numbers",
"Passwords"} cancel button 1)
if _type is "Cancel" or _type is "" then
return
end if
-- read the file
set _file to choose file with prompt "Select a tab delimited file
containing " & _type
open for access _file
set _data to read _file using delimiter {(ASCII character 13), (ASCII
character 10)}
close access _file
-- import each line as a tab delimited record
-- per http://www.blankreb.com/studiosnips.php?ID=17
set _delim to AppleScript's text item delimiters
set AppleScript's text item delimiters to tab -- or {","}
repeat with _index from 1 to count of _data
try
set _line to the text items of item _index of _data
if _type is "Passwords" then
-- items are name, location, account, and password
MakePassword(item 1 of _line, item 2 of _line, item 3 of _line,
item 4 of _line)
else if _type is "Serial Numbers" then
-- items are product, owner, serial number, and comments
MakeSerial(item 1 of _line, item 2 of _line, item 3 of _line, item
4 of _line)
end if
end try
end repeat
set AppleScript's text item delimiters to _delim
on MakePassword(_name, _location, _account, _password)
tell application "Yojimbo"
set _new to make new password item with properties {name:_name,
location:_location, account:_account, password:_password}
end tell
end MakePassword
on MakeSerial(_product, _owner, _number, _comments)
tell application "Yojimbo"
set _new to make new serial number item with properties
{name:_product, owner name:_owner, serial number:_number,
comments:_comments}
end tell
end MakeSerial
--
------------------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <[email protected]>.
To unsubscribe, send mail to: <[EMAIL PROTECTED]>
List archives: <http://www.listsearch.com/yojimbotalk.lasso>
Have a feature request, or not sure if the software's working
correctly? Please send mail to: <[EMAIL PROTECTED]>