![]() |
#1 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Feb 2013
Device: none
|
Example of creating a catalog in batch
Hi, I try to create some catalog files with the command line. I have tried several options, try to understand the help options given, but I can't get it work.
What I want to do is the following: From the tag 'Detectives' create a catalog ''Detective.epub' (In principle I want this to do for all the tags, I know I can do it manual, but it's each time around 15x the same, I know there must be an easier way) Can someone give me an example of how this is done with the command line option ? Thanks in Advance. Willum |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,277
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
calibredb catalog detective.epub -s "tags:=Detective"
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Feb 2013
Device: none
|
Kovidgoyal,
Kuddos !! Thank you. Willum |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Feb 2013
Device: none
|
Hi Kovidgoyal,
New challenge: I have tags with spaces in it... have tried the following: calibredb catalog detective.epub -s "tags:=Korteverhalenengedichten" calibredb catalog detective.epub -s "tags:=Korte verhalen en gedichten" calibredb catalog detective.epub -s tags:="Korteverhalenengedichten" calibredb catalog detective.epub -s tags:="Korte verhalen en gedichten" All no luck.... Running out of ideas Do I have to rename them or is there a way to use that names ? |
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,277
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Look at the search expression the GUI uses when you click on the tag and use it in the command line, properly escaping the quotes.
Last edited by kovidgoyal; 02-03-2013 at 04:14 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Feb 2013
Device: none
|
G:\My Documents\Calibre Bibliotheek>"C:\Program Files (x86)\Calibre2\calibredb" catalog "G:\My Docum
ents\Calibre Bibliotheek\Korte verhalen en gedichten.epub" -s tags:"=Korte verhalen en gedichten" *** No Section switches specified, enabling all Sections *** Sections: Authors, Titles, Series, Genres, Recently Added, Descriptions genre_tags_dict: {u'Detectives': u'detectives', u'Literatuur klassiek': u'literatuurklassiek', u'Sci ence Fiction': u'sciencefiction', u'Literatuur en romans': u'literatuurenromans', u'Korte verhalen e n gedichten': u'korteverhalenengedichten', u'Reisverhalen': u'reisverhalen', u'Non-fictie': u'nonHYP HEN-MINUSfictie', u'Spionage': u'spionage', u'Dictionaries': u'dictionaries', u'Fantasy': u'fantasy' , u'Jeugdboeken': u'jeugdboeken', u'Thrillers': u'thrillers', u'Reizen': u'reizen', u'Detectives en thrillers': u'detectivesenthrillers'} existing thumb cache at C:\Users\Willum Kerker\AppData\Local\calibre-cache\catalog\thumbs.zip, cac hed_thumb_width: 1.00" 1% Sorting titles *** No books to catalog. Check 'Excluded books' rules in E-book options. *** *** Terminated catalog generation: No books to catalog. Check 'Excluded books' rules in E-book options. *** No luck :-( PS: It works with Dictionaries Last edited by Willum; 02-03-2013 at 04:14 AM. |
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Feb 2013
Device: none
|
Hi Kovidgoyal,
Did I found a little bug or do I something wrong ? Regards, Willum |
![]() |
![]() |
![]() |
#8 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,277
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You need to figure out how to pass quoted strings in whatever command line interpreter you are using. For bash, it is
-s 'tags:"=Alternate History"' |
![]() |
![]() |
![]() |
#9 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Feb 2013
Device: none
|
Hi Kovidgoyal,
I couldn't get it work, what I now did.. I have made all the tags 'spaceless'. Example of catalog.bat: Code:
@ECHO OFF Call CreateCatalog "Detectives" Call CreateCatalog "DetectivesEnThrillers" Call CreateCatalog "Dictionaries" Call CreateCatalog "KorteVerhalenEnGedichten" Code:
SET TAGNAME=%~1 SET TAGS=tags:"=%TAGNAME%" "C:\Program Files (x86)\Calibre2\calibredb" catalog "G:\My Documents\Calibre Bibliotheek\%TAGNAME%.epub" -s %TAGS% "C:\Program Files (x86)\Calibre2\calibredb" add --tags Catalog --title %TAGNAME% --authors "Calibre" "G:\My Documents\Calibre Bibliotheek\%TAGNAME%.epub" DEL "G:\My Documents\Calibre Bibliotheek\%TAGNAME%.epub" Thanks anyway for the help. Regards, Willum |
![]() |
![]() |
![]() |
#10 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Feb 2013
Device: none
|
Ok, now I have it worked out.
This will create the catalogs in a windows environment: catalog.bat: Code:
@ECHO OFF Call CreateCatalog "Detectives" Call CreateCatalog "Detectives en Thrillers" Call CreateCatalog "Dictionaries" Call CreateCatalog "Fantasy" Call CreateCatalog "Jeugdboeken" Call CreateCatalog "Korte verhalen en Gedichten" Call CreateCatalog "Literatuur en Romans" Call CreateCatalog "Literatuur klassiek" Call CreateCatalog "Non-fictie" Call CreateCatalog "Reisverhalen" Call CreateCatalog "Reizen" Call CreateCatalog "Science Fiction" Call CreateCatalog "Spionage" Call CreateCatalog "Thrillers" :: :: Create a separated book with all series :: SET CALIBREDBPROG="C:\Program Files (x86)\Calibre2\calibredb" SET TARGETFILE="G:\My Documents\Calibre Bibliotheek\Series.epub" %CALIBREDBPROG% catalog %TARGETFILE% -s "series:true" %CALIBREDBPROG% add --tags Catalog --title Series --authors "Calibre" %TARGETFILE% DEL %TARGETFILE% EXIT Code:
SET CALIBREDBPROG="C:\Program Files (x86)\Calibre2\calibredb" SET TAGNAME=%~1 SET TAGS=tags:\"=%TAGNAME%\" SET TARGETFILE="G:\My Documents\Calibre Bibliotheek\%TAGNAME%.epub" %CALIBREDBPROG% catalog %TARGETFILE% -s "%TAGS%" %CALIBREDBPROG% add --tags Catalog --title "%TAGNAME%" --authors "Calibre" %TARGETFILE% DEL %TARGETFILE% |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error creating an epub catalog | pscynthetiq | Library Management | 2 | 09-30-2017 07:25 PM |
Problem creating catalog | beckywc | Library Management | 10 | 12-05-2012 03:27 PM |
Using custom metadata when creating a catalog | grobinson | Library Management | 2 | 01-07-2012 12:17 PM |
Problem Creating Catalog of ISBNs | desilva | Library Management | 4 | 08-09-2011 06:44 PM |