Added a simple method for open profile files.
[automanga.git] / manga / profile.py
index 2620a98..27bf86e 100644 (file)
@@ -89,6 +89,9 @@ class manga(object):
         import lib
         return lib.findlib(self.libnm).byid(self.id)
 
+    def save(self):
+        pass
+
 class memmanga(manga):
     def __init__(self, profile, libnm, id):
         super(memmanga, self).__init__(profile, libnm, id)
@@ -193,6 +196,9 @@ class profile(object):
             for nm, (libnm, id) in map.iteritems():
                 f.write(consline("alias", nm, libnm, id) + "\n")
 
+    def file(self, name, mode="r"):
+        return openwdir(pj(self.dir, name), mode)
+
     def getalias(self, nm):
         return self.getaliases()[nm]