mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
pe py: Adjusted the code to its move from 'base/py'
--HG-- extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%4080
This commit is contained in:
parent
fdd7967962
commit
72bdb4258a
@ -1,13 +1,9 @@
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
Unit Name: dupeguru.app_pe_cocoa
|
||||
Created By: Virgil Dupras
|
||||
Created On: 2006/11/13
|
||||
Last modified by:$Author: virgil $
|
||||
Last modified on:$Date: 2009-05-28 16:33:32 +0200 (Thu, 28 May 2009) $
|
||||
$Revision: 4392 $
|
||||
Copyright 2006 Hardcoded Software (http://www.hardcoded.net)
|
||||
"""
|
||||
# Unit Name: dupeguru_pe.app_cocoa
|
||||
# Created By: Virgil Dupras
|
||||
# Created On: 2006/11/13
|
||||
# $Id$
|
||||
# Copyright 2009 Hardcoded Software (http://www.hardcoded.net)
|
||||
|
||||
import os
|
||||
import os.path as op
|
||||
import logging
|
||||
@ -26,8 +22,9 @@ from hsutil.str import get_file_ext
|
||||
from hsutil.path import Path
|
||||
from hsutil.cocoa import as_fetch
|
||||
|
||||
import app_cocoa, data_pe, directories, picture.matchbase
|
||||
from picture.cache import string_to_colors, Cache
|
||||
from dupeguru import app_cocoa, directories
|
||||
from . import data, matchbase
|
||||
from .cache import string_to_colors, Cache
|
||||
|
||||
mainBundle = NSBundle.mainBundle()
|
||||
PictureBlocks = mainBundle.classNamed_('PictureBlocks')
|
||||
@ -123,8 +120,8 @@ class IPhotoLibrary(fs.Directory):
|
||||
|
||||
class DupeGuruPE(app_cocoa.DupeGuru):
|
||||
def __init__(self):
|
||||
app_cocoa.DupeGuru.__init__(self, data_pe, 'dupeguru_pe', appid=5)
|
||||
self.scanner.match_factory = picture.matchbase.AsyncMatchFactory()
|
||||
app_cocoa.DupeGuru.__init__(self, data, 'dupeguru_pe', appid=5)
|
||||
self.scanner.match_factory = matchbase.AsyncMatchFactory()
|
||||
self.directories.dirclass = Directory
|
||||
self.directories.special_dirclasses[Path('iPhoto Library')] = lambda _, __: self._create_iphoto_library()
|
||||
p = op.join(self.appdata, 'cached_pictures.db')
|
||||
|
@ -1,13 +1,9 @@
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
Unit Name: hs.picture.block
|
||||
Created By: Virgil Dupras
|
||||
Created On: 2006/09/01
|
||||
Last modified by:$Author: virgil $
|
||||
Last modified on:$Date: 2009-05-26 18:12:39 +0200 (Tue, 26 May 2009) $
|
||||
$Revision: 4365 $
|
||||
Copyright 2004-2006 Hardcoded Software (http://www.hardcoded.net)
|
||||
"""
|
||||
# Unit Name: dupeguru_pe.block
|
||||
# Created By: Virgil Dupras
|
||||
# Created On: 2006/09/01
|
||||
# $Id$
|
||||
# Copyright 2009 Hardcoded Software (http://www.hardcoded.net)
|
||||
|
||||
from _block import NoBlocksError, DifferentBlockCountError, avgdiff, getblocks2
|
||||
|
||||
# Converted to Cython
|
||||
|
@ -1,13 +1,9 @@
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
Unit Name: hs.picture.cache
|
||||
Created By: Virgil Dupras
|
||||
Created On: 2006/09/14
|
||||
Last modified by:$Author: virgil $
|
||||
Last modified on:$Date: 2009-05-28 16:33:32 +0200 (Thu, 28 May 2009) $
|
||||
$Revision: 4392 $
|
||||
Copyright 2004-2006 Hardcoded Software (http://www.hardcoded.net)
|
||||
"""
|
||||
# Unit Name: dupeguru_pe.cache
|
||||
# Created By: Virgil Dupras
|
||||
# Created On: 2006/09/14
|
||||
# $Id$
|
||||
# Copyright 2009 Hardcoded Software (http://www.hardcoded.net)
|
||||
|
||||
import os
|
||||
import logging
|
||||
import sqlite3 as sqlite
|
||||
|
@ -1,15 +1,11 @@
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
Unit Name: dupeguru.data
|
||||
Created By: Virgil Dupras
|
||||
Created On: 2006/03/15
|
||||
Last modified by:$Author: virgil $
|
||||
Last modified on:$Date: 2009-05-28 15:22:39 +0200 (Thu, 28 May 2009) $
|
||||
$Revision: 4385 $
|
||||
Copyright 2004-2006 Hardcoded Software (http://www.hardcoded.net)
|
||||
"""
|
||||
# Unit Name: dupeguru_pe.data
|
||||
# Created By: Virgil Dupras
|
||||
# Created On: 2006/03/15
|
||||
# $Id$
|
||||
# Copyright 2009 Hardcoded Software (http://www.hardcoded.net)
|
||||
|
||||
from hsutil.str import format_size
|
||||
from .data import format_path, format_timestamp, format_perc, format_dupe_count, cmp_value
|
||||
from dupeguru.data import format_path, format_timestamp, format_perc, format_dupe_count, cmp_value
|
||||
|
||||
def format_dimensions(dimensions):
|
||||
return '%d x %d' % (dimensions[0], dimensions[1])
|
||||
|
@ -22,7 +22,7 @@ os.system('python setup.py build_ext --inplace')
|
||||
os.chdir(op.join('..', 'cache'))
|
||||
os.system('python setup.py build_ext --inplace')
|
||||
os.chdir(op.join('..', '..'))
|
||||
move(op.join('modules', 'block', '_block.so'), '.')
|
||||
move(op.join('modules', 'block', '_block.pyd'), '.')
|
||||
move(op.join('modules', 'cache', '_cache.so'), '.')
|
||||
move(op.join('modules', 'cache', '_cache.pyd'), '.')
|
||||
move(op.join('modules', 'block', '_block.so'), '_block.so')
|
||||
move(op.join('modules', 'block', '_block.pyd'), '_block.pyd')
|
||||
move(op.join('modules', 'cache', '_cache.so'), '_cache.so')
|
||||
move(op.join('modules', 'cache', '_cache.pyd'), '_cache.pyd')
|
||||
|
@ -1,13 +1,9 @@
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
Unit Name: hs.picture._match
|
||||
Created By: Virgil Dupras
|
||||
Created On: 2007/02/25
|
||||
Last modified by:$Author: virgil $
|
||||
Last modified on:$Date: 2009-05-28 16:02:48 +0200 (Thu, 28 May 2009) $
|
||||
$Revision: 4388 $
|
||||
Copyright 2007 Hardcoded Software (http://www.hardcoded.net)
|
||||
"""
|
||||
# Unit Name: dupeguru_pe.matchbase
|
||||
# Created By: Virgil Dupras
|
||||
# Created On: 2007/02/25
|
||||
# $Id$
|
||||
# Copyright 2009 Hardcoded Software (http://www.hardcoded.net)
|
||||
|
||||
import logging
|
||||
import multiprocessing
|
||||
from Queue import Empty
|
||||
@ -17,8 +13,8 @@ from hsutil import job
|
||||
from hsutil.misc import dedupe
|
||||
|
||||
from dupeguru.engine import Match
|
||||
from block import avgdiff, DifferentBlockCountError, NoBlocksError
|
||||
from cache import Cache
|
||||
from .block import avgdiff, DifferentBlockCountError, NoBlocksError
|
||||
from .cache import Cache
|
||||
|
||||
MIN_ITERATIONS = 3
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user