Convert¶
The most useful feature of Nomage is converting an identifier to another naming convention.
Python¶
You can convert to another naming convention with:
>>> from nomage import naming
>>> id_naming = naming("my-identifier")
>>> id_naming.to("pascal")
"MyIdentifier"
Unknown naming conventions will simply return source convention
>>> from nomage import naming
>>> id_naming = naming("my-identifier")
>>> id_naming.to("unknown")
nomage.exceptions.UnknownNamingConventionError: could not find naming convention 'unknown'
CLI¶
Convert from a terminal:
Unknown naming convention will fail with a return code not equal to 0.