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-11-2012, 10:30 AM   #1
morawcik
Junior Member
morawcik began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2012
Device: none
"New" sort in text column

Hi.
In my Calibre library I stored Star Wars eBooks and I have problem. I have column "Timeline" where I set data like:
  • 5000 BBY
  • 3000 BBY
  • 23000 BBY
  • 2400 ABY

I need sort it first for text (BBY before ABY) and after sort the numbers like:
  • 23000 BBY
  • 5000 BBY
  • 3000 BBY
  • 2400 ABY

But I don't have any idea how I can do this. If I use text type for this colum it give me:
  • 5000 BBY
  • 3000 BBY
  • 2400 ABY
  • 23000 BBY

Someone can help me, please?
morawcik is offline   Reply With Quote
Old 03-11-2012, 10:43 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,798
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
1) Sorting is left to right (known as an Alpha Sort)
2) Leading Zeros are needed on numbers so that all digits have the same amount of characters.

Keeping that in mind
The letters need to be first if they are more important to the sort (rule 1)
to keep the secondary info in order you need to use rule 2 Except you can use an additional space instead because the digits are NOT at the beginning of the string (note that spaces are very hard to see when editing, making the ugly leading zero a better choice)

EDIT
I just noticed you want ABY after BBY that is a reverse sort in the middle of a string.
The only way I see, is 2 columns: Year, Era

Sort by Year to set the number bias, the sort by Era (descending)

Last edited by theducks; 03-11-2012 at 10:49 AM.
theducks is offline   Reply With Quote
Advert
Old 03-11-2012, 11:06 AM   #3
morawcik
Junior Member
morawcik began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2012
Device: none
It's doesn't work. My 2 times:
36453 BBY
5000 BBY

and when I change it to
036453 BBY
005000 BBY

it's give me
005000 BBY
036453 BBY
morawcik is offline   Reply With Quote
Old 03-11-2012, 11:17 AM   #4
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,798
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
That was Sort Ascending (the first time click)
Click the column head again

OR

Right click the column heading and select
Sort on: Descending
theducks is offline   Reply With Quote
Old 03-11-2012, 11:21 AM   #5
morawcik
Junior Member
morawcik began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2012
Device: none
Thanks, it's work!

It is possible to hide this column but sort by it?
morawcik is offline   Reply With Quote
Advert
Old 03-11-2012, 11:43 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,798
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 morawcik View Post
Thanks, it's work!

It is possible to hide this column but sort by it?
Yes!
Set your Startup sort(s)(direction) order in the Preferences: Tweaks

Note this sorting only lasts until you sort on a different column (the tweak stays)
Then you will need to restart or un-hide and then sort again.
The column position can be placed anywhere
theducks is offline   Reply With Quote
Old 03-11-2012, 01:29 PM   #7
morawcik
Junior Member
morawcik began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2012
Device: none
Thank You very much. It's work perfect!
morawcik is offline   Reply With Quote
Old 03-11-2012, 11:18 PM   #8
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Having read this, and after checking what "BBY" and "ABY" meant, I would be tempted to store the years as a number. Then use a negative number for BBY and a positive for ABY. I would probably leave it at that, but I think you could create a column that displays this as a positive number with the suffix. But, I'm not sure if you could get this column to sort using the original. Unfortunately, I don't have my laptop and Calibre with me today to experiment. Though it is fortunate for my work productivity
davidfor is offline   Reply With Quote
Old 03-13-2012, 03:11 PM   #9
uli
Zealot
uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.
 
Posts: 106
Karma: 194274
Join Date: Jun 2011
Location: Montreal
Device: Kobo, Calibre
If I had more Star Wars Book I'd do this.

Also take a look at View Manager plugin to save multi column sorts. Call it Star Wars and it sort by Timeline, Series, Author.
uli is offline   Reply With Quote
Old 03-14-2012, 01:10 AM   #10
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
I had a play with the suggestion I made. Unfortunately, it didn't work.

I added two columns:

- #year - Integer
- #yearepoch - a column based on another.

For the #yearepoch, I used the template:

{#year:'cmp($, 0, multiply($, -1), $, $)'} {#year:'cmp($, 0, 'BBY', 'ABY', 'ABY')'}

This gives a display like what was asked for. Unfortunately, the sorting is based on the displayed data, not the value of #year.
davidfor is offline   Reply With Quote
Old 03-17-2012, 11:44 AM   #11
morawcik
Junior Member
morawcik began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2012
Device: none
I do this with column with positive and negative years (BBY is - and ABY is +) and it's work greate. Finally I can change age representation for pos/neg char.
morawcik is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom column: "Updated date", when adding new "versions" of the same file? enriquep Library Management 16 11-03-2011 10:46 AM
Opus "Search in text" feature Heavymachinegun Bookeen 8 10-22-2009 10:52 AM
Question - Does iLiab have the "search" & "annotation, highlighting" features? HiSoC8Y iRex 5 07-01-2009 04:37 PM


All times are GMT -4. The time now is 05:29 PM.


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