Manual de Calibre | Page 175

Manual de usuario de calibre, Publicación 2.73.0 standard_field_keys() return a list of all possible keys, even if this book doesn’t have them custom_field_keys() return a list of the custom fields in this book all_field_keys() All field keys known by this instance, even if their value is None metadata_for_field(key) return metadata describing a standard or custom field. all_non_none_fields() Return a dictionary containing all non-None metadata fields, including the custom ones. get_standard_metadata(field, make_copy) return field metadata from the field if it is there. Otherwise return None. field is the key name, not the label. Return a copy if requested, just in case the user wants to change values in the dict. get_all_standard_metadata(make_copy) return a dict containing all the standard field metadata associated with the book. get_all_user_metadata(make_copy) return a dict containing all the custom field metadata associated with the book. get_user_metadata(field, make_copy) return field metadata from the object if it is there. Otherwise return None. field is the key name, not the label. Return a copy if requested, just in case the user wants to change values in the dict. set_all_user_metadata(metadata) store custom field metadata into the object. Field is the key name not the label set_user_metadata(field, metadata) store custom field metadata for one column into the object. Field is the key name not the label template_to_attribute(other, ops) Takes a list [(src,dest), (src,dest)], evaluates the template in the context of other, then copies the result to self[dest]. This is on a best-efforts basis. Some assignments can make no sense. smart_update(other, replace_metadata=False) Merge the information in other into self. In case of conflicts, the information in other takes precedence, unless the information in other is NULL. format_field(key, series_with_index=True) Returns the tuple (display_name, formatted_value) to_html() A HTML representation of this object. calibre.ebooks.metadata.book.base.STANDARD_METADATA_FIELDS The set of standard metadata fields. ''' All fields must have a NULL value represented as None for simple types, an empty list/dictionary for complex types and (None, None) for cover_data ''' SOCIAL_METADATA_FIELDS = frozenset([ 'tags', # Ordered list 'rating', # A floating point number between 0 and 10 'comments', # A simple HTML enabled string 1.9. Cursillos 171