コード例 #1
0
ファイル: main.py プロジェクト: kobtea/encoding_assistant
 def rename(cls):
     LOG.debug('{0:*^80}'.format(' Rename '))
     renamer = SyoboiRenamer()
     ex = Explorer()
     for r in ex.resources():
         LOG.debug(u'Try Rename {0}'.format(r.name))
         new_title = renamer.find(r)
         if new_title:
             ex.interactive_rename(r, new_title)
コード例 #2
0
ファイル: main.py プロジェクト: kobtea/encoding_assistant
 def trash(cls):
     LOG.debug('{0:*^80}'.format(' Trash '))
     ex = Explorer()
     LOG.debug('{0:-^80}'.format('Trash Blacklist'))
     for r in ex.resources():
         if ResourceFilter.is_in_blacklist(r):
             ex.trash(r)
     LOG.debug('{0:-^80}'.format('Trash Duplicate'))
     for d in ex.duplicates():
         map(lambda x: ex.trash(x), ResourceFilter.duplicates(d))
コード例 #3
0
ファイル: main.py プロジェクト: kobtea/encoding_assistant
 def setup(cls, work_dir):
     LOG.debug('{0:*^80}'.format(' Setup TMPGEncVMW5 '))
     assistant = Assistant()
     ex = Explorer()
     assistant.add_files(ex.resources(work_dir))