def posts(self): """ Returns a list of posts """ if self._posts != None: return self._posts postdir = os.path.join(self.path, "bologna/posts") posts = [] for f in os.listdir(postdir): if f.endswith(".post"): p = Post(path=os.path.join(postdir, f)) p.read() posts.append(p) self._posts = posts return posts