Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-21-2023, 06:38 PM   #1
tatagi
Connoisseur
tatagi began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Oct 2022
Device: none
command line not supported for portable calibre?

I need to use calibre-debug.exe to run plugins in command line
but for some reason I can't get it to work properly in portable version.

Is there a straight or workaround solution?

and if possible, I want to run it from anywhere, without changing directory first set by using CD C:\Program Files\Calibre2 which is not the issue for installed version


os is Windows 10 64 bit.

Last edited by tatagi; 01-21-2023 at 06:59 PM.
tatagi is offline   Reply With Quote
Old 01-21-2023, 07:10 PM   #2
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,754
Karma: 54401244
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Code:
"E:\Calibre Portable\Calibre\calibre-debug.exe" -g
change the drive letter to match your setup
theducks is offline   Reply With Quote
Advert
Old 01-21-2023, 10:50 PM   #3
tatagi
Connoisseur
tatagi began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Oct 2022
Device: none
Quote:
Originally Posted by theducks View Post
Code:
"E:\Calibre Portable\Calibre\calibre-debug.exe" -g
change the drive letter to match your setup
thanks, calibre-debug now works in portable calibre

but still it's only after I change the directory to where calibre-debug.exe is

for example,

I should run cmd from start menu and type cd C:\Calibre Portable\Calibre

after that calibre-debug or any other built-in command line tools work normally.

I want to have this done without changing the directory. like C:\Users\Goto\Downloads\testfolder or any other folder.
tatagi is offline   Reply With Quote
Old 01-22-2023, 12:37 AM   #4
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,219
Karma: 145277352
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Are you seeing an error message when you try to execute calibre-debug from the command line that looks like:

'D:\Calibre' is not recognized as an internal or external command, operable program or batch file.

This is due to CMD not being happy with a space in a command string; To get around this, as in @theducks example, wrap the command in "s.

I.e.

do not use D:\Calibre Portable\Calibre\calibre-debug -g

do use "D:\Calibre Portable\Calibre\calibre-debug" -g

See How to Escape Spaces in File Paths on the Windows Command Line for a bit of help.
DNSB is offline   Reply With Quote
Old 01-22-2023, 10:21 PM   #5
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,085
Karma: 1948136
Join Date: Aug 2015
Device: Kindle
I have not tried this myself, but I guess that is what the installed version is doing:

How to Add to Windows PATH Environment Variable
capink is offline   Reply With Quote
Advert
Old 01-23-2023, 08:03 AM   #6
tatagi
Connoisseur
tatagi began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Oct 2022
Device: none
Quote:
Originally Posted by DNSB View Post
Are you seeing an error message when you try to execute calibre-debug from the command line that looks like:

'D:\Calibre' is not recognized as an internal or external command, operable program or batch file.

This is due to CMD not being happy with a space in a command string; To get around this, as in @theducks example, wrap the command in "s.

I.e.

do not use D:\Calibre Portable\Calibre\calibre-debug -g

do use "D:\Calibre Portable\Calibre\calibre-debug" -g

See How to Escape Spaces in File Paths on the Windows Command Line for a bit of help.
Quote:
Originally Posted by capink View Post
I have not tried this myself, but I guess that is what the installed version is doing:

How to Add to Windows PATH Environment Variable


thank you for suggestion.

@DNSB yes. to be on a safer side, I always enclose the file path with quotes. btw what does -g switch do in your script?

@capink I think I'll give it a go, but in the settings dialog, which one should the path of portable calibre be in? User variables or System variables?
tatagi is offline   Reply With Quote
Old 01-23-2023, 11:28 AM   #7
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,219
Karma: 145277352
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by tatagi View Post
@DNSB yes. to be on a safer side, I always enclose the file path with quotes. btw what does -g switch do in your script?
It runs the calibre GUI.

Quote:
Originally Posted by tatagi View Post
@capink I think I'll give it a go, but in the settings dialog, which one should the path of portable calibre be in? User variables or System variables?
Under either though generally I prefer to use the system variable section since I have a couple of users setup (one for normal use, one for testing when I'm removing browser profiles, etc.).
DNSB is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre command line syntax RobertWHayes Calibre 9 03-21-2020 06:22 PM
calibre command line mahargiani Recipes 2 11-15-2019 01:21 AM
Get Calibre version from the command line AndyBlack Calibre 11 11-14-2019 09:08 PM
Calibre with command line ? Laurent06 Conversion 2 11-09-2014 12:37 AM
Autotagging with Calibre (command line) erion Calibre 11 08-28-2010 01:33 PM


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


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