Question #223404 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/223404
Status: Open => Answered
RaiMan proposed the following answer:
these are the basics you need:
name = "John Doe" # read from file
(first, last) = name.split(" ")
first = first.strip() # get rid of whitespace
last = last.strip()
userids = [] # the possible variants
userids.append(first+last) # full
userids.append(first[0]+last) # first-short + last
userid = "jdoe02" # read from file
newuid = None
for uid in userids:
if userid.startswith(uid.lower()):
newuid = uid + userid[len(uid):]
if newid: print "converted", userid, newuid
else: print "could not convert", userid
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.
_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp