| 
			
			 | 
		#1 | 
| 
			
			
			
			 Junior Member 
			
			![]() Posts: 3 
				Karma: 10 
				Join Date: Nov 2022 
				
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
			
			 
			
			Hi! First off, thank you for all your work on Calibre, and for making it open-source. A truly fantastic tool. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Is it possible to run all or most plugins from the command line? For instance, I would like to export my BibTeX catalog from the command line. That plugin code seems to live here: https://github.com/kovidgoyal/calibr...logs/bibtex.py So I thought I might do something like: Code: 
	calibre-debug /usr/lib/calibre/calibre/library/catalogs/bibtex.py -- --verbose --citation-template "{author}-{title}-{pubdate}"
I suspect that I need to execute the actual run() function in this plugin, and this would probably be a fairly trivial Python script. But is there already an idiom for running a Calibre plugin like this from the command line? Thank you!  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				Join Date: Oct 2006 
				Location: Mumbai, India 
				
				
				Device: Various 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			calibredb catalog -h
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Junior Member 
			
			![]() Posts: 3 
				Karma: 10 
				Join Date: Nov 2022 
				
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Excellent! Thank you for such a quick reply. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	This command definitely meets my specific need. I can generate a BibTeX catalog with: Code: 
	calibredb catalog calibre.bib --with-library ~/Calibre/ --entry-type=mixed --citation-template="{author_sort}-{title}-{pubdate}" --sort-by=author_sort
Code: 
	calibredb catalog calibre.bib -h For other plugins, does this mean that there is no general way to run any non-GUI plugin from the command line? Again, I'm sure it is doable with a short Python script that loads the module and uses the run() function. But I wanted to check first to see if there is already a command for this. Thank you!  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,216 
				Karma: 1995558 
				Join Date: Aug 2015 
				
				
				
				Device: Kindle 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Calibre does provide GUI plugins with an API to run in command line mode. For plugins that implements such and API users are supposed to invoke it with the command: 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Code: 
	calibre-debug -r "Plugin Name"  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | |
| 
			
			
			
			 Junior Member 
			
			![]() Posts: 3 
				Karma: 10 
				Join Date: Nov 2022 
				
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Thanks, @capink! I believe that "calibre-debug -r" is exactly what I was looking for. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	My main concern is being able to run non GUI plugins, so this command should be perfect. "calibre-debug -h" had all the details; I should have looked more carefully: Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#6 | |
| 
			
			
			
			 Deviser 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,265 
				Karma: 2090983 
				Join Date: Aug 2013 
				Location: Texas 
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Actually, the CalibreSpy GUI plugin is supposed to be normally run from the command line so multiple Libraries can be viewed simultaneously without the Calibre GUI being executed at all. DaltonST  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
    
| Thread Tools | Search this Thread | 
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| GUI works, command line fails | endo32 | Conversion | 1 | 06-17-2017 11:05 PM | 
| search question gui vs command line | keyser666 | Calibre | 1 | 04-21-2017 12:20 PM | 
| Problem converting with GUI vs command line | kelemvor | Conversion | 13 | 04-07-2016 05:04 PM | 
| command line vs gui db update discrepancy -maybe? | riksaga | Calibre | 1 | 03-22-2013 12:22 AM | 
| command line vs GUI (PDF->MOBI for K2) | tlc | Calibre | 12 | 02-24-2009 07:20 PM |