              print(str(err))
  
      def load_skip_alignments(self, alignfile, faces_detected):
          """ Load existing alignments if skipping existing images """
          if self.have_alignments():
              existing_alignments = self.read_alignments()
              for key, val in existing_alignments.items():
                  if val:
                      faces_detected[key] = val
          else:
 
</s> remove             print("{} not written!".format(alignfile))
 </s> add             print("{} not written!".format(self.alignments_path)) </s> remove 
    def have_alignments(self):
        """ Check if an alignments file exists """
        alignfile = self.get_alignments_path()
        return os.path.exists(alignfile)
 </s> add  </s> remove     exclude_names = [basename(Path(x).stem[:-2] + Path(x).suffix) for x in exclude]
 </s> add     exclude_names = [basename(Path(x).stem[:Path(x).stem.rfind('_')] +
        Path(x).suffix) for x in exclude] </s> remove         alignfile = self.get_alignments_path()

 </s> add 
        if self.have_alignments_file:
              print(str(err))
  
      def load_skip_alignments(self, alignfile, faces_detected):
          """ Load existing alignments if skipping existing images """
        if self.have_alignments_file:
              existing_alignments = self.read_alignments()
              for key, val in existing_alignments.items():
                  if val:
                      faces_detected[key] = val
          else:
keep keep keep keep replace keep keep keep keep keep
 Cli/Scripts Refactor (#374)

* Refactor for PEP 8 and split process function

* Remove backwards compatibility for skip frames

* Split optional functions into own class. Make functions more modular

* train.py - Fix write image bug. Make more modular

* convert.py: Extract alignments from frames if they don't exist

* BugFix: SkipExisting broken since face name refactor

* train.py - Semi-fix for hang on reaching target iteration. Now quits on preview mode
Make tensorflow / system warning less verbose

* Final bugfixes

* Add 'all' back in for selectable detectors

* Final minor tweaks 
scripts/fsmedia.py