View Single Post
Old 01-28-2026, 02:57 PM   #11
shayaknyc
Connoisseur
shayaknyc can program the VCR without an owner's manual.shayaknyc can program the VCR without an owner's manual.shayaknyc can program the VCR without an owner's manual.shayaknyc can program the VCR without an owner's manual.shayaknyc can program the VCR without an owner's manual.shayaknyc can program the VCR without an owner's manual.shayaknyc can program the VCR without an owner's manual.shayaknyc can program the VCR without an owner's manual.shayaknyc can program the VCR without an owner's manual.shayaknyc can program the VCR without an owner's manual.shayaknyc can program the VCR without an owner's manual.
 
Posts: 68
Karma: 172022
Join Date: Sep 2012
Device: Kobo Aura
I added the print statement to the __init__.py file and despite the environment variable, running the calibredb command, as per the documentation in the link, did not display the print message.

Edit: for clarity, I edited ../calibre/src/calibre/__init__.py and added print("Hello, world!") to line 16 of that file, after all the import statements, and before the first if condition.

Then, I set the environment variable CALIBRE_DEVELOP_FROM to the full path /home/shayaknyc/git/calibre/src and executing echo $CALIBRE_DEVELOP_FROM displays the proper full path to the src directory. I then execute command calibredb and this is the output:

Code:
calibredb
Failed to initialize plugin: '/home/shayaknyc/.config/calibre/plugins/ANOBII.zip'
Failed to initialize plugin: '/home/shayaknyc/.config/calibre/plugins/Barnes & Noble.zip'
Failed to initialize plugin: '/home/shayaknyc/.config/calibre/plugins/DOC Input.zip'
Failed to initialize plugin: '/home/shayaknyc/.config/calibre/plugins/KoboBooks.zip'
Failed to initialize plugin: '/home/shayaknyc/.config/calibre/plugins/Read MP3 AudioBook metadata.zip'
Usage: calibredb command [options] [arguments]

calibredb is the command line interface to the calibre books database.

command is one of:
  list
  add
  remove
  add_format
  remove_format
  show_metadata
  set_metadata
  export
  catalog
  saved_searches
  add_custom_column
  custom_columns
  remove_custom_column
  set_custom
  restore_database
  check_library
  list_categories
  backup_metadata
  clone
  embed_metadata
  search
  fts_index
  fts_search

For help on an individual command: calibredb command --help


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

Options:
  GLOBAL OPTIONS:
    --library-path=LIBRARY_PATH, --with-library=LIBRARY_PATH
                        Path to the calibre library. Default is to use the
                        path stored in the settings. You can also connect to a
                        calibre Content server to perform actions on remote
                        libraries. To do so use a URL of the form:
                        http://hostname:port/#library_id for example,
                        http://localhost:8080/#mylibrary. library_id is the
                        library id of the library you want to connect to on
                        the Content server. You can use the special library_id
                        value of - to get a list of library ids available on
                        the server. For details on how to setup access via a
                        Content server, see https://manual.calibre-
                        ebook.com/generated/en/calibredb.html.

    -h, --help          show this help message and exit

    --version           show program's version number and exit

    --username=USERNAME
                        Username for connecting to a calibre Content server

    --password=PASSWORD
                        Password for connecting to a calibre Content server.
                        To read the password from standard input, use the
                        special value: <stdin>. To read the password from a
                        file, use: <f:/path/to/file> (i.e. <f: followed by the
                        full path to the file and a trailing >). The angle
                        brackets in the above are required, remember to escape
                        them or use quotes for your shell.

    --timeout=TIMEOUT   The timeout, in seconds, when connecting to a calibre
                        library over the network. The default is two minutes.


Created by Kovid Goyal <kovid@kovidgoyal.net>

Last edited by shayaknyc; 01-28-2026 at 03:46 PM.
shayaknyc is offline   Reply With Quote