Esempio n. 1
0
 def readInfos(self):
     self._checkDirectoryExists()
     
     infofile = Infofile()
     success = infofile.readContent(self.infofilePath())
     
     files = self._directory.getContentList()
     
     if(success):
         print("title : ", infofile.title)
         print("Files : ")
         for f in files:  
             print(MyPath(f).filename)
Esempio n. 2
0
    def organize(self, filesToMoveIn=None):
        self._checkDirectoryExists()

        notesPath = self._path.getAbsolutePath()
        latexNotes = LatexNotes(self._fields)
        latexNotes.createAllContent()
        latexNotes.writeContent(notesPath)
        
        title = self._fields.getField("title")
        infofile = Infofile()
        infofile.title = title
        infofile.writeContent(self.infofilePath())

        if(filesToMoveIn is not None):
            for file in filesToMoveIn:
                f = file
                if(type(file) != File):
                    f = File(file)
                f.moveFile(self._path.getAbsolutePath())