mirror of
https://github.com/arsenetar/dupeguru.git
synced 2024-11-14 11:39:03 +00:00
51 lines
1.5 KiB
Python
51 lines
1.5 KiB
Python
# Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
|
|
#
|
|
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
|
|
# which should be included with this package. The terms are also available at
|
|
# http://www.hardcoded.net/licenses/bsd_license
|
|
|
|
from hscommon.trans import install_cocoa_trans
|
|
install_cocoa_trans()
|
|
|
|
from hscommon.cocoa import signature
|
|
|
|
from core.scanner import ScanType
|
|
from core.app_cocoa import PyDupeGuruBase, PyDetailsPanel
|
|
from core_se.app_cocoa import DupeGuru
|
|
from core_se import __appname__
|
|
|
|
class PyDupeGuru(PyDupeGuruBase):
|
|
def init(self):
|
|
self = super(PyDupeGuru,self).init()
|
|
self._init(DupeGuru)
|
|
return self
|
|
|
|
#---Properties
|
|
def setMinMatchPercentage_(self,percentage):
|
|
self.py.scanner.min_match_percentage = int(percentage)
|
|
|
|
def setScanType_(self,scan_type):
|
|
try:
|
|
self.py.scanner.scan_type = [
|
|
ScanType.Filename,
|
|
ScanType.Contents,
|
|
ScanType.Folders,
|
|
][scan_type]
|
|
except IndexError:
|
|
pass
|
|
|
|
def setWordWeighting_(self,words_are_weighted):
|
|
self.py.scanner.word_weighting = words_are_weighted
|
|
|
|
def setMatchSimilarWords_(self,match_similar_words):
|
|
self.py.scanner.match_similar_words = match_similar_words
|
|
|
|
@signature('v@:i')
|
|
def setSizeThreshold_(self, size_threshold):
|
|
self.py.scanner.size_threshold = size_threshold
|
|
|
|
#---Registration
|
|
def appName(self):
|
|
return __appname__
|
|
|