Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 03-25-2022, 04:35 PM   #1
BillCalibre
Member
BillCalibre began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2017
Device: iPad
Accessing Calibre CLI commands from Mac

Hello

I seem unable to use Calibre's CLI commands from my Mac (MacOS = Catalina). I am able to find those commands by 'showing package contents' of the calibre icon inside of the Applications folder:



...I only get this read-only command help documentation I'm not able to type anything:




However, when I open into Mac Terminal...




...however if I start, instead, by first opening up Terminal, and then plugging in the path to it by typing: cd /Applications/calibre.app/Contents/MacOS, listing it using ls, I can see calibredb. However if I type:

calibredb list_categories --help

I get:

zsh: command not found: calibredb

...even though I am in the directory and can see the calibredb file using ls.

Can someone please explain what I'm doing wrong?

For context, what I'm trying to do is to list out all of my tags so that I can use another program to help me better visualize and rearrange / reorganize my tags... to plan it out outside of calibre so that my head is clearer once I'm in calibre to implement the new reorganization.

Thank you

Bill
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2022-03-25 at 4.11.16 PM.png
Views:	152
Size:	575.5 KB
ID:	192943   Click image for larger version

Name:	Screen Shot 2022-03-25 at 4.16.55 PM.png
Views:	133
Size:	259.2 KB
ID:	192944   Click image for larger version

Name:	Screen Shot 2022-03-25 at 4.22.08 PM.png
Views:	134
Size:	372.0 KB
ID:	192945  

Last edited by BetterRed; 03-25-2022 at 06:04 PM. Reason: Remove oversize images - see Gulideline #9
BillCalibre is offline   Reply With Quote
Old 03-25-2022, 04:44 PM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,464
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Other than your love for large images, the key is to place a ./ before the command you want to execute to run it from the current directory. That is, instead of calibredb list_categories --help, use ./calibredb list_categories --help

Spoiler:
Code:
Last login: Fri Mar 25 13:39:05 on console
DavidB@Davids-VMMac ~ % cd /Applications/calibre.app/Contents/MacOS
  
DavidB@Davids-VMMac MacOS % ls
calibre			calibredb		fetch-ebook-metadata
calibre-complete	ebook-convert		lrf2lrs
calibre-customize	ebook-device		lrfviewer
calibre-debug		ebook-edit		lrs2lrf
calibre-parallel	ebook-meta		markdown-calibre
calibre-server		ebook-polish		web2disk
calibre-smtp		ebook-viewer

DavidB@Davids-VMMac MacOS % ./calibredb list_categories --help
Usage: calibredb list_categories [options]

Produce a report of the category information in the database. The
information is the equivalent of what is shown in the Tag browser.

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

Options:
  -i, --item_count      Output only the number of items in a category instead
                        of the counts per item within the category

  -c, --csv             Output in CSV

  --dialect=DIALECT     The type of CSV file to produce. Choices: excel,
                        excel-tab, unix

  -r REPORT, --categories=REPORT
                        Comma-separated list of category lookup names.
                        Default: all

  -w WIDTH, --width=WIDTH
                        The maximum width of a single line in the output.
                        Defaults to detecting screen size.


  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>

DavidB@Davids-VMMac MacOS %
DNSB is offline   Reply With Quote
Old 03-25-2022, 07:59 PM   #3
BillCalibre
Member
BillCalibre began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2017
Device: iPad
Thank you VERY much DNSB! This worked :-)

ps: Sorry about the large images. They were screen shots
BillCalibre is offline   Reply With Quote
Old 03-25-2022, 08:45 PM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by BillCalibre View Post
Thank you VERY much DNSB! This worked :-)

ps: Sorry about the large images. They were screen shots
Use the Attachments (paperclip icon on the Advanced MR Reply).
There are still file size limits (vs px limits), but you can usually use the 'paint' tool in your OS to scale the image down first.
theducks is offline   Reply With Quote
Old 03-26-2022, 05:10 PM   #5
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,464
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by BillCalibre View Post
Thank you VERY much DNSB! This worked :-)

ps: Sorry about the large images. They were screen shots
You're welcome. I'm gotten very used to the ./ or .\ being needed since I spend all too much time in various CLIs which need that format (Linux, Mac, Powershell for Windows, etc.)

I see that theducks already gave advice on attaching images. With that and using the spoiler tag to hide long bits of text, bob's your uncle.
DNSB is offline   Reply With Quote
Old 04-02-2022, 02:50 PM   #6
BillCalibre
Member
BillCalibre began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jul 2017
Device: iPad
Thanks guys ��
BillCalibre is offline   Reply With Quote
Reply

Tags
calibredb, catalina, cli, command line, mac


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mac OSX kfx output CLI trouble troubledMan Conversion 0 09-06-2020 09:29 AM
Could I open a book in calibre library, knowing it id, using calibre console commands mmmm1998 Library Management 1 03-26-2018 04:33 AM
Accessing built in recipes via CLI? jbmia Recipes 7 07-22-2011 02:25 PM
list of commands for Calibre JTAL604622 Calibre 5 06-23-2010 04:21 PM


All times are GMT -4. The time now is 06:20 AM.


MobileRead.com is a privately owned, operated and funded community.