05-13-2020, 10:54 AM | #1 |
Generally Awesome Person
Posts: 1,061
Karma: 2178845
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
|
Unit testing calibre plugins
I just realized I can run arbitrary Python scripts through calibre-debug, which is finally allowing me to start writing some proper tests. There's a couple things I'm wondering about though. I'll be running everything on a Linux machine which I hope makes it all easier.
|
05-13-2020, 11:47 AM | #2 |
creator of calibre
Posts: 43,994
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
1) You append to sys.path
2, 3) See the various environment variables calibre uses, including controlling interface language and config directory https://manual.calibre-ebook.com/cus...ment-variables Note that binary builds of calibre from the python 3 betas onward always use UTF-8 regardless of environment variables. For python 2 calibre things are more complicated, since there python's internal encoding selection mechanics are used. 4) Just create your own empyt config dir and tell calibre to use it via the env var above and then use calibre-customize -b to install your plugin into that config dir. |
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre-server systemd socket unit example | davidreads | Server | 1 | 01-10-2020 04:38 PM |
Beta testing calibre 4 | kovidgoyal | Calibre | 385 | 10-17-2019 03:15 AM |
Calibre Companion connecting unit / computer | jayp2013mobile | Calibre Companion | 23 | 03-03-2016 02:07 PM |
Calibre Portable like the Calibre on PC (espec. settings and plugins)? | manawydan | Devices | 6 | 01-23-2013 06:45 AM |
Calibre has no choice on font size unit in css? | naisren | ePub | 6 | 09-30-2012 09:41 AM |