Just like you would normally (by defining _init_.py in each sub-folder), and everything should “just work”. You can create packages and subpackages of. Some_module refers to some_module.py file inside the ZIP file. some_name comes from the filename of the empty text file. The prefix calibre_plugins must always be present. The first thing to note is that this ZIP file has a lot more files in it, explained below, pay particular attention toįrom calibre_plugins.some_name.some_module import some_object You can download this plugin from interface_demo_plugin.zip How to create elements in the calibre user interface and how to access (images or data files) from the plugin ZIP file, allow users to configure your plugin, This plugin will be spread over a few files (to keep the code clean). This is a trivial plugin, lets move on toĪ more complex example that actually adds a component to the user interface. You can download the Hello World plugin fromĮvery time you use calibre to convert a book, the plugin’s run() method will be called and theĬonverted book will have its publisher set to “Hello World”. If you installed calibre in /Applications the command line toolsĪre in /Applications/calibre.app/Contents/MacOS/. On macOS, the command line tools are inside the calibre bundle, for example, The folder in which you created _init_.py: To add this code to calibre as a plugin, simply run the following in publisher = 'Hello World' set_metadata ( file, mi, ext ) return path_to_ebook lower () mi = get_metadata ( file, ext ) mi. From calibre.customize import FileTypePlugin class HelloWorld ( FileTypePlugin ): name = 'Hello World Plugin' # Name of the plugin description = 'Set the publisher to Hello World for all new conversions' supported_platforms = # Platforms this plugin will run on author = 'Acme Inc.' # The author of this plugin version = ( 1, 0, 0 ) # The version number of this plugin file_types = # The file types that this plugin will be applied to on_postprocess = True # Run this plugin after conversion is complete minimum_calibre_version = ( 0, 7, 53 ) def run ( self, path_to_ebook ): from import get_metadata, set_metadata with open ( path_to_ebook, 'r+b' ) as file : ext = os.
0 Comments
But if you find other transcoding tools to be a little basic, then StaxRip's extreme configurability means it's definitely worth a few minutes of your time. Video conversion novices will quickly become confused by all the options and jargon flying around here, then. (If you care about XviD's quantization settings, for example, then good news: you can set them all here.) Choose an input file, an output format and the program will use reasonable defaults for everything else.īut if you need more power, then you're also able to apply filters, set your pixel aspect ratio, decide which encoder you'd like to use for a particular task, pick the most appropriate audio and video codec, then configure all of them in extreme detail. You don't have to get involved in its more complex depths. (Don't worry, there's no massive installer, you just unzip them and go.)Īnd StaxRip itself acts as a front end, allowing you to configure precisely how its various components work. The conversion process itself is carried out by a host of free and open source tools which come bundled with the program: AviSynth, FFmpeg, MKVtoolnix, VirtualDubMod and many more. With StaxRip you can easily convert your DVDs and many more formats into MPEG-4 like XviD, x264/H264/AVC. The program can import a lengthy list of source video formats, for instance: 264, AVC, AVI, AVS, D2V, DGA, DGI, DIVX, FLV, H264, M2V, M2T, M2TS, MKV, MP4, MPEG, MPV, MOV, OGM, OGG, PVA, RMVB, TS, VOB, WEBM and WMV.Īnd these can then be converted to general MP4 files, MP4's optimised for the iPod/ iPhone, and a few other formats: MKV, AVI, WebM and so StaxRip is a multiformat video encoding application. StaxRip is a powerful tool for converting videos to MP4, which offers far more options and control than most of the competition. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |