Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-08-2011, 07:05 AM   #1
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 378
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
Saving to Disk: Solved

Hi guys

I am currently saving many books to disk. Once I am satisfied with how some books look and if I am not planning to read them in the near future, I save them to disk, zip them and move them to my Books Collections folder in my WHS.

I am currently using two templates:

Template one:
Code:
{authors}/{title}/{title} - {authors}
for books with no series

and template two:
Code:
{authors}/{series}/{series_index} - {title} - {authors}
for books with series.

The thing is that every time I have to change the template I have to got to Preferences, change the template and save.

I was wondering if it could be possible to choose the template at the moment of saving to disk, something like, "Save to disk using... -> Template one".

I don't know if a plugin exist already for doing this.

Another thing, where is the list of recently used templates stored? I'd like to clean it up and just keep the two mentioned templates - right now there are about 9 different templates.


Many thanks!
PF

Last edited by paulfiera; 08-08-2011 at 10:00 AM. Reason: Solved
paulfiera is offline   Reply With Quote
Old 08-08-2011, 07:28 AM   #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,801
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 paulfiera View Post
Hi guys

I am currently saving many books to disk. Once I am satisfied with how some books look and if I am not planning to read them in the near future, I save them to disk, zip them and move them to my Books Collections folder in my WHS.

I am currently using two templates:

Template one:
Code:
{authors}/{title}/{title} - {authors}
for books with no series

and template two:
Code:
{authors}/{series}/{series_index} - {title} - {authors}
for books with series.

The thing is that every time I have to change the template I have to got to Preferences, change the template and save.

I was wondering if it could be possible to choose the template at the moment of saving to disk, something like, "Save to disk using... -> Template one".

I don't know if a plugin exist already for doing this.

Another thing, where is the list of recently used templates stored? I'd like to clean it up and just keep the two mentioned templates - right now there are about 9 different templates.


Many thanks!
PF
Mine (coded by chaley) is a little more complex:

1)Series are not all by the same Author (so starting with Author is a poor idea)
2)There is a count limit on top level file/folder names
3)My device booklist is shown by folder. 8 entries at a time. (sort is only by Alpha or Date modified) I use Alpha
So I use:
00NoSeries (rises to the top of the list) folder when no series
and
<first_letter>-series (to group the series that start with the same letter) when it has a series name


Code:
program: 
test(	field('series'), 
	strcat(
		substr(field('series'), 0, 1),
		template("-series/{series}/{series_index:0>2s}-{title}_{id}_{authors}")
	),
	template("00noseries/{author_sort[0]}_authors/{authors}/{title}_{id}-{authors}")
)
theducks is offline   Reply With Quote
Advert
Old 08-08-2011, 07:39 AM   #3
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
There isn't a need for two different templates my current template addresses books with and without series. Adjust as needed.

Code:
{author_sort}/{series:||-}{series_index:05.2f||-}{title}
DoctorOhh is offline   Reply With Quote
Old 08-08-2011, 07:40 AM   #4
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 378
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
Quote:
Originally Posted by theducks View Post
Mine (coded by chaley) is a little more complex:

1)Series are not all by the same Author (so starting with Author is a poor idea)
2)There is a count limit on top level file/folder names
3)My device booklist is shown by folder. 8 entries at a time. (sort is only by Alpha or Date modified) I use Alpha
So I use:
00NoSeries (rises to the top of the list) folder when no series
and
<first_letter>-series (to group the series that start with the same letter) when it has a series name


Code:
program: 
test(	field('series'), 
	strcat(
		substr(field('series'), 0, 1),
		template("-series/{series}/{series_index:0>2s}-{title}_{id}_{authors}")
	),
	template("00noseries/{author_sort[0]}_authors/{authors}/{title}_{id}-{authors}")
)
Many thanks, theducks.

Where do you enter that code? In the Saving To Disk templates?
paulfiera is offline   Reply With Quote
Old 08-08-2011, 07:45 AM   #5
Ron.
Evangelist
Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.
 
Ron.'s Avatar
 
Posts: 448
Karma: 864744
Join Date: Mar 2011
Device: Kindle 3, LookBook, Nook Simple Touch
I just use this so there is no need to change templates.

Code:
{authors}/{series}/{title}/{series} {series_index:0>2s|| - }{title} - {authors}
Ron. is offline   Reply With Quote
Advert
Old 08-08-2011, 07:49 AM   #6
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,801
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 paulfiera View Post
Many thanks, theducks.

Where do you enter that code? In the Saving To Disk templates?
Yes
Copy and paste. Includes the word Program and include the last bracket

BTW I know of no way to clean out past entries other than wiping all your Calibre settings.
theducks is offline   Reply With Quote
Old 08-08-2011, 07:59 AM   #7
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 378
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
Quote:
Originally Posted by Ron. View Post
I just use this so there is no need to change templates.

Code:
{authors}/{series}/{title}/{series} {series_index:0>2s|| - }{title} - {authors}
Many thanks, Ron.

Interesting template and looks like it does what I'm looking for.
paulfiera is offline   Reply With Quote
Old 08-08-2011, 08:02 AM   #8
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 378
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
Quote:
Originally Posted by theducks View Post
Yes
Copy and paste. Includes the word Program and include the last bracket

BTW I know of no way to clean out past entries other than wiping all your Calibre settings.
Many thanks, theducks.

But these templates must be stored somewhere, a json file perhaps?

I'm not in the mood of wiping all my Calibre settings. It has taken me a long time to set it up the way I like it. Right now it's working like a swiss clock
paulfiera is offline   Reply With Quote
Old 08-08-2011, 08:37 AM   #9
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by paulfiera View Post
Another thing, where is the list of recently used templates stored? I'd like to clean it up and just keep the two mentioned templates - right now there are about 9 different templates.
They are in the file gui.py in your configuration directory. The variables are save_to_disk_template_history and send_to_device_template_history.

You can't edit these variables, but you can delete them. Delete everything from the beginning of the comment above the variable to the blank line after the variable.

Best to save a copy, just in case ...
chaley is offline   Reply With Quote
Old 08-08-2011, 08:56 AM   #10
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 378
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
Quote:
Originally Posted by chaley View Post
They are in the file gui.py in your configuration directory. The variables are save_to_disk_template_history and send_to_device_template_history.

You can't edit these variables, but you can delete them. Delete everything from the beginning of the comment above the variable to the blank line after the variable.

Best to save a copy, just in case ...
Many thanks, chaley.

One last thing. When saving series, they are saved as
Quote:
Crusades Trilogy, The
instead of
Quote:
The Crusades Trilogy
as they are called.

Any way of changing this behavior? Not a big thing, though. I can always rename the series folder.
paulfiera is offline   Reply With Quote
Old 08-08-2011, 08:59 AM   #11
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by paulfiera View Post
Any way of changing this behavior? Not a big thing, though. I can always rename the series folder.
Check out Preferences - tweaks I think there is some way there to differentiate between Library order and alphabetical order.
DoctorOhh is offline   Reply With Quote
Old 08-08-2011, 09:09 AM   #12
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 378
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
Quote:
Originally Posted by dwanthny View Post
Check out Preferences - tweaks I think there is some way there to differentiate between Library order and alphabetical order.
That's it, Walt

It's "Control formatting of title and series when...".

It was set to
Code:
save_template_title_series_sorting = 'library_order'
I've changed it to
Code:
save_template_title_series_sorting = 'strictly_alphabetic'
and it's perfect.

I don't cease to be amazed by Calibre and by the Calibre comunity.

Many thanks, guys.
paulfiera is offline   Reply With Quote
Old 08-08-2011, 09:18 AM   #13
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 378
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
Just to add.

I've changed Ron's template a bit like this:
Code:
{authors}/{series}/{series_index:0>2s|| - }{title}/{series} {series_index:0>2s|| - }{title} - {authors}
This way, the series index is prepended the series title and the folders display in the right order. Probably unnecessary for some but it's working perfect for me.
paulfiera is offline   Reply With Quote
Old 08-09-2011, 04:51 PM   #14
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by paulfiera View Post
I've changed Ron's template a bit like this:
Code:
{authors}/{series}/{series_index:0>2s|| - }{title}/{series} {series_index:0>2s|| - }{title} - {authors}
This way, the series index is prepended the series title and the folders display in the right order. Probably unnecessary for some but it's working perfect for me.
That seems a bit odd. You get a folder for each author. In the author folder you get a folder for each series. In the series folder you get a folder for each book in the series. In that final folder you have a single book. Why not put all the books in the series into the series folder? They'll sort correctly by series_index the same way your folders for each book are sorting. What's the point of one folder per book?
Starson17 is offline   Reply With Quote
Old 08-10-2011, 03:10 AM   #15
paulfiera
Addict
paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.paulfiera could sell banana peel slippers to a Deveel.
 
paulfiera's Avatar
 
Posts: 378
Karma: 3102
Join Date: Dec 2010
Location: EU
Device: Kobo Aura ONE, Kobo Libra H20
Quote:
Originally Posted by Starson17 View Post
That seems a bit odd. You get a folder for each author. In the author folder you get a folder for each series. In the series folder you get a folder for each book in the series. In that final folder you have a single book. Why not put all the books in the series into the series folder? They'll sort correctly by series_index the same way your folders for each book are sorting. What's the point of one folder per book?
Heh, you are absolutely right.

I've modified the template to:
Code:
{authors}/{series}/{series_index:0>2s|| - }{title} - {authors}
Looks better, but maybe someone has a better template?

Many thanks
PF
paulfiera is offline   Reply With Quote
Reply

Tags
templates


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving to Disk paulfiera Calibre 3 07-20-2011 10:21 AM
Losing files when saving saving to disk theaccountant Library Management 4 03-10-2011 02:38 PM
Question about saving to disk Xenophon Calibre 2 10-23-2009 11:10 AM
Saving to disk htaylor Calibre 2 01-04-2009 08:29 PM
Saving to Disk issues scruffy Calibre 5 09-03-2008 12:10 AM


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


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