I would do it differently here - just assume you have the shogun source code lying somewhere (IIRC there is some setting.SHOGUN_SRC) and so you could os.walk or otherwise recursively list files that end with '.md'