Esempio n. 1
0
    def appendRemoveToFile(self, filename):
        arr = self.uicheckboxes.getRemoveAsArray()
        if len(arr) == 0:
            return

        if not Path(filename).is_file():
            print("File does not exist, will create it: {}".format(filename))
            colaboratory_helpers.dumpArrToFile(filename, arr)
        else:
            colaboratory_helpers.appendArrToFile(filename, arr)
Esempio n. 2
0
 def appendMoversToTheirFiles(self):
     """
     Append the arrays to the filenames (but NOT including remove), not multi label
     """
     for lbl, filename in self.uicheckboxes.uiMoveLables.items():
         arr = self.uicheckboxes.getMoverAsArray(lbl)
         print("Checking {} {} ".format(lbl, filename))
         if len(arr) == 0:
             continue
         if not Path(filename).is_file():
             print("File does not exist, will create it: {}".format(filename))
             colaboratory_helpers.dumpArrToFile(filename, arr)
         else:
             colaboratory_helpers.appendArrToFile(filename, arr)
Esempio n. 3
0
    def appendRemoversToTheirFilesMultiLabel(self):
        """
        Append the arrays to generated filenames for the selected labels which should have a label REMOVED
        """
        for lbl in self.uicheckboxes.uiMoveLables:
            arr = self.uicheckboxes.getRemoveLabelAsArray(lbl)

            #create filename
            filename = self.multi_label_moversdir + lbl + ".remove.csv"

            print("Checking {} {} ".format(lbl, filename))
            if len(arr) == 0:
                continue
            if not Path(filename).is_file():
                print("File does not exist, will create it: {}".format(filename))
                colaboratory_helpers.dumpArrToFile(filename, arr)
            else:
                colaboratory_helpers.appendArrToFile(filename, arr)
 def appendRemoversToFile(self, filename):
     colaboratory_helpers.appendArrToFile(filename, uicheckbox.uiRemove)
Esempio n. 5
0
 def appendAllProcessed(self, arr, filename):
     if not Path(filename).is_file():
         print("File does not exist, will create it: {}".format(filename))
         colaboratory_helpers.dumpArrToFile(filename, arr)
     else:
         colaboratory_helpers.appendArrToFile(filename, arr)