Renamed test script to inventory
git-svn-id: http://comictagger.googlecode.com/svn/trunk@486 6c5673fe-1810-88d6-992b-cd32ca31540c
This commit is contained in:
parent
42feae53dd
commit
c6741d4392
@ -9,7 +9,7 @@ import platform
|
||||
import locale
|
||||
import codecs
|
||||
|
||||
sys.path += ".." + os.pathsep
|
||||
sys.path.append("..")
|
||||
|
||||
from comictaggerlib.comicarchive import *
|
||||
from comictaggerlib.settings import *
|
||||
@ -26,10 +26,16 @@ def main():
|
||||
|
||||
#first read in CIX metadata from all files
|
||||
metadata_list = []
|
||||
max_name_len = 2
|
||||
for filename in filelist:
|
||||
ca = ComicArchive(filename, settings )
|
||||
metadata_list.append((filename, ca.readCIX()))
|
||||
|
||||
fmt_str = u"{{0:{0}}}".format(max_name_len)
|
||||
print fmt_str.format( filename ) + "\r",
|
||||
sys.stdout.flush()
|
||||
print fmt_str.format( "" ) + "\r",
|
||||
|
||||
# now, figure out column widths
|
||||
w0 = 4
|
||||
w1 = 4
|
||||
@ -43,7 +49,7 @@ def main():
|
||||
# build a format string
|
||||
fmt_str = "{0:" + str(w0) + "} {1:" + str(w1) + "} #{2:6} ({3})"
|
||||
|
||||
# now sort the list by year
|
||||
# now sort the list by series, and then issue
|
||||
metadata_list.sort(key=lambda x: IssueString(x[1].issue).asString(3), reverse=False)
|
||||
metadata_list.sort(key=lambda x: str(x[1].series).lower()+str(x[1].year), reverse=False)
|
||||
#metadata_list.sort(key=lambda x: x[1].series, reverse=False)
|
Loading…
Reference in New Issue
Block a user