inspirehep / plotextractor

Extract images and captions from TeX files in a tar archive.
GNU General Public License v2.0
3 stars 9 forks source link

converter: detect_images/tex handles hidden files #17

Closed chris-asl closed 7 years ago

chris-asl commented 7 years ago

Ensure detect_images_and_tex method ignores hidden/metadata files. Also, refactor to avoid creating a new process for checking the magic string returned from 'file' command line utility, by adding a wrapper library for libmagic.

Closes (#12).

Signed-off-by: Chris Aslanoglou chris.aslanoglou@gmail.com

Sentry: https://sentry.cern.ch/inspire-sentry/inspire-labs/group/821464/

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.2%) to 75.101% when pulling 6f54854620b0f55d3e7f073a9504d4ccc651e06a on chris-asl:converter-detect_image_and_latex-handles-metadata-files into a85a42c7a694b0e3226d1efcae280b725b022ed4 on inspirehep:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.3%) to 75.236% when pulling 57f55293e29e4107a24a43e8d03b0e2f5a6f628d on chris-asl:converter-detect_image_and_latex-handles-metadata-files into a85a42c7a694b0e3226d1efcae280b725b022ed4 on inspirehep:master.

michamos commented 7 years ago

@chris-asl It might be easier to use MIME types instead of parsing the output. That is what I did for refextract https://github.com/inspirehep/refextract/commit/10f0ccfb9ff40e9e20a1d1e01a5f1def3c2eff2b.

chris-asl commented 7 years ago

@michamos Thank you for your suggestion! :+1:

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.03%) to 74.966% when pulling 71e68320f2ea3032966c4fd64fc198574d82b83f on chris-asl:converter-detect_image_and_latex-handles-metadata-files into a85a42c7a694b0e3226d1efcae280b725b022ed4 on inspirehep:master.

kaplun commented 7 years ago

Will hopefully fix: https://sentry.cern.ch/inspire-sentry/inspire-labs/group/822229/

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.07%) to 75.0% when pulling b2bfcfceb6afbc01136483cef0f2e4537b83e42e on chris-asl:converter-detect_image_and_latex-handles-metadata-files into a85a42c7a694b0e3226d1efcae280b725b022ed4 on inspirehep:master.