Reads in a file and performs MultiMarkdown conversion, with transclusion ocurring based on the
    file directory. Returns the converted string.

    Keyword arguments:
    fname -- Filename of document to convert
    ext -- extension bitfield to pass to conversion process
    fmt -- flag indicating output format to use

def convert_from(fname, ext=COMPLETE, fmt=HTML):
    """
    Reads in a file and performs MultiMarkdown conversion, with transclusion ocurring based on the
    file directory. Returns the converted string.

    Keyword arguments:
    fname -- Filename of document to convert
    ext -- extension bitfield to pass to conversion process
    fmt -- flag indicating output format to use
    """

    dname = os.path.abspath(os.path.dirname(fname))
    with open(fname, 'r') as fp:
        src = fp.read()

    return convert(src, ext, fmt, dname)