![]() Template can contain placeholders, path delimiters, and any other characters that are included in the output without modification. get_filename_by_pattern(filename_pattern, author_pattern) get_filename_by_pattern - returns the file name generated based on the metadata according to the given template.set_tag_list_from_string - sets tags list from comma-separated string.set_translator_list_from_string - sets translators list from comma-separated string.set_author_list_from_string - sets authors list from comma-separated string.tag_description_list_to_string - for fb2 return tag description list as comma-separated string, for epub same tag_list_to_string data.tag_list_to_string - return tag list as comma-separated string.translator_list_to_string - return translators list as comma-separated string.author_list_to_string - return authors list as comma-separated string.publish_ires_index - original book series index.publish_info.isbn - International Standard Book Number (ISBN).publish_info.year - year of publication book.publish_info.city - city where original book was published.publish_info.publisher - original book bublisher.publish_info.title - published book title.file_modified - file modification time in ISO datetime format.file_created - file creation time in ISO datetime format.cover_media_type - cover media type (possible image/jpeg, image/png).cover_image_data - cover image byte array.format_version - format specification version.translators - book translators (if exists).set_metadata ( 'test.epub', meta ) # Set epub metadata from Metadata class Metadata class Attributes authors : print ( author ) Writing import ebookmeta meta = ebookmeta. get_metadata ( 'test.epub' ) # returning Metadata class print ( meta. Usage Reading import ebookmeta meta = ebookmeta. This library used in my other project Libro2 - GUI tool for editing metadata, rename and convert to other formats for ebook files. There is a limitation for epub files: you can't add cover if it doesn't exist in file. You must ensure that this data is correct. When changing the cover, the library does not check whether the image byte array matches the media type. It is possible to write all fields, excluding description and identifier. ![]() The following fields can be read: identifier, title, authors, tags, book series and series index, language, description, translators, and cover data (image as byte array, file name, and media type). ![]() Library allows you to read and write some of the metadata fields of epub2, epub3 and fb2 files. Ebookmeta is a Python library for managing epub2, epub3 and fb2 files metadata.
0 Comments
Leave a Reply. |