Skip to content

Commit

Permalink
fix : RANDOM_FILTERED_ARTS added #39
Browse files Browse the repository at this point in the history
  • Loading branch information
sepandhaghighi committed Apr 6, 2019
1 parent 9172004 commit 24e87c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions art/art.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ def art(artname, number=1, text=""):
raise artError(ART_TYPE_ERROR)
artname = artname.lower()
arts = sorted(art_dic.keys())
if artname == "random" or artname == "rand":
artname = random.choice(arts)
if artname == "random" or artname == "rand" or artname == "rnd":
filtered_arts = list(set(arts) - set(RANDOM_FILTERED_ARTS))
artname = random.choice(filtered_arts)
elif artname not in art_dic.keys():
distance_list = list(map(lambda x: distance_calc(artname, x),
arts))
Expand Down
4 changes: 4 additions & 0 deletions art/art_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@
"mirror_flip",
"flip"]

RANDOM_FILTERED_ARTS = ["message2","love you","text decoration","message1","musical"]



TEST_FILTERED_FONTS = ["mirror", "mirror_flip", "flip"]

DESCRIPTION = '''ASCII art is also known as "computer text art".
Expand Down

0 comments on commit 24e87c3

Please sign in to comment.