Update app.py
Browse files
app.py
CHANGED
@@ -62,7 +62,8 @@ def generate_cards(
|
|
62 |
text: str = "",
|
63 |
power: str = "",
|
64 |
toughness: str = "",
|
65 |
-
loyalty: str = ""
|
|
|
66 |
):
|
67 |
#ensure n_cards is never 0 or negative
|
68 |
n_cards = int(n_cards)
|
@@ -133,8 +134,9 @@ def generate_cards(
|
|
133 |
#"{9}": "(9)",
|
134 |
}
|
135 |
|
136 |
-
|
137 |
-
|
|
|
138 |
|
139 |
|
140 |
return out_str
|
|
|
62 |
text: str = "",
|
63 |
power: str = "",
|
64 |
toughness: str = "",
|
65 |
+
loyalty: str = "",
|
66 |
+
do_replacements: bool = True
|
67 |
):
|
68 |
#ensure n_cards is never 0 or negative
|
69 |
n_cards = int(n_cards)
|
|
|
134 |
#"{9}": "(9)",
|
135 |
}
|
136 |
|
137 |
+
if do_replacements:
|
138 |
+
for key, value in replacements.items():
|
139 |
+
out_str = out_str.replace(key, value)
|
140 |
|
141 |
|
142 |
return out_str
|