Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- from calibre.customize import CatalogPlugin
- class VirtualShelf(CatalogPlugin):
- name = 'Virtual Shelf plugin'
- description = 'Generates an HTML like a traditional shelf'
- supported_platforms = ['windows', 'osx', 'linux']
- author = 'Carles Pina i Estany'
- version = (0, 0, 1)
- file_types = set(['html'])
- cli_options = []
- minimum_calibre_version = (0, 7, 53)
- def run(self, path_to_output, opts, db, Notification=None):
- print "VirtualShelf"
- print "db:",db
- print "opts:",opts
- file = open(path_to_output, 'w')
- opts.sort_by="author"
- data = self.search_sort_db(db, opts)
- for entry in data:
- file.write("title:"+entry['title'] + "\n")
- return path_to_output
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement