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-10-2015, 12:21 AM   #31
Thomas_AR
Zealot
Thomas_AR began at the beginning.
 
Thomas_AR's Avatar
 
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
Quote:
Originally Posted by eschwartz View Post
Fixed. Today is stupid-typos-day I see...

(rant: I fixed that twice in the template tester in calibre -- it still migrated to my post! What the....)
jeje, i know those days/nights from the time i hard coded html and CSS

back to target, now i get:
1. Series with various Authors: _ Series -/0001 - title - author
2. Series with one author: _ Series Author/0001 - title - author
3. Books with no series: author/Title - author

1. has one "-" at the end
2. has no "-" between series and author
3. is fine

I think it is to late for those targets - 4 o´clock in the morning your time
Thomas_AR is offline   Reply With Quote
Old 03-10-2015, 12:53 AM   #32
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
2) That was the other error I "fixed".

Code:
{series:'in_list($, "&", "Perry Rhodan", $, strcat($, ' - '))'|_ | }{series:lookup(Perry Rhodan,,authors)}/{series_index:0>4s| | - }{title} - {authors}
Ah, screw that, GPM makes more sense:

Code:
program:

# return separator+authors if bad series isn't found, or return empty
various_authors=in_list(
	field('series'),
	'&',
	'Perry Rhodan',
	'',
	 strcat(' - ', field('authors'))
);
end_template=template('{series_index:0>4s| | - }{title} - {authors}');

start_template=test(
	field('series'),
	strcat(
		'_ ',
		field('series'),
		various_authors
	),
	field('authors')
);

strcat(start_template, '/', end_template);
P.S. 11:53 -- so almost.
eschwartz is offline   Reply With Quote
Advert
Old 03-10-2015, 12:59 AM   #33
Thomas_AR
Zealot
Thomas_AR began at the beginning.
 
Thomas_AR's Avatar
 
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
That did the trick, used the GPM.
Thanks you very much and have a beer when you come to Buenos Aires.
Buenos Aires 02:00 at night
P.S.
Those days i have a closer look at the GPM documentation.

...and if you find the time and patience some day i would like to have a GPM not limited to "Perry Rhodan" but in general if the series contains various authors - with the same folder/file structure result we have know.

That would be than a six pack of beer for you and like . for me

Last edited by Thomas_AR; 03-10-2015 at 01:17 AM.
Thomas_AR is offline   Reply With Quote
Old 03-10-2015, 01:05 AM   #34
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
You're welcome.

(I can be in either direction, but as it happens I am not on the east coast. Plus DST makes everyone happy. Wrong night to be thinking about time? )
eschwartz is offline   Reply With Quote
Old 03-10-2015, 01:11 AM   #35
Thomas_AR
Zealot
Thomas_AR began at the beginning.
 
Thomas_AR's Avatar
 
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
Quote:
Originally Posted by eschwartz View Post
You're welcome.

(I can be in either direction, but as it happens I am not on the east coast. Plus DST makes everyone happy. Wrong night to be thinking about time? )
edited my last post .. LOL
Thomas_AR is offline   Reply With Quote
Advert
Old 03-10-2015, 01:33 AM   #36
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
And yes, it would make more sense to count the authors.

Code:
program:

# return separator+authors if only one author, or return empty
various_authors=cmp(
	count(field('authors'), '&'),
	1,
	'loud error -- I have no authors, huh?',
	strcat(' - ', field('authors')),
	''
);
end_template=template('{series_index:0>4s| | - }{title} - {authors}');

start_template=test(
	field('series'),
	strcat(
		'_ ',
		field('series'),
		various_authors
	),
	field('authors')
);

strcat(start_template, '/', end_template);
eschwartz is offline   Reply With Quote
Old 03-10-2015, 07:20 PM   #37
Thomas_AR
Zealot
Thomas_AR began at the beginning.
 
Thomas_AR's Avatar
 
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
Thanks, just tried it and thriller goes into second round

Getting:
1. Series with various Authors:

_ Series - author 1/0001 - title - author 1
_ Series - author 2/0002 - title - author 2
etc.

2. Series with one author:

_ Series - Author/0001 - title - author

3. Books with no series:

author/Title - author

So Number 1 not working

Last edited by Thomas_AR; 03-11-2015 at 12:20 AM.
Thomas_AR is offline   Reply With Quote
Old 03-10-2015, 07:53 PM   #38
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
What precisely isn't working?
eschwartz is offline   Reply With Quote
Old 03-10-2015, 08:05 PM   #39
Thomas_AR
Zealot
Thomas_AR began at the beginning.
 
Thomas_AR's Avatar
 
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
Quote:
Originally Posted by eschwartz View Post
What precisely isn't working?
Sorry had to correct my answer above.
I am getting for series with various authors different folders:

Folder one: Series - Author 1/0001 - title - author1
Folder two: Series - Author 2/0002 - title - author2
etc.

Instead of:

Series/(all books in one folder)

Last edited by Thomas_AR; 03-11-2015 at 12:20 AM.
Thomas_AR is offline   Reply With Quote
Old 03-11-2015, 01:29 AM   #40
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Wait a minute... this wouldn't happen by any chance to be two books each with one author, but different authors for different books -- even though they are part of a series -- would it?

e.g. Forgotten Realms: War of the Spider Queen series:
Book 1 by Richard Lee Byers
Book 2 by Thomas M. Reid
Book 3 by Richard Baker
Book 4 by Lisa Smedman
Book 5 by Philip Athans
Book 6 by Paul S. Kemp


If so I think I know why we were having so much trouble.

Templates are evaluated strictly within a one-book context -- they only know the metadata for that book and cannot access the database to find out about other books.

You can only find out authors for that specific book.

In the past, people have gotten around that by using calibre-debug scripts to open the database, perform searches, and update custom columns for matching books when certain conditions are met. For example, formatting the series number with only enough leading zeros to match the highest numbered book in a series.
eschwartz is offline   Reply With Quote
Old 03-11-2015, 11:40 AM   #41
Thomas_AR
Zealot
Thomas_AR began at the beginning.
 
Thomas_AR's Avatar
 
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
Well, the series I have are up from 6 to 2000 books.

In case of Perry Rhodan there are various series of him with different series names.
Let's take one :

Series name: Perry Rhodan Hefte
In this series I have about 2000 books with all different titles, but only about 20 different authors. So each author has for that a lots of books written in this series.
All those series have different authors but each author could have written more than more than one book.
I hope I could have explained these kind of series.

Of cause I have series with only one author, or series with different authors but only one book each as in your example above.

Conclusion:
I think we stay with the first GPM adjusted to Perry Rhodan as working with debug on database, even it seams interesting to solve it, is not worth the trouble as for now it only affect Perry Rhodan Series.

Thanks again for your help.

Last edited by Thomas_AR; 03-11-2015 at 11:47 AM.
Thomas_AR is offline   Reply With Quote
Old 03-11-2015, 11:58 AM   #42
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,812
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
You can sort (or file) by Series or you can sort by Author, not both.
It only appears to work if they are EXACTLY the same in all instances.
If 1 tiny bit changes, you get a new order/folder for that one

Larry Niven & Greg Benford
Greg Benford & Larry Niven
Larry Niven & Mark O. Martin & Greg Benford

Those are 3 different {Authors} < there is a S for a reason
Spelling matters
Order matters

The whole advantage of Calibre type Management is it does not care that Greg had additional authors in some books. the manager (calibre) can show any book where Greg was listed as AN Author

If you want author info in a series based filing, put it at the end, where it does not mess up the index order (most folk want series listed in ORDER)

Series/index title authors
theducks is offline   Reply With Quote
Old 03-11-2015, 12:26 PM   #43
Thomas_AR
Zealot
Thomas_AR began at the beginning.
 
Thomas_AR's Avatar
 
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
I understand.
What I wanted is to sort (folder) by series and if no series output by author. It just would have been nice if in the folder name in case of one author his name would appear behind the series and in case of multiple authors just the series.
Well I will go back to one of the previous solutions.
Thanks again for your help.
Thomas

P. S.
Each book in my series has only ONE author in each book, but one author could have written several books.

Last edited by Thomas_AR; 03-11-2015 at 12:39 PM.
Thomas_AR is offline   Reply With Quote
Old 03-11-2015, 12:46 PM   #44
Thomas_AR
Zealot
Thomas_AR began at the beginning.
 
Thomas_AR's Avatar
 
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
I just had an idea.
What If I ad a custom field, etc. in those books of those series - like "#genre and content would be MTS for Multi Author Serie.
That can be easily done with Calibre for existing and new books.
Would that help to get it done?

Last edited by Thomas_AR; 03-11-2015 at 10:53 PM.
Thomas_AR is offline   Reply With Quote
Old 03-11-2015, 11:38 PM   #45
Thomas_AR
Zealot
Thomas_AR began at the beginning.
 
Thomas_AR's Avatar
 
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
Ok, that seams to do the trick - perhaps there are for sure things to improve?

I added simple the Tag "MAS" (Multi Author Series) to "tags", than using:
Code:
program:

# return separator+authors if no Multi Autor Serie (MAS) is found, or return empty
various_authors=in_list(
	field('tags'),
	'&',
	'MAS',
	'',
	 strcat(' - ', field('authors'))
);
end_template=template('{series_index:0>4s| | - }{title} - {authors}');

start_template=test(
	field('series'),
	strcat(
		'_ ',
		field('series'),
		various_authors
	),
	field('authors')
);

strcat(start_template, '/', end_template);
..it seams to work as expected.

Just saw that there is a DC: tag which is not used in Calibre. DC:type This would be perfect for my goal.

http://www.idpf.org/epub/301/spec/ep...l#sec-pub-type

I know its epub 3.x, but should do it in case of using it for a templates.
Any chance to add this DC: type column into the Tag-Editor?

Last edited by Thomas_AR; 03-12-2015 at 12:53 AM.
Thomas_AR is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Send to device - Template help Snow Sciles Library Management 12 05-26-2014 05:16 PM
Generic "Sending to Device" template not kicking in on Folder Device At_Libitum Library Management 2 11-01-2013 07:12 AM
Save to Device template HFC3 Library Management 6 07-08-2013 11:48 AM
Save template for sending books to Kindle 3 Eaglebeak60 Devices 2 02-14-2011 06:12 PM
Send to device template rockeh Calibre 6 08-17-2010 05:28 PM


All times are GMT -4. The time now is 01:39 AM.


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