Skip to content

Commit

Permalink
change directory idecticon --> idecticons
Browse files Browse the repository at this point in the history
  • Loading branch information
LVivona committed Jan 9, 2024
1 parent 8aafc51 commit fabbe0b
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build/lib/identicon/__init__.py
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
2 changes: 1 addition & 1 deletion build/lib/identicon/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__all__ = []

import argparse
from identicon._generate import generate, save
from identicons._generate import generate, save

def main():

Expand Down
4 changes: 0 additions & 4 deletions identicon/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions identicon/__main__.py

This file was deleted.

4 changes: 4 additions & 0 deletions identicons/__init__.py
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.
4 changes: 2 additions & 2 deletions identicon/cli/__init__.py → identicons/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__all__ = []

import argparse
from identicon._generate import generate, save
from identicons._generate import generate, save

def main():

Expand All @@ -13,7 +13,7 @@ def main():
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 ')
parser.add_argument('-v', '--version', action='version', version='%(prog)s 0.1.3', help='byteTensor version ')

try:

Expand Down
26 changes: 26 additions & 0 deletions identicons/cli/cli.py
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()

0 comments on commit fabbe0b

Please sign in to comment.