-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change directory idecticon --> idecticons
- Loading branch information
Showing
8 changed files
with
34 additions
and
12 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,4 +1,4 @@ | ||
|
||
__all__ = ["generate", "save"] | ||
|
||
from identicon._generate import generate, save | ||
from identicons._generate import generate, save |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,4 @@ | ||
|
||
__all__ = ["generate", "save"] | ||
|
||
from identicons._generate import generate, save |
File renamed without changes.
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,26 @@ | ||
import argparse | ||
|
||
from identicons._generate import generate, save | ||
|
||
def main(): | ||
|
||
parser = argparse.ArgumentParser(description=f'CLI tool.') | ||
parser.add_argument('-t', '--text', required=True, help="" ) | ||
parser.add_argument('-f', '--file', required=True, help="" ) | ||
parser.add_argument('-p', '--primary', default='0x00', type=str, required=False, help="" ) | ||
parser.add_argument('-s', '--secondary', default='0xffffff', type=str, required=False, help="" ) | ||
parser.add_argument('-w', '--width', default=500, type=int, required=False, help="Specify the width of the output image.") | ||
parser.add_argument('-hi', '--height', default=500, type=int, required=False, help="Specify the height of the output image.") | ||
|
||
parser.add_argument('-v', '--version', action='version', version='%(prog)s 0.1.0', help='byteTensor version ') | ||
|
||
|
||
args = parser.parse_args() | ||
primary, secondary = int(args.primary, 16), int(args.secondary, 16) | ||
print(primary, secondary) | ||
icon = generate(args.text, primary, secondary) | ||
save(icon, args.file, "./", args.height, args.width) | ||
|
||
|
||
if __name__ == "__name__": | ||
main() |