# Path: engine/conf.py
# PATH_TO_IMG = PATH + '/notes/'
# 
# PATH_TO_MD = PATH + '/notes/'
# 
# PATH_TO_ORIG = PATH + "/engine/data/orig/"


from engine.conf import PATH_TO_IMG, PATH_TO_MD, PATH_TO_ORIG
                from Bio.Seq import Seq
                from Bio.Alphabet import generic_dna, generic_protein
import re
import os
import codecs
import glob
import logging
        if '#' in alt:
            style += "max-height:100%;"

        if '#short' in alt:
            style += "max-height:400px;"

        width_html = ''
        height_html = ''
        if name.find(' =') > -1:
            name, dim = name.replace(')', '').split(' =')
            name = name.strip()
            width, height = dim.split('x')  # =500x
            if width:
                width_html = "width:" + width + "px;"
            if height:
                height_html = "height:" + height + "px;"

        # if this is an external link then name is href
        if name.startswith('http'):
            if log:
                logger.info('http image link %s', name)
            path_new = '<a data-lightbox="note" href="' + name + '"><img style="' + \
                width_html + height_html + '" src="' + name + '"></a>'
        else:  # if local then name is a part of full href (PATH_TO_IMG / name)
            if log:
                logger.info('image %s', name)
            if FLASK_BASED:
                path_new = '<a data-lightbox="note" href="/' + name + '"><img style="' + width_html + height_html + style + '" src="/' + name + '"></a>'
            else:
                path_new = '<a data-lightbox="note" href="' + PATH_TO_IMG + '/' + name + '"><img style="' + \

# Path: engine/conf.py
# PATH_TO_IMG = PATH + '/notes/'
# 
# PATH_TO_MD = PATH + '/notes/'
# 
# PATH_TO_ORIG = PATH + "/engine/data/orig/"


# Path: engine/preprocessing.py
from engine.conf import PATH_TO_IMG, PATH_TO_MD, PATH_TO_ORIG
                from Bio.Seq import Seq
                from Bio.Alphabet import generic_dna, generic_protein
import re
import os
import codecs
import glob
import logging

        if '#' in alt:
            style += "max-height:100%;"

        if '#short' in alt:
            style += "max-height:400px;"

        width_html = ''
        height_html = ''
        if name.find(' =') > -1:
            name, dim = name.replace(')', '').split(' =')
            name = name.strip()
            width, height = dim.split('x')  # =500x
            if width:
                width_html = "width:" + width + "px;"
            if height:
                height_html = "height:" + height + "px;"

        # if this is an external link then name is href
        if name.startswith('http'):
            if log:
                logger.info('http image link %s', name)
            path_new = '<a data-lightbox="note" href="' + name + '"><img style="' + \
                width_html + height_html + '" src="' + name + '"></a>'
        else:  # if local then name is a part of full href (PATH_TO_IMG / name)
            if log:
                logger.info('image %s', name)
            if FLASK_BASED:
                path_new = '<a data-lightbox="note" href="/' + name + '"><img style="' + width_html + height_html + style + '" src="/' + name + '"></a>'
            else:
                path_new = '<a data-lightbox="note" href="' + PATH_TO_IMG + '/' + name + '"><img style="' + \

                    width_html + height_html + '" src="' + PATH_TO_IMG + '/' + name + '"></a>'