# Path: engine/conf.py
# PATH_TO_MD = PATH + '/notes/'
# 
# SCREENSHOT_INBOX = None
# 
# PATH_TO_IMG = PATH + '/notes/'
# 
# IMG_PREFIX = 'imgs/'  # keep / at the end  # ![](imgs/<file> this 'imgs' is IMG_PREFIX


from engine.conf import PATH_TO_MD, SCREENSHOT_INBOX, PATH_TO_IMG, IMG_PREFIX
        from rna_pdb_tools import SecondaryStructure
import os
import logging
    changed = False
    ltext = text.split('\n')
    for c in range(0, len(ltext)):
        if ltext[c].startswith('<pre>[ss'):
            if ltext[c+4].startswith('!['): # ^1
                continue
            if ltext[c+4].startswith('[!danger]'): # ^2
                continue

            args = ltext[c].replace(']','').replace('[','').strip().split(':')
            overwrite = False # default
            if len(args) == 2:
                foo, name = args
            if len(args) == 3:
                foo, name, tf = args
                if tf.lower().strip() == 't':
                    overwrite = True

            title = name
            name = 'ss_' + name + '.png'
            seq = ltext[c+1]
            ss = ltext[c+2]

            # make folder with imgs
            try:
                os.mkdir(PATH_TO_IMG + os.sep + 'imgs')
            except OSError:
                pass

            #print seq, ss, name

# Path: engine/conf.py
# PATH_TO_MD = PATH + '/notes/'
# 
# SCREENSHOT_INBOX = None
# 
# PATH_TO_IMG = PATH + '/notes/'
# 
# IMG_PREFIX = 'imgs/'  # keep / at the end  # ![](imgs/<file> this 'imgs' is IMG_PREFIX


# Path: engine/plugins/draw_secondary_structure.py
from engine.conf import PATH_TO_MD, SCREENSHOT_INBOX, PATH_TO_IMG, IMG_PREFIX
        from rna_pdb_tools import SecondaryStructure
import os
import logging

    changed = False
    ltext = text.split('\n')
    for c in range(0, len(ltext)):
        if ltext[c].startswith('<pre>[ss'):
            if ltext[c+4].startswith('!['): # ^1
                continue
            if ltext[c+4].startswith('[!danger]'): # ^2
                continue

            args = ltext[c].replace(']','').replace('[','').strip().split(':')
            overwrite = False # default
            if len(args) == 2:
                foo, name = args
            if len(args) == 3:
                foo, name, tf = args
                if tf.lower().strip() == 't':
                    overwrite = True

            title = name
            name = 'ss_' + name + '.png'
            seq = ltext[c+1]
            ss = ltext[c+2]

            # make folder with imgs
            try:
                os.mkdir(PATH_TO_IMG + os.sep + 'imgs')
            except OSError:
                pass

            #print seq, ss, name

            out = PATH_TO_IMG + os.sep + 'imgs' + os.sep + name