Fix typo in Hello World plugin

This commit is contained in:
Kovid Goyal 2009-01-03 09:28:30 -08:00
parent cabb094390
commit 5d91e50f52
2 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ def get_metadata(stream, stream_type='lrf', use_libprs_metadata=False):
return base
def set_metadata(stream, mi, stream_type='lrf'):
if stream_type:
if stream_type:
stream_type = stream_type.lower()
set_file_type_metadata(stream, mi, stream_type)

View File

@ -46,7 +46,7 @@ Create a file name :file:`my_plugin.py` (the file name must end with plugin.py)
ext = os.path.splitext(path_to_ebook)[-1][1:].lower()
mi = get_metadata(file, ext)
mi.publisher = 'Hello World'
set_metadata(file, ext, mi)
set_metadata(file, mi, ext)
return path_to_ebook
That's all. To add this code to |app| as a plugin, simply create a zip file with::