View Single Post
Old 08-22-2020, 12:40 AM   #266
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 1,100
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
When I try to run calibre-customize on macOS using the latest beta (4.99.12) it seems to have a problem where it detaches from the terminal and constantly respawns without the arguments I originally passed. I saw this on macOS 10.15 and on the current macOS 11 beta. I do not see this with the Linux beta build.

With some setup to use a fresh config directory:

Code:
export CALIBRE_CONFIG_DIRECTORY=/Users/jgoguen/Downloads/WVuvjzL/config
export CALIBRE_TEMP_DIR=/Users/jgoguen/Downloads/WVuvjzL/tmp
# This works fine only if I haven't imported a plugin yet
./calibre.app/Contents/MacOS/calibre-customize --help
# This requires multiple rapid-fire calls to `pkill -f calibre-customize` to finally terminate and breaks even with a completely empty config directory.
./calibre.app/Contents/MacOS/calibre-customize -a ../Code/calibre-kobo-driver/KoboTouchExtended.zip
I can reproduce this no matter what the relative path is to the plugin or if I use an absolute path instead, and with other plugin files. Looking at ps output, the calibre-customize command that's run when it detaches and constantly respawns is:

Code:
/Users/jgoguen/Downloads/calibre.app/Contents/MacOS/calibre-customize -OO -B -I -c from multiprocessing.resource_tracker import main;main(5)
Looking at the config directory, the plugin did get added to the config directory and customize.py.json and global.py.json get created; only those three files exist:

Code:
% cat customize.py.json
{
  "disabled_plugins": {
    "__class__": "set",
    "__value__": []
  },
  "enabled_plugins": {
    "__class__": "set",
    "__value__": []
  },
  "filetype_mapping": {},
  "plugin_customization": {},
  "plugins": {
    "KoboTouchExtended": "/Users/jgoguen/Downloads/WVuvjzL/config/plugins/KoboTouchExtended.zip"
  }
}

% cat global.py.json
{
  "add_formats_to_existing": false,
  "case_sensitive": false,
  "check_for_dupes_on_ctl": false,
  "database_path": "/Users/jgoguen/library1.db",
  "filename_pattern": "(?P<title>.+) - (?P<author>[^_]+)",
  "input_format_order": [
    "EPUB",
    "AZW3",
    "MOBI",
    "LIT",
    "PRC",
    "FB2",
    "HTML",
    "HTM",
    "XHTM",
    "SHTML",
    "XHTML",
    "ZIP",
    "DOCX",
    "ODT",
    "RTF",
    "PDF",
    "TXT"
  ],
  "installation_uuid": "ece08ac4-9573-4a8e-925a-6bcc65d1e014",
  "isbndb_com_key": "",
  "language": null,
  "library_path": null,
  "limit_search_columns": false,
  "limit_search_columns_to": [
    "title",
    "authors",
    "tags",
    "series",
    "publisher"
  ],
  "manage_device_metadata": "manual",
  "mark_new_books": false,
  "migrated": false,
  "network_timeout": 5,
  "new_book_tags": [],
  "output_format": "EPUB",
  "read_file_metadata": true,
  "saved_searches": {},
  "swap_author_names": false,
  "use_primary_find_in_search": true,
  "user_categories": {},
  "worker_process_priority": "normal"
}
The output from calibre-customize is the same every time:

Code:
Usage: calibre-customize options                                                                                                                                  [21:38:07] exe:0.47s

Customize calibre by loading external plugins.


Whenever you pass arguments to calibre-customize that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces"

calibre-customize: error: no such option: -O
jgoguen is offline