Compare commits
5 Commits
1.0.2-beta
...
1.0.2a-bet
Author | SHA1 | Date | |
---|---|---|---|
e9aba4e119 | |||
53aca0ee08 | |||
9aa41823b4 | |||
8d4a336b50 | |||
3c96e68fde |
@ -67,11 +67,13 @@ class ZipArchiver:
|
||||
zf = zipfile.ZipFile( self.path, 'r' )
|
||||
try:
|
||||
data = zf.read( archive_file )
|
||||
except zipfile.BadZipfile:
|
||||
print "bad zipfile: {0} :: {1}".format(self.path, archive_file)
|
||||
except zipfile.BadZipfile as e:
|
||||
print "bad zipfile [{0}]: {1} :: {2}".format(e, self.path, archive_file)
|
||||
zf.close()
|
||||
raise IOError
|
||||
except Exception:
|
||||
print "bad zipfile: {0} :: {1}".format(self.path, archive_file)
|
||||
except Exception as e:
|
||||
zf.close()
|
||||
print "bad zipfile [{0}]: {1} :: {2}".format(e, self.path, archive_file)
|
||||
raise IOError
|
||||
finally:
|
||||
zf.close()
|
||||
@ -491,7 +493,9 @@ class UnknownArchiver:
|
||||
|
||||
#------------------------------------------------------------------
|
||||
class ComicArchive:
|
||||
|
||||
|
||||
logo_data = None
|
||||
|
||||
class ArchiveType:
|
||||
Zip, Rar, Folder, Unknown = range(4)
|
||||
|
||||
@ -516,6 +520,12 @@ class ComicArchive:
|
||||
self.archive_type = self.ArchiveType.Unknown
|
||||
self.archiver = UnknownArchiver( self.path )
|
||||
|
||||
if ComicArchive.logo_data is None:
|
||||
fname = os.path.join(ComicTaggerSettings.baseDir(), 'graphics','nocover.png' )
|
||||
with open(fname, 'rb') as fd:
|
||||
ComicArchive.logo_data = fd.read()
|
||||
print len(ComicArchive.logo_data)
|
||||
|
||||
# Clears the cached data
|
||||
def resetCache( self ):
|
||||
self.has_cix = None
|
||||
@ -650,9 +660,7 @@ class ComicArchive:
|
||||
image_data = self.archiver.readArchiveFile( filename )
|
||||
except IOError:
|
||||
print "Error reading in page. Substituting logo page."
|
||||
fname = os.path.join(ComicTaggerSettings.baseDir(), 'graphics/nocover.png' )
|
||||
with open(fname) as x:
|
||||
image_data = x.read()
|
||||
image_data = ComicArchive.logo_data
|
||||
|
||||
return image_data
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
# This file should contan only these comments, and the line below.
|
||||
# Used by packaging makefiles and app
|
||||
version="1.0.1-beta"
|
||||
version="1.0.2a-beta"
|
||||
|
@ -118,6 +118,7 @@ class FileRenamer:
|
||||
# some tweaks to keep various filesystems happy
|
||||
new_name = new_name.replace("/", "-")
|
||||
new_name = new_name.replace(":", "-")
|
||||
new_name = new_name.replace("?", "")
|
||||
|
||||
return new_name
|
||||
|
||||
|
@ -1,10 +1,20 @@
|
||||
|
||||
---------------------------------
|
||||
1.0.2-beta - 25-Jan-2013
|
||||
---------------------------------
|
||||
Changes:
|
||||
More verbose logging during auto-tag
|
||||
Added %month% and %month_name% for renaming
|
||||
Better parsing of volume numbers in file name
|
||||
Bugs:
|
||||
Better exception handling with corrupted image data
|
||||
Fixed issues with RAR reading on OS X
|
||||
Other minor bug fixes
|
||||
|
||||
---------------------------------
|
||||
1.0.1-beta - 24-Jan-2013
|
||||
---------------------------------
|
||||
|
||||
Bug Fix:
|
||||
Fixed an issue where unicode strings can't be printed to OS Console
|
||||
Fixed an issue where unicode strings can't be printed to OS X Console
|
||||
|
||||
---------------------------------
|
||||
1.0.0-beta - 23-Jan-2013
|
||||
|
@ -1521,8 +1521,6 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
print "!!!!No metadata given to search online with!"
|
||||
return False, match_results
|
||||
|
||||
|
||||
|
||||
if dlg.dontUseYear:
|
||||
md.year = None
|
||||
if dlg.assumeIssueOne and ( md.issue is None or md.issue == ""):
|
||||
@ -1559,18 +1557,16 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
if choices:
|
||||
self.autoTagLog( "Online search: Multiple matches. Save aborted\n" )
|
||||
match_results.multipleMatches.append(MultipleMatch(ca,matches))
|
||||
elif low_confidence:
|
||||
if dlg.autoSaveOnLow:
|
||||
self.autoTagLog( "Online search: Low confidence match, but saving anyways...\n" )
|
||||
else:
|
||||
self.autoTagLog( "Online search: Low confidence match. Save aborted\n" )
|
||||
match_results.noMatches.append(ca.path)
|
||||
elif low_confidence and not dlg.autoSaveOnLow:
|
||||
self.autoTagLog( "Online search: Low confidence match. Save aborted\n" )
|
||||
match_results.noMatches.append(ca.path)
|
||||
elif not found_match:
|
||||
self.autoTagLog( "Online search: No match found. Save aborted\n" )
|
||||
match_results.noMatches.append(ca.path)
|
||||
else:
|
||||
|
||||
# a single match!
|
||||
if low_confidence:
|
||||
self.autoTagLog( "Online search: Low confidence match, but saving anyways, as incdicated...\n" )
|
||||
|
||||
# now get the particular issue data
|
||||
cv_md = self.actualIssueDataFetch( matches[0] )
|
||||
@ -1583,9 +1579,12 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
|
||||
if not ca.writeMetadata( md, self.save_data_style ):
|
||||
match_results.writeFailures.append(ca.path)
|
||||
self.autoTagLog( "Save failed ;-(\n" )
|
||||
else:
|
||||
match_results.goodMatches.append(ca.path)
|
||||
success = True
|
||||
self.autoTagLog( "Save complete!\n" )
|
||||
|
||||
return success, match_results
|
||||
|
||||
def autoTag( self ):
|
||||
@ -1607,10 +1606,8 @@ class TaggerWindow( QtGui.QMainWindow):
|
||||
if not atstartdlg.exec_():
|
||||
return
|
||||
|
||||
|
||||
self.atprogdialog = AutoTagProgressWindow( self)
|
||||
self.atprogdialog.setModal(True)
|
||||
#self.progdialog.rejected.connect( self.identifyCancel )
|
||||
self.atprogdialog.show()
|
||||
self.atprogdialog.progressBar.setMaximum( len(ca_list) )
|
||||
self.atprogdialog.setWindowTitle( "Auto-Tagging" )
|
||||
|
28
todo.txt
28
todo.txt
@ -1,26 +1,24 @@
|
||||
-----------------------------------------------------
|
||||
Features
|
||||
-----------------------------------------------------
|
||||
|
||||
Multi-file:
|
||||
|
||||
Batch Functions:
|
||||
Auto-Tag
|
||||
Interactive dialog at end
|
||||
Manually change cover image on left??
|
||||
|
||||
Rename
|
||||
check-box for rows?
|
||||
manual edit the preview?
|
||||
|
||||
Rename dialog:
|
||||
check-box for rows?
|
||||
manual edit the preview?
|
||||
|
||||
Docs:
|
||||
Auto-Tagging Tips:
|
||||
Multiple Passes with different options
|
||||
|
||||
|
||||
Look into using libarchive
|
||||
|
||||
-----------------------------------------------------
|
||||
Bugs
|
||||
spider-man 678 .... ascii print problem. grrrr
|
||||
Bugs
|
||||
-----------------------------------------------------
|
||||
RAR Password -- childrens crusade 3
|
||||
Auto-Tag doesn't save page list info!
|
||||
|
||||
Rar flakes out when a space is at the front of the subfolder in the archive.
|
||||
Zip flakes out when filename differs from index (or whatever) i.e "\" vs "/". Python issue
|
||||
|
||||
-----------------------------------------------------
|
||||
Big Future Features
|
||||
|
Reference in New Issue
Block a user