<s> '''<STR_LIT>''' <EOL> from utils import sstr <EOL> class BookData ( object ) : <EOL> '''<STR_LIT>''' <EOL> def __init__ ( self ) : <EOL> self . __series_s = "<STR_LIT>" <EOL> self . __issue_num_s = "<STR_LIT>" <EOL> self . __volume_year_n = - <NUM_LIT:1> <EOL> self . __published_s = "<STR_LIT>" <EOL> self . __released_s = "<STR_LIT>" <EOL> self . __pub_year_n = - <NUM_LIT:1> <EOL> self . __pub_month_n = - <NUM_LIT:1> <EOL> self . __pub_day_n = - <NUM_LIT:1> <EOL> self . __rel_year_n = - <NUM_LIT:1> <EOL> self . __rel_month_n = - <NUM_LIT:1> <EOL> self . __rel_day_n = - <NUM_LIT:1> <EOL> self . __format_s = "<STR_LIT>" <EOL> self . __title_s = "<STR_LIT>" <EOL> self . __crossovers_sl = [ ] <EOL> self . __summary_s = "<STR_LIT>" <EOL> self . __publisher_s = "<STR_LIT>" <EOL> self . __imprint_s = "<STR_LIT>" <EOL> self . __characters_sl = [ ] <EOL> self . __teams_sl = [ ] <EOL> self . __locations_sl = [ ] <EOL> self . __writers_sl = [ ] <EOL> self . __pencillers_sl = [ ] <EOL> self . __inkers_sl = [ ] <EOL> self . __colorists_sl = [ ] <EOL> self . __letterers_sl = [ ] <EOL> self . __cover_artists_sl = [ ] <EOL> self . __editors_sl = [ ] <EOL> self . __tags_sl = [ ] <EOL> self . __notes_s = "<STR_LIT>" <EOL> self . __path_s = "<STR_LIT>" <EOL> self . __webpage_s = "<STR_LIT>" <EOL> self . __cover_url_s = "<STR_LIT>" <EOL> self . __rating_n = <NUM_LIT:0.0> <EOL> self . __page_count_n = <NUM_LIT:0> <EOL> self . __issue_key_s = "<STR_LIT>" <EOL> self . __series_key_s = "<STR_LIT>" <EOL> self . __updated_properties = BookData . all_properties ( ) ; <EOL> self . dont_update ( "<STR_LIT>" ) <EOL> self . dont_update ( "<STR_LIT>" ) <EOL> def update ( self ) : <EOL> '''<STR_LIT>''' <EOL> pass <EOL> def updated_properties ( self ) : <EOL> '''<STR_LIT>''' <EOL> return set ( self . __updated_properties ) <EOL> def dont_update ( self , property ) : <EOL> '''<STR_LIT>''' <EOL> if property in self . __updated_properties : <EOL> self . __updated_properties . remove ( property ) <EOL> elif not property in BookData . __dict__ : <EOL> raise Exception ( "<STR_LIT>" + property ) <EOL> def create_image_of_page ( self , page_index ) : <EOL> '''<STR_LIT>''' <EOL> return None <EOL> @ classmethod <EOL> def all_properties ( cls ) : <EOL> '''<STR_LIT>''' <EOL> return [ x for x in cls . __dict__ if <EOL> x [ <NUM_LIT:0> ] != '<STR_LIT:_>' and isinstance ( cls . __dict__ [ x ] , property ) ] <EOL> @ classmethod <EOL> def blank ( cls , property ) : <EOL> '''<STR_LIT>''' <EOL> if not hasattr ( cls , "<STR_LIT>" ) : <EOL> book = BookData ( ) <EOL> cls . __BLANKMAP = { x : getattr ( book , x ) for x in cls . all_properties ( ) } <EOL> for prop in cls . __BLANKMAP . values ( ) : <EOL> if prop == None : raise Exception ( "<STR_LIT>" ) <EOL> return cls . __BLANKMAP [ property ] <EOL> def __set_series_s ( self , series_s = None ) : <EOL> self . __series_s = BookData . blank ( "<STR_LIT>" ) if series_s is None else series_s . strip ( ) <EOL> series_s = property ( lambda self : self . __series_s , <EOL> __set_series_s , __set_series_s , <EOL> "<STR_LIT>" ) <EOL> def __set_issue_num_s ( self , issue_num_s = None ) : <EOL> self . __issue_num_s = BookData . blank ( "<STR_LIT>" ) if issue_num_s is None else issue_num_s . strip ( ) <EOL> issue_num_s = property ( lambda self : self . __issue_num_s , <EOL> __set_issue_num_s , __set_issue_num_s , <EOL> "<STR_LIT>" ) <EOL> def __set_title_s ( self , title_s = None ) : <EOL> self . __title_s = BookData . blank ( "<STR_LIT>" ) if title_s is None else title_s . strip ( ) ; <EOL> title_s = property ( lambda self : self . __title_s , <EOL> __set_title_s , __set_title_s , <EOL> "<STR_LIT>" ) <EOL> def __set_crossovers_sl ( self , crossovers_sl = None ) : <EOL> self . __crossovers_sl = BookData . blank ( "<STR_LIT>" ) if crossovers_sl == None else [ x . strip ( ) for x in crossovers_sl if x != None and len ( x . strip ( ) ) > <NUM_LIT:0> ] <EOL> crossovers_sl = property ( lambda self : list ( self . __crossovers_sl ) , <EOL> __set_crossovers_sl , __set_crossovers_sl , <EOL> "<STR_LIT>" ) <EOL> def __set_summary_s ( self , summary_s = None ) : <EOL> self . __summary_s = BookData . blank ( "<STR_LIT>" ) if summary_s is None else summary_s . strip ( ) ; <EOL> summary_s = property ( lambda self : self . __summary_s , <EOL> __set_summary_s , __set_summary_s , <EOL> "<STR_LIT>" ) <EOL> def __set_pub_year_n ( self , pub_year_n = None ) : <EOL> pub_year_n = - <NUM_LIT:1> if pub_year_n is None else int ( pub_year_n ) <EOL> self . __pub_year_n = pub_year_n if <NUM_LIT:0> < pub_year_n < <NUM_LIT> else BookData . blank ( "<STR_LIT>" ) <EOL> pub_year_n = property ( lambda self : self . __pub_year_n , <EOL> __set_pub_year_n , __set_pub_year_n , <EOL> "<STR_LIT>" ) <EOL> def __set_pub_month_n ( self , pub_month_n = None ) : <EOL> pub_month_n = - <NUM_LIT:1> if pub_month_n is None else int ( pub_month_n ) <EOL> self . __pub_month_n = pub_month_n if <NUM_LIT:1> <= pub_month_n <= <NUM_LIT:12> else BookData . blank ( "<STR_LIT>" ) <EOL> pub_month_n = property ( lambda self : self . __pub_month_n , <EOL> __set_pub_month_n , __set_pub_month_n , <EOL> "<STR_LIT>" ) <EOL> def __set_pub_day_n ( self , pub_day_n = None ) : <EOL> pub_day_n = - <NUM_LIT:1> if pub_day_n is None else int ( pub_day_n ) <EOL> self . __pub_day_n = pub_day_n if pub_day_n >= <NUM_LIT:0> else BookData . blank ( "<STR_LIT>" ) <EOL> pub_day_n = property ( lambda self : self . __pub_day_n , <EOL> __set_pub_day_n , __set_pub_day_n , <EOL> "<STR_LIT>" ) <EOL> def __set_rel_year_n ( self , rel_year_n = None ) : <EOL> rel_year_n = - <NUM_LIT:1> if rel_year_n is None else int ( rel_year_n ) <EOL> self . __rel_year_n = rel_year_n if <NUM_LIT:0> < rel_year_n < <NUM_LIT> else BookData . blank ( "<STR_LIT>" ) <EOL> rel_year_n = property ( lambda self : self . __rel_year_n , <EOL> __set_rel_year_n , __set_rel_year_n , <EOL> "<STR_LIT>" ) <EOL> def __set_rel_month_n ( self , rel_month_n = None ) : <EOL> rel_month_n = - <NUM_LIT:1> if rel_month_n is None else int ( rel_month_n ) <EOL> self . __rel_month_n = rel_month_n if <NUM_LIT:1> <= rel_month_n <= <NUM_LIT:12> else BookData . blank ( "<STR_LIT>" ) <EOL> rel_month_n = property ( lambda self : self . __rel_month_n , <EOL> __set_rel_month_n , __set_rel_month_n , <EOL> "<STR_LIT>" ) <EOL> def __set_rel_day_n ( self , rel_day_n = None ) : <EOL> rel_day_n = - <NUM_LIT:1> if rel_day_n is None else int ( rel_day_n ) <EOL> self . __rel_day_n = rel_day_n if rel_day_n >= <NUM_LIT:0> else BookData . blank ( "<STR_LIT>" ) <EOL> rel_day_n = property ( lambda self : self . __rel_day_n , <EOL> __set_rel_day_n , __set_rel_day_n , <EOL> "<STR_LIT>" ) <EOL> def __set_volume_year_n ( self , volume_year_n = None ) : <EOL> volume_year_n = - <NUM_LIT:1> if volume_year_n is None else int ( volume_year_n ) <EOL> self . __volume_year_n = volume_year_n if volume_year_n >= <NUM_LIT:0> else BookData . blank ( "<STR_LIT>" ) <EOL> volume_year_n = property ( lambda self : self . __volume_year_n , <EOL> __set_volume_year_n , __set_volume_year_n , <EOL> "<STR_LIT>" ) <EOL> def __set_format_s ( self , format_s = None ) : <EOL> self . __format_s = BookData . blank ( "<STR_LIT>" ) if format_s is None else format_s . strip ( ) ; <EOL> format_s = property ( lambda self : self . __format_s , <EOL> __set_format_s , __set_format_s , <EOL> "<STR_LIT>" ) <EOL> def __set_imprint_s ( self , imprint_s = None ) : <EOL> self . __imprint_s = BookData . blank ( "<STR_LIT>" ) if imprint_s is None else imprint_s . strip ( ) ; <EOL> imprint_s = property ( lambda self : self . __imprint_s , <EOL> __set_imprint_s , __set_imprint_s , <EOL> "<STR_LIT>" ) <EOL> def __set_publisher_s ( self , publisher_s = None ) : <EOL> self . __publisher_s = BookData . blank ( "<STR_LIT>" ) if publisher_s is None else publisher_s . strip ( ) ; <EOL> publisher_s = property ( lambda self : self . __publisher_s , <EOL> __set_publisher_s , __set_publisher_s , <EOL> "<STR_LIT>" ) <EOL> def __set_characters_sl ( self , characters_sl = None ) : <EOL> self . __characters_sl = BookData . blank ( "<STR_LIT>" ) if characters_sl == None else [ x . strip ( ) for x in characters_sl if x != None and len ( x . strip ( ) ) > <NUM_LIT:0> ] <EOL> characters_sl = property ( lambda self : list ( self . __characters_sl ) , <EOL> __set_characters_sl , __set_characters_sl , <EOL> "<STR_LIT>" ) <EOL> def __set_teams_sl ( self , teams_sl = None ) : <EOL> self . __teams_sl = BookData . blank ( "<STR_LIT>" ) if teams_sl == None else [ x . strip ( ) for x in teams_sl if x != None and len ( x . strip ( ) ) > <NUM_LIT:0> ] <EOL> teams_sl = property ( lambda self : list ( self . __teams_sl ) , <EOL> __set_teams_sl , __set_teams_sl , <EOL> "<STR_LIT>" ) <EOL> def __set_locations_sl ( self , locations_sl = None ) : <EOL> self . __locations_sl = BookData . blank ( "<STR_LIT>" ) if locations_sl == None else [ x . strip ( ) for x in locations_sl if x != None and len ( x . strip ( ) ) > <NUM_LIT:0> ] <EOL> locations_sl = property ( lambda self : list ( self . __locations_sl ) , <EOL> __set_locations_sl , __set_locations_sl , <EOL> "<STR_LIT>" ) <EOL> def __set_writers_sl ( self , writers_sl = None ) : <EOL> self . __writers_sl = BookData . blank ( "<STR_LIT>" ) if writers_sl == None else [ x . strip ( ) for x in writers_sl if x != None and len ( x . strip ( ) ) > <NUM_LIT:0> ] <EOL> writers_sl = property ( lambda self : list ( self . __writers_sl ) , <EOL> __set_writers_sl , __set_writers_sl , <EOL> "<STR_LIT>" ) <EOL> def __set_pencillers_sl ( self , pencillers_sl = None ) : <EOL> self . __pencillers_sl = BookData . blank ( "<STR_LIT>" ) if pencillers_sl == None else [ x . strip ( ) for x in pencillers_sl <EOL> if x != None and len ( x . strip ( ) ) > <NUM_LIT:0> ] <EOL> pencillers_sl = property ( lambda self : list ( self . __pencillers_sl ) , <EOL> __set_pencillers_sl , __set_pencillers_sl , <EOL> "<STR_LIT>" ) <EOL> def __set_inkers_sl ( self , inkers_sl = None ) : <EOL> self . __inkers_sl = BookData . blank ( "<STR_LIT>" ) if inkers_sl == None else [ x . strip ( ) for x in inkers_sl if x != None and len ( x . strip ( ) ) > <NUM_LIT:0> ] <EOL> inkers_sl = property ( lambda self : list ( self . __inkers_sl ) , <EOL> __set_inkers_sl , __set_inkers_sl , <EOL> "<STR_LIT>" ) <EOL> def __set_colorists_sl ( self , colorists_sl = None ) : <EOL> self . __colorists_sl = BookData . blank ( "<STR_LIT>" ) if colorists_sl == None else [ x . strip ( ) for x in colorists_sl <EOL> if x != None and len ( x . strip ( ) ) > <NUM_LIT:0> ] <EOL> colorists_sl = property ( lambda self : list ( self . __colorists_sl ) , <EOL> __set_colorists_sl , __set_colorists_sl , <EOL> "<STR_LIT>" ) <EOL> def __set_letterers_sl ( self , letterers_sl = None ) : <EOL> self . __letterers_sl = BookData . blank ( "<STR_LIT>" ) if letterers_sl == None else [ x . strip ( ) for x in letterers_sl <EOL> if x != None and len ( x . strip ( ) ) > <NUM_LIT:0> ] <EOL> letterers_sl = property ( lambda self : list ( self . __letterers_sl ) , <EOL> __set_letterers_sl , __set_letterers_sl , <EOL> "<STR_LIT>" ) <EOL> def __set_cover_artists_sl ( self , cover_artists_sl = None ) : <EOL> self . __cover_artists_sl = BookData . blank ( "<STR_LIT>" ) if cover_artists_sl == None else [ x . strip ( ) for x in cover_artists_sl <EOL> if x != None and len ( x . strip ( ) ) > <NUM_LIT:0> ] <EOL> cover_artists_sl = property ( lambda self : list ( self . __cover_artists_sl ) , <EOL> __set_cover_artists_sl , __set_cover_artists_sl , <EOL> "<STR_LIT>" ) <EOL> def __set_editors_sl ( self , editors_sl = None ) : <EOL> self . __editors_sl = BookData . blank ( "<STR_LIT>" ) if editors_sl == None else [ x . strip ( ) for x in editors_sl <EOL> if x != None and len ( x . strip ( ) ) > <NUM_LIT:0> ] <EOL> editors_sl = property ( lambda self : list ( self . __editors_sl ) , <EOL> __set_editors_sl , __set_editors_sl , <EOL> "<STR_LIT>" ) <EOL> def __set_webpage_s ( self , webpage_s = None ) : <EOL> self . __webpage_s = BookData . blank ( "<STR_LIT>" ) if webpage_s is None else webpage_s . strip ( ) ; <EOL> webpage_s = property ( lambda self : self . __webpage_s , <EOL> __set_webpage_s , __set_webpage_s , <EOL> "<STR_LIT>" ) <EOL> def __set_cover_url_s ( self , cover_url_s = None ) : <EOL> self . __cover_url_s = BookData . blank ( "<STR_LIT>" ) if cover_url_s is None else cover_url_s . strip ( ) ; <EOL> cover_url_s = property ( lambda self : self . __cover_url_s , <EOL> __set_cover_url_s , __set_cover_url_s , <EOL> "<STR_LIT>" ) <EOL> def __set_tags_sl ( self , tags_sl = None ) : <EOL> self . __tags_sl = BookData . blank ( "<STR_LIT>" ) if tags_sl == None else [ x . strip ( ) for x in tags_sl if x != None and len ( x . strip ( ) ) > <NUM_LIT:0> ] <EOL> tags_sl = property ( lambda self : list ( self . __tags_sl ) , <EOL> __set_tags_sl , __set_tags_sl , <EOL> "<STR_LIT>" ) <EOL> def __set_notes_s ( self , notes_s = None ) : <EOL> self . __notes_s = BookData . blank ( "<STR_LIT>" ) if notes_s is None else notes_s . strip ( ) ; <EOL> notes_s = property ( lambda self : self . __notes_s , <EOL> __set_notes_s , __set_notes_s , <EOL> "<STR_LIT>" ) <EOL> def __set_rating_n ( self , rating_n = None ) : <EOL> rating_n = - <NUM_LIT:1> if rating_n is None else float ( rating_n ) <EOL> self . __rating_n = rating_n if rating_n <= <NUM_LIT> and rating_n >= <NUM_LIT:0.0> else BookData . blank ( "<STR_LIT>" ) ; <EOL> rating_n = property ( lambda self : self . __rating_n , <EOL> __set_rating_n , __set_rating_n , <EOL> "<STR_LIT>" ) <EOL> def __set_path_s ( self , path_s = None ) : <EOL> self . __path_s = BookData . blank ( "<STR_LIT>" ) if path_s is None else path_s . strip ( ) ; <EOL> path_s = property ( lambda self : self . __path_s , __set_path_s , <EOL> __set_path_s , '<STR_LIT>' + <EOL> '<STR_LIT>' ) <EOL> def __set_page_count_n ( self , page_count_n = None ) : <EOL> page_count_n = - <NUM_LIT:1> if page_count_n is None else int ( page_count_n ) <EOL> self . __page_count_n = page_count_n if page_count_n >= <NUM_LIT:0> else BookData . blank ( "<STR_LIT>" ) <EOL> page_count_n = property ( lambda self : self . __page_count_n , <EOL> __set_page_count_n , __set_page_count_n , <EOL> "<STR_LIT>" ) <EOL> def __set_issue_key_s ( self , issue_key_s = None ) : <EOL> self . __issue_key_s = BookData . blank ( "<STR_LIT>" ) if issue_key_s is None else sstr ( issue_key_s ) . strip ( ) <EOL> issue_key_s = property ( lambda self : self . __issue_key_s , <EOL> __set_issue_key_s , __set_issue_key_s , <EOL> "<STR_LIT>" ) <EOL> def __set_series_key_s ( self , series_key_s = None ) : <EOL> self . __series_key_s = BookData . blank ( "<STR_LIT>" ) if series_key_s is None else sstr ( series_key_s ) . strip ( ) <EOL> series_key_s = property ( lambda self : self . __series_key_s , <EOL> __set_series_key_s , __set_series_key_s , <EOL> "<STR_LIT>" ) </s>
