-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
45 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools", | ||
"wheel" | ||
"wheel", | ||
] | ||
build-backend = "setuptools.build_meta" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,5 @@ | |
""" | ||
|
||
__version__ = "0.4.0" | ||
__version__ = "0.4.5" | ||
__author__ = 'Justin Huddleston' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ | |
""" | ||
|
||
__version__ = "0.4.0" | ||
__version__ = "0.4.5" | ||
__author__ = 'Justin Huddleston' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ | |
""" | ||
|
||
__version__ = "0.4.0" | ||
__version__ = "0.4.5" | ||
__author__ = 'Justin Huddleston' |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import nameCreator | ||
import click | ||
|
||
|
||
@click.group() | ||
def nameCreatorCLI(): | ||
"""A CLI for the nameCreator python package.""" | ||
|
||
|
||
@click.option('-g', | ||
'--gender', | ||
help='Gender of the generated name(s) (M)ale or (F)emale.') | ||
@click.option('-l', | ||
'--language', | ||
help='Language/Nationality of the generated name(s).') | ||
@click.option('-a', '--amount', help='How many names are generated.') | ||
@nameCreatorCLI.command() | ||
def generate(gender: str, language: str, amount=str): | ||
"""Generates names.""" | ||
if (gender.lower() == "male" or gender.lower() == "m"): | ||
for i in range(int(amount)): | ||
firstname = nameCreator.firstM.FirstNameMale(language) | ||
lastname = nameCreator.last.LastName(language) | ||
print(firstname + " " + lastname) | ||
elif (gender.lower() == "female" or gender.lower() == "f"): | ||
for i in range(int(amount)): | ||
firstname = nameCreator.firstF.FirstNameFemale(language) | ||
lastname = nameCreator.last.LastName(language) | ||
print(firstname + " " + lastname) | ||
else: | ||
print(gender.lower) | ||
print("Please enter male or female as gender.") | ||
|
||
|
||
if __name__ == '__main__': | ||
nameCreatorCLI(prog_name='nameCreatorCLI') |