Added preservation page data in CIX block

git-svn-id: http://comictagger.googlecode.com/svn/trunk@64 6c5673fe-1810-88d6-992b-cd32ca31540c
This commit is contained in:
beville@gmail.com 2012-11-20 00:04:20 +00:00
parent 00e4f30c60
commit a7a8bb61d6
4 changed files with 29 additions and 16 deletions

View File

@ -182,8 +182,12 @@ class ComicInfoXml:
node = ET.SubElement(root, 'Editor')
node.text = utils.listToString( credit_editor_list )
# !!!ATB todo: loop and add the page entries under pages node
#pages = ET.SubElement(root, 'Pages')
# loop and add the page entries under pages node
if len( md.pages ) > 0:
pages_node = ET.SubElement(root, 'Pages')
for page_dict in md.pages:
page_node = ET.SubElement(pages_node, 'Page')
page_node.attrib = page_dict
# self pretty-print
self.indent(root)
@ -261,9 +265,13 @@ class ComicInfoXml:
for name in n.text.split(','):
metadata.addCredit( name.strip(), "Cover" )
#!!! ATB parse page data now
# parse page data now
pages_node = root.find( "Pages" )
if pages_node is not None:
for page in pages_node:
metadata.pages.append( page.attrib )
print metadata.pages
metadata.isEmpty = False

View File

@ -40,15 +40,16 @@ class PageType:
Other = "Other"
Deleted = "Deleted"
"""
class PageInfo:
SeqNum = 0
Type = PageType.FrontCover
Image = 0
Type = PageType.Story
DoublePage = False
ImageSize = 0
Key = ""
ImageWidth = 0
ImageHeight = 0
"""
class GenericMetadata:

View File

@ -47,6 +47,8 @@ If no options are given, {0} will run in windowed mode
-p, --print Print out tag info from file. Specify type
(via -t) to get only info of that tag type
--raw With -p, will print out the raw tag block(s)
from the file
-d, --delete Deletes the tag block of specified type (via -t)
-s, --save Save out tags as specified type (via -t)
Must specify also at least -o, -p, or -m

View File

@ -1,7 +1,9 @@
-----------------
Features
----------------
Raw Tag Block Window
Settings/Preferences Dialog
Remove API Key
Add clear cache
@ -16,14 +18,6 @@ save Last "Open" folder (include dragged)
Add class for warning/info messages with "Don't show again" checkbox.
Add list of these flags to settings
TaggerWindow entry fields
Special tabbed Dialog needed for:
Pages Info - maybe a custom painted widget
At minimum, preserve the page data
File rename
-Dialog??
Style sheets for windows/mac/linux
Better stripping of html from CV text
@ -60,6 +54,14 @@ Lots of error checking
Future
------------
File rename
-Dialog??
TaggerWindow entry fields
Special tabbed Dialog needed for:
Pages Info - maybe a custom painted widget
CLI
write a log for multiple file processing
override abort on low confidence flag