Skip to content

Commit 94b6a1d

Browse files
committed
fixing client
Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>
1 parent 40cf68e commit 94b6a1d

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and **Merged pull requests**.
77
The versions coincide with releases on pypi.
88

99
## [0.0.x](https://github.com/vsoch/codeart/tree/master) (0.0.x)
10+
- images must be relative to text for text art (0.0.13)
1011
- verison bump for http resource (0.0.12)
1112
- finished basic client and dummy functions (0.0.11)
1213
- dummy release with base functions without client (0.0.1)

codeart/client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from glob import glob
1717
import sys
1818
import os
19+
import re
1920
import tempfile
2021

2122

@@ -112,9 +113,11 @@ def main():
112113
# Train a model for all extensions
113114
image_dir = os.path.join(outdir, "images")
114115
images = code.make_art(group="all", outdir=image_dir)
115-
images = glob("%s/*" % os.path.join(outdir, "images"))
116116
color_lookup = generate_color_lookup(images)
117117

118+
# Color lookup index must be relative to output folder
119+
color_lookup.index = [re.findall('image.+', i)[0] for i in color_lookup.index.tolist()]
120+
118121
# Generate an image with text (dinosaur!)
119122
generate_codeart_text(
120123
text, color_lookup, outfile=os.path.join(outdir, "index.html")

codeart/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
"""
1010

11-
__version__ = "0.0.12"
11+
__version__ = "0.0.13"
1212
AUTHOR = "Vanessa Sochat"
1313
AUTHOR_EMAIL = "vsochat@stanford.edu"
1414
NAME = "codeart"

0 commit comments

Comments
 (0)