calibre has a highly modular design. Various parts of it can be customized. You can learn how to createrecipes to add new sources of online content to calibre in the Section Adding your favorite news website. Here, you will learn,first, how to use environment variables and tweaks to customize calibre’s behavior, and then how tospecify your own static resources like icons and templates to override the defaults and finally how touse plugins to add functionality to calibre.
CALIBRE_CONFIG_DIRECTORY
- sets the folder where configuration files are stored/read.CALIBRE_TEMP_DIR
- sets the temporary folder used by calibreCALIBRE_CACHE_DIRECTORY
- sets the folder calibre uses to cache persistent data between sessionsCALIBRE_OVERRIDE_DATABASE_PATH
- allows you to specify the full path to metadata.db. Using this variable you can have metadata.db be in a location other than the library folder. Useful if your library folder is on a networked drive that does not support file locking.CALIBRE_DEVELOP_FROM
- used to run from a calibre development environment. See Setting up a calibre development environment.CALIBRE_OVERRIDE_LANG
- used to force the language used by the interface (ISO 639 language code)CALIBRE_TEST_TRANSLATION
- used to test a translation .po file (should be the path to the .po file)CALIBRE_NO_NATIVE_FILEDIALOGS
- causes calibre to not use native file dialogs for selecting files/folders.CALIBRE_NO_NATIVE_MENUBAR
- causes calibre to not create a native (global) menu on Ubuntu Unity and similar linux desktop environments. The menu is instead placed inside the window, as is traditional.CALIBRE_USE_SYSTEM_THEME
- by default, on Linux, calibre uses its ownbuiltin Qt style. This is to avoid crashes and hangs caused by incompatibilitiesbetween the version of Qt calibre is built against and the system Qt. Thedownside is that calibre may not follow the system look and feel. Ifyou set this environment variable on Linux, it will cause calibre to usethe system theme – beware of crashes and hangs.CALIBRE_SHOW_DEPRECATION_WARNINGS
- causes calibre to print deprecation warnings to stdout. Useful for calibre developers.CALIBRE_NO_DEFAULT_PROGRAMS
- prevent calibre from automatically registering the filetypes it is capable of handling with Windows.CALIBRE_USE_DARK_PALETTE
- set it to1
to have calibre use dark colors and0
for normal colors (ignored on macOS).On Windows 10 in the absence of this variable, the Windows system preference for dark colors is used.SYSFS_PATH
- Use if sysfs is mounted somewhere other than /syshttp_proxy
,https_proxy
- used on Linux to specify an HTTP(S) proxy
See How to set environment variables in Windows. If you are on macOSyou can set environment variables by creating the ~/Library/Preferences/calibre/macos-env.txt
and puttingthe environment variables one per line in it, for example:
Tweaks are small changes that you can specify to control various aspects of calibre’s behavior. You can change them by going to Preferences->Advanced->Tweaks.The default values for the tweaks are reproduced below
Note
Sep 26, 2020 Calibre 5.0 is available for Windows 8 and up, Mac OS X, and Linux officially. Mobile users may connect their devices to Calibre to manage ebooks on these devices as well. Windows users can download an installer or a portable version. I'm using Calibre 5.0.0 on Ubuntu and I have no problem with a Chinese novel epub in vertical layout. The mouse cursor even turns sideways for selecting text and I can use the mouse scroll wheel without any modifier key to scroll left and right. Calibre needs GLIBC = 2.18 and libstdc = 6.0.21. If you have an older server, you will either need to compile these from source, or use calibre 3.48 which.
calibre has direct support for icon themes, there are several icon themesavailable for calibre, that you can use by going to Preferences → Interface → Look & Feel → Change Icon theme.The icon themes use the same mechanism as described below for overriding static resources.
calibre allows you to override the static resources, like icons, JavaScript andtemplates for the metadata jacket, catalogs, etc. with customized versions thatyou like. All static resources are stored in the resources sub-folder of thecalibre install location. On Windows, this is usually C:ProgramFilesCalibre2appresources
.On macOS, /Applications/calibre.app/Contents/Resources/resources/
. On Linux, ifyou are using the binary installer from the calibre website it will be/opt/calibre/resources
. These paths can change depending on where youchoose to install calibre.
You should not change the files in this resources folder, as your changes willget overwritten the next time you update calibre. Instead, go toPreferences → Advanced → Miscellaneous and clickOpen calibre configuration folder. In this configuration folder, create asub-folder called resources and place the files you want to override in it.Place the files in the appropriate sub folders, for example place images inresources/images
, etc. calibre will automatically use your custom filein preference to the built-in one the next time it is started.
For example, if you wanted to change the icon for the Remove booksaction, you would first look in the built-in resources folder and see that therelevant file is resources/images/remove_books.png
. Assuming you have analternate icon in PNG format called my_remove_books.png
you would save it inthe configuration folder as resources/images/remove_books.png
. All theicons used by the calibre user interface are in resources/images
andits sub-folders.
If you have created a beautiful set of icons and wish to share them with othercalibre users via calibre’s builtin icon theme support, you can easily packageup your icons into a theme. To do so, go toPreferences → Miscellaneous → Create icon theme, select the folderwhere you have put your icons (usually the resources/images
folder inthe calibre config folder, as described above). Then fill up the thememetadata and click OK. This will result in a ZIP file containing the themeicons. You can upload that to the calibre forum at Mobileread and then I willmake your theme available via calibre’s builtin icon theme system.
calibre has a very modular design. Almost all functionality in calibre comes in the form of plugins. Plugins are used for conversion, for downloading news (though these are called recipes), for various components of the user interface, to connect to different devices, to process files when adding them to calibre and so on. You can get a complete list of all the built-in plugins in calibre by going to Preferences → Advanced → Plugins.
You can write your own plugins to customize and extend the behavior of calibre. The plugin architecture in calibre is very simple, see the tutorial Writing your own plugins to extend calibre’s functionality.
Calibre Python 3
calibre has a highly modular design. Various parts of it can be customized. You can learn how to createrecipes to add new sources of online content to calibre in the Section Adding your favorite news website. Here, you will learn,first, how to use environment variables and tweaks to customize calibre’s behavior, and then how tospecify your own static resources like icons and templates to override the defaults and finally how touse plugins to add functionality to calibre.
Calibre 5.0 Drm
CALIBRE_CONFIG_DIRECTORY
- sets the folder where configuration files are stored/read.CALIBRE_TEMP_DIR
- sets the temporary folder used by calibreCALIBRE_CACHE_DIRECTORY
- sets the folder calibre uses to cache persistent data between sessionsCALIBRE_OVERRIDE_DATABASE_PATH
- allows you to specify the full path to metadata.db. Using this variable you can have metadata.db be in a location other than the library folder. Useful if your library folder is on a networked drive that does not support file locking.CALIBRE_DEVELOP_FROM
- used to run from a calibre development environment. See Setting up a calibre development environment.CALIBRE_OVERRIDE_LANG
- used to force the language used by the interface (ISO 639 language code)CALIBRE_TEST_TRANSLATION
- used to test a translation .po file (should be the path to the .po file)CALIBRE_NO_NATIVE_FILEDIALOGS
- causes calibre to not use native file dialogs for selecting files/folders.CALIBRE_NO_NATIVE_MENUBAR
- causes calibre to not create a native (global) menu on Ubuntu Unity and similar linux desktop environments. The menu is instead placed inside the window, as is traditional.CALIBRE_USE_SYSTEM_THEME
- by default, on Linux, calibre uses its ownbuiltin Qt style. This is to avoid crashes and hangs caused by incompatibilitiesbetween the version of Qt calibre is built against and the system Qt. Thedownside is that calibre may not follow the system look and feel. Ifyou set this environment variable on Linux, it will cause calibre to usethe system theme – beware of crashes and hangs.CALIBRE_SHOW_DEPRECATION_WARNINGS
- causes calibre to print deprecation warnings to stdout. Useful for calibre developers.CALIBRE_NO_DEFAULT_PROGRAMS
- prevent calibre from automatically registering the filetypes it is capable of handling with Windows.CALIBRE_USE_DARK_PALETTE
- set it to1
to have calibre use dark colors and0
for normal colors (ignored on macOS).On Windows 10 in the absence of this variable, the Windows system preference for dark colors is used.SYSFS_PATH
- Use if sysfs is mounted somewhere other than /syshttp_proxy
,https_proxy
- used on Linux to specify an HTTP(S) proxy
See How to set environment variables in Windows. If you are on macOSyou can set environment variables by creating the ~/Library/Preferences/calibre/macos-env.txt
and puttingthe environment variables one per line in it, for example:
Tweaks are small changes that you can specify to control various aspects of calibre’s behavior. You can change them by going to Preferences->Advanced->Tweaks.The default values for the tweaks are reproduced below
Note
calibre has direct support for icon themes, there are several icon themesavailable for calibre, that you can use by going to Preferences → Interface → Look & Feel → Change Icon theme.The icon themes use the same mechanism as described below for overriding static resources.
calibre allows you to override the static resources, like icons, JavaScript andtemplates for the metadata jacket, catalogs, etc. with customized versions thatyou like. All static resources are stored in the resources sub-folder of thecalibre install location. On Windows, this is usually C:ProgramFilesCalibre2appresources
.On macOS, /Applications/calibre.app/Contents/Resources/resources/
. On Linux, ifyou are using the binary installer from the calibre website it will be/opt/calibre/resources
. These paths can change depending on where youchoose to install calibre.
You should not change the files in this resources folder, as your changes willget overwritten the next time you update calibre. Instead, go toPreferences → Advanced → Miscellaneous and clickOpen calibre configuration folder. In this configuration folder, create asub-folder called resources and place the files you want to override in it.Place the files in the appropriate sub folders, for example place images inresources/images
, etc. calibre will automatically use your custom filein preference to the built-in one the next time it is started.
Calibre E Book
For example, if you wanted to change the icon for the Remove booksaction, you would first look in the built-in resources folder and see that therelevant file is resources/images/remove_books.png
. Assuming you have analternate icon in PNG format called my_remove_books.png
you would save it inthe configuration folder as resources/images/remove_books.png
. All theicons used by the calibre user interface are in resources/images
andits sub-folders.
If you have created a beautiful set of icons and wish to share them with othercalibre users via calibre’s builtin icon theme support, you can easily packageup your icons into a theme. To do so, go toPreferences → Miscellaneous → Create icon theme, select the folderwhere you have put your icons (usually the resources/images
folder inthe calibre config folder, as described above). Then fill up the thememetadata and click OK. This will result in a ZIP file containing the themeicons. You can upload that to the calibre forum at Mobileread and then I willmake your theme available via calibre’s builtin icon theme system.
Calibre Linux
calibre has a very modular design. Almost all functionality in calibre comes in the form of plugins. Plugins are used for conversion, for downloading news (though these are called recipes), for various components of the user interface, to connect to different devices, to process files when adding them to calibre and so on. You can get a complete list of all the built-in plugins in calibre by going to Preferences → Advanced → Plugins.
You can write your own plugins to customize and extend the behavior of calibre. The plugin architecture in calibre is very simple, see the tutorial Writing your own plugins to extend calibre’s functionality.