Skip to content

Instantly share code, notes, and snippets.

@apmckinlay
Last active December 10, 2015 15:41
Show Gist options
  • Save apmckinlay/4455675 to your computer and use it in GitHub Desktop.
Save apmckinlay/4455675 to your computer and use it in GitHub Desktop.
getLibsNames(libs)
{
list = Object()
for (i = 0; i < libs.Size(); ++i)
{
lib = libs[i]
li = i.Pad(2)
for x in QueryList(lib $ " where group = -1", "name")
{
list.Add(x.Tr("_").Lower() $ "=" $ x $ ":" $ li)
caps = x.Replace("([A-Z])[A-Z]+", "\1").Tr("_a-z0-9?!")
if caps.Size() > 1
list.Add(caps.Lower() $ "=" $ x $ ":" $ li)
}
}
return list.Sort!()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment