mirror of
				https://github.com/arsenetar/dupeguru.git
				synced 2025-09-11 17:58:17 +00:00 
			
		
		
		
	Adapted codebase to the hsutil/hscommon split and the hsmedia --> hsaudiotag rename.
This commit is contained in:
		
							parent
							
								
									75eb005ba0
								
							
						
					
					
						commit
						371426a08e
					
				
							
								
								
									
										5
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								README
									
									
									
									
									
								
							| @ -12,9 +12,8 @@ This package contains the source for dupeGuru. To learns how to build it, refer | ||||
| There are also other sub-folder that comes from external repositories (automatically checked out | ||||
| with svn:externals): | ||||
| 
 | ||||
| - hsutil: A collection of helpers used across HS applications. | ||||
| - hscommon: A collection of helpers used across HS applications. | ||||
| - hsdocgen: An ad-hoc document generation used across HS project (used for help files) | ||||
| - hsmedia: A library to read audio file metadata, used in dupeGuru ME. | ||||
| - cocoalib: A collection of helpers used across Cocoa UI codebases of HS applications. | ||||
| - qtlib: A collection of helpers used across Qt UI codebases of HS applications. | ||||
| 
 | ||||
| @ -28,6 +27,8 @@ General dependencies | ||||
| 
 | ||||
| - Python 2.6 (http://www.python.org) | ||||
| - Send2Trash (http://hg.hardcoded.net/send2trash) | ||||
| - hsutil (http://hg.hardcoded.net/hsutil) | ||||
| - hsaudiotag (for ME) (http://hg.hardcoded.net/hsaudiotag) | ||||
| - lxml, to read and write XML files. (http://codespeak.net/lxml/) | ||||
| - Mako, to generate help files. (http://www.makotemplates.org/) | ||||
| - PyYaml, for help files and the build system. (http://pyyaml.org/) | ||||
|  | ||||
							
								
								
									
										6
									
								
								build.py
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								build.py
									
									
									
									
									
								
							| @ -16,7 +16,7 @@ from setuptools import setup | ||||
| import yaml | ||||
| 
 | ||||
| from hsdocgen import generate_help, filters | ||||
| from hsutil.build import add_to_pythonpath, print_and_do, build_all_qt_ui, copy_packages | ||||
| from hscommon.build import add_to_pythonpath, print_and_do, build_all_qt_ui, copy_packages | ||||
| 
 | ||||
| def build_cocoa(edition, dev, help_destpath): | ||||
|     if not dev: | ||||
| @ -30,10 +30,10 @@ def build_cocoa(edition, dev, help_destpath): | ||||
|     if not dev: | ||||
|         specific_packages = { | ||||
|             'se': ['core_se'], | ||||
|             'me': ['core_me', 'hsmedia'], | ||||
|             'me': ['core_me'], | ||||
|             'pe': ['core_pe'], | ||||
|         }[edition] | ||||
|         copy_packages(['core', 'hsutil'] + specific_packages, 'build') | ||||
|         copy_packages(['core', 'hscommon'] + specific_packages, 'build') | ||||
|     cocoa_project_path = 'cocoa/{0}'.format(edition) | ||||
|     shutil.copy(op.join(cocoa_project_path, 'dg_cocoa.py'), 'build') | ||||
|     os.chdir('build') | ||||
|  | ||||
| @ -4,7 +4,7 @@ | ||||
| # which should be included with this package. The terms are also available at  | ||||
| # http://www.hardcoded.net/licenses/hs_license | ||||
| 
 | ||||
| from hsutil.cocoa import signature | ||||
| from hscommon.cocoa import signature | ||||
| 
 | ||||
| from core.app_cocoa_inter import PyDupeGuruBase, PyDetailsPanel | ||||
| from core_me.app_cocoa import DupeGuruME | ||||
| @ -13,7 +13,7 @@ from core.scanner import (SCAN_TYPE_FILENAME, SCAN_TYPE_FIELDS, SCAN_TYPE_FIELDS | ||||
| 
 | ||||
| # Fix py2app imports which chokes on relative imports and other stuff | ||||
| from core_me import app_cocoa, data, fs, scanner | ||||
| from hsmedia import aiff, flac, genres, id3v1, id3v2, mp4, mpeg, ogg, wma | ||||
| from hsaudiotag import aiff, flac, genres, id3v1, id3v2, mp4, mpeg, ogg, wma | ||||
| from lxml import etree, _elementpath | ||||
| import gzip | ||||
| 
 | ||||
|  | ||||
| @ -4,7 +4,7 @@ | ||||
| # which should be included with this package. The terms are also available at  | ||||
| # http://www.hardcoded.net/licenses/hs_license | ||||
| 
 | ||||
| from hsutil.cocoa import signature | ||||
| from hscommon.cocoa import signature | ||||
| 
 | ||||
| from core import scanner | ||||
| from core.app_cocoa_inter import PyDupeGuruBase, PyDetailsPanel | ||||
|  | ||||
| @ -15,11 +15,11 @@ import subprocess | ||||
| import re | ||||
| 
 | ||||
| from send2trash import send2trash | ||||
| from hscommon.reg import RegistrableApplication, RegistrationRequired | ||||
| from hscommon.notify import Broadcaster | ||||
| from hsutil import io, files | ||||
| from hsutil.path import Path | ||||
| from hsutil.reg import RegistrableApplication, RegistrationRequired | ||||
| from hsutil.misc import flatten, first | ||||
| from hsutil.notify import Broadcaster | ||||
| from hsutil.str import escape | ||||
| 
 | ||||
| from . import directories, results, scanner, export, fs | ||||
|  | ||||
| @ -9,12 +9,12 @@ | ||||
| import logging | ||||
| import os.path as op | ||||
| 
 | ||||
| from hsutil import cocoa, job | ||||
| from hsutil.cocoa import install_exception_hook | ||||
| from hsutil.cocoa.objcmin import (NSNotificationCenter, NSUserDefaults, | ||||
| from hscommon import cocoa, job | ||||
| from hscommon.cocoa import install_exception_hook | ||||
| from hscommon.cocoa.objcmin import (NSNotificationCenter, NSUserDefaults, | ||||
|     NSSearchPathForDirectoriesInDomains, NSApplicationSupportDirectory, NSUserDomainMask, | ||||
|     NSWorkspace) | ||||
| from hsutil.reg import RegistrationRequired | ||||
| from hscommon.reg import RegistrationRequired | ||||
| 
 | ||||
| from . import app | ||||
| 
 | ||||
|  | ||||
| @ -9,7 +9,7 @@ | ||||
| 
 | ||||
| # Common interface for all editions' dg_cocoa unit. | ||||
| 
 | ||||
| from hsutil.cocoa.inter import signature, PyTable, PyOutline, PyGUIObject, PyRegistrable | ||||
| from hscommon.cocoa.inter import signature, PyTable, PyOutline, PyGUIObject, PyRegistrable | ||||
| 
 | ||||
| from .gui.details_panel import DetailsPanel | ||||
| from .gui.directory_tree import DirectoryTree | ||||
|  | ||||
| @ -16,7 +16,7 @@ from unicodedata import normalize | ||||
| 
 | ||||
| from hsutil.misc import flatten | ||||
| from hsutil.str import multi_replace | ||||
| from hsutil import job | ||||
| from hscommon import job | ||||
| 
 | ||||
| (WEIGHT_WORDS, | ||||
| MATCH_SIMILAR_WORDS, | ||||
|  | ||||
| @ -7,7 +7,7 @@ | ||||
| # which should be included with this package. The terms are also available at  | ||||
| # http://www.hardcoded.net/licenses/hs_license | ||||
| 
 | ||||
| from hsutil.notify import Listener | ||||
| from hscommon.notify import Listener | ||||
| 
 | ||||
| class GUIObject(Listener): | ||||
|     def __init__(self, view, app): | ||||
|  | ||||
| @ -7,7 +7,7 @@ | ||||
| # which should be included with this package. The terms are also available at  | ||||
| # http://www.hardcoded.net/licenses/hs_license | ||||
| 
 | ||||
| from hsutil.notify import Broadcaster | ||||
| from hscommon.notify import Broadcaster | ||||
| 
 | ||||
| from .base import GUIObject | ||||
| 
 | ||||
|  | ||||
| @ -7,7 +7,7 @@ | ||||
| # which should be included with this package. The terms are also available at  | ||||
| # http://www.hardcoded.net/licenses/hs_license | ||||
| 
 | ||||
| from hsutil.notify import Listener | ||||
| from hscommon.notify import Listener | ||||
| from hsgui.table import GUITable, Row | ||||
| 
 | ||||
| class ProblemTable(GUITable, Listener): | ||||
|  | ||||
| @ -11,8 +11,8 @@ import re | ||||
| from lxml import etree | ||||
| 
 | ||||
| from . import engine | ||||
| from hsutil.job import nulljob | ||||
| from hsutil.markable import Markable | ||||
| from hscommon.job import nulljob | ||||
| from hscommon.markable import Markable | ||||
| from hsutil.misc import flatten, nonone | ||||
| from hsutil.str import format_size | ||||
| from hsutil.files import FileOrPath | ||||
|  | ||||
| @ -9,7 +9,8 @@ | ||||
| import logging | ||||
| 
 | ||||
| 
 | ||||
| from hsutil import job, io | ||||
| from hscommon import job | ||||
| from hsutil import io | ||||
| from hsutil.misc import dedupe | ||||
| from hsutil.str import get_file_ext, rem_file_ext | ||||
| 
 | ||||
|  | ||||
| @ -16,7 +16,7 @@ from hsutil import io | ||||
| from hsutil.path import Path | ||||
| from hsutil.decorators import log_calls | ||||
| import hsutil.files | ||||
| from hsutil.job import nulljob | ||||
| from hscommon.job import nulljob | ||||
| 
 | ||||
| from . import data | ||||
| from .results_test import GetTestGroups | ||||
|  | ||||
| @ -10,7 +10,7 @@ import sys | ||||
| 
 | ||||
| from nose.tools import eq_ | ||||
| 
 | ||||
| from hsutil import job | ||||
| from hscommon import job | ||||
| from hsutil.decorators import log_calls | ||||
| from hsutil.misc import first | ||||
| from hsutil.testcase import TestCase | ||||
|  | ||||
| @ -8,7 +8,8 @@ | ||||
| 
 | ||||
| from nose.tools import eq_ | ||||
| 
 | ||||
| from hsutil import job, io | ||||
| from hscommon import job | ||||
| from hsutil import io | ||||
| from hsutil.path import Path | ||||
| from hsutil.testcase import TestCase | ||||
| 
 | ||||
|  | ||||
| @ -10,7 +10,7 @@ import logging | ||||
| from appscript import app, k, CommandError | ||||
| import time | ||||
| 
 | ||||
| from hsutil.cocoa import as_fetch | ||||
| from hscommon.cocoa import as_fetch | ||||
| 
 | ||||
| from core.app_cocoa import JOBID2TITLE, DupeGuru as DupeGuruBase | ||||
| 
 | ||||
|  | ||||
| @ -7,7 +7,7 @@ | ||||
| # which should be included with this package. The terms are also available at  | ||||
| # http://www.hardcoded.net/licenses/hs_license | ||||
| 
 | ||||
| from hsmedia import mpeg, wma, mp4, ogg, flac, aiff | ||||
| from hsaudiotag import mpeg, wma, mp4, ogg, flac, aiff | ||||
| from hsutil.str import get_file_ext | ||||
| from core import fs | ||||
| 
 | ||||
|  | ||||
| @ -15,8 +15,8 @@ from appscript import app, k, CommandError | ||||
| from hsutil import io | ||||
| from hsutil.str import get_file_ext | ||||
| from hsutil.path import Path | ||||
| from hsutil.cocoa import as_fetch | ||||
| from hsutil.cocoa.objcmin import NSUserDefaults, NSURL | ||||
| from hscommon.cocoa import as_fetch | ||||
| from hscommon.cocoa.objcmin import NSUserDefaults, NSURL | ||||
| 
 | ||||
| from core import fs | ||||
| from core import app_cocoa, directories | ||||
|  | ||||
| @ -10,7 +10,7 @@ import logging | ||||
| import multiprocessing | ||||
| from collections import defaultdict, deque | ||||
| 
 | ||||
| from hsutil import job | ||||
| from hscommon import job | ||||
| 
 | ||||
| from core.engine import Match | ||||
| from .block import avgdiff, DifferentBlockCountError, NoBlocksError | ||||
|  | ||||
| @ -12,7 +12,7 @@ import logging | ||||
| 
 | ||||
| from hsutil import io | ||||
| from hsutil.path import Path | ||||
| from hsutil.cocoa.objcmin import NSWorkspace | ||||
| from hscommon.cocoa.objcmin import NSWorkspace | ||||
| 
 | ||||
| from core import fs | ||||
| from core.app_cocoa import DupeGuru as DupeGuruBase | ||||
|  | ||||
| @ -15,7 +15,7 @@ import shutil | ||||
| 
 | ||||
| import yaml | ||||
| 
 | ||||
| from hsutil.build import (build_dmg, add_to_pythonpath, print_and_do, copy_packages, | ||||
| from hscommon.build import (build_dmg, add_to_pythonpath, print_and_do, copy_packages, | ||||
|     build_debian_changelog, copy_qt_plugins) | ||||
| 
 | ||||
| def package_cocoa(edition): | ||||
| @ -84,11 +84,9 @@ def package_debian(edition): | ||||
|     help_src = ed('help_{0}') | ||||
|     os.makedirs(destpath) | ||||
|     shutil.copytree(ed('qt/{0}'), srcpath) | ||||
|     packages = ['hsutil', 'hsgui', 'core', ed('core_{0}'), 'qtlib', 'qt/base'] | ||||
|     if edition == 'me': | ||||
|         packages.append('hsmedia') | ||||
|     packages = ['hscommon', 'hsgui', 'core', ed('core_{0}'), 'qtlib', 'qt/base'] | ||||
|     copy_packages(packages, srcpath) | ||||
|     # We also have to copy the Send2Trash package | ||||
|     # We also have to copy the Send2Trash, hsutil and hsaudiotag package | ||||
|     import send2trash | ||||
|     pkg_path = op.dirname(send2trash.__file__) | ||||
|     shutil.copytree(pkg_path, op.join(srcpath, 'send2trash')) | ||||
|  | ||||
| @ -16,7 +16,7 @@ from PyQt4.QtCore import QTimer, QObject, QCoreApplication, QUrl, SIGNAL | ||||
| from PyQt4.QtGui import QDesktopServices, QFileDialog, QDialog, QMessageBox | ||||
| 
 | ||||
| from hsutil import job | ||||
| from hsutil.reg import RegistrationRequired | ||||
| from hscommon.reg import RegistrationRequired | ||||
| 
 | ||||
| from core.app import DupeGuru as DupeGuruBase, JOB_SCAN, JOB_LOAD, JOB_MOVE, JOB_COPY, JOB_DELETE | ||||
|      | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user