Skip to content

Commit

Permalink
Merge pull request #25 from david-caro/handle_rel_paths
Browse files Browse the repository at this point in the history
prepare_image_data: handle also relative paths
  • Loading branch information
jacquerie committed Feb 7, 2018
2 parents 8671ddc + 1d67223 commit 0972d25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@

sudo: false

addons:
apt:
packages:
- ghostscript

language: python

python:
Expand Down
2 changes: 2 additions & 0 deletions plotextractor/output_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ def prepare_image_data(extracted_image_data, output_directory,
if not image_location or not os.path.exists(image_location) or \
len(image_location) < 3:
continue

image_location = os.path.normpath(image_location)
if image_location in img_list:
if caption not in img_list[image_location]['captions']:
img_list[image_location]['captions'].append(caption)
Expand Down

0 comments on commit 0972d25

Please sign in to comment.