|  02-05-2011, 08:08 AM | #1 | 
| Jr. - Junior Member            Posts: 586 Karma: 2000358 Join Date: Aug 2010 Location: Alabama Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10" | 
				
				Question about creating columns
			 
			
			I think I posted this in the wrong forum earlier.  I'll try again. I am trying to find a way to create a column that will hold and display the author's last name only. I created such a column but I have to hand enter the name. I use this to create my download file name, (Poe-Raven, The.epub) I would also like to know how I can get the new title_sort field to display as a column and also use it to create my download name. I have been doing this by had as well. Any help would be greatly appreciated. Thanks and regards - John | 
|   |   | 
|  02-05-2011, 11:24 AM | #2 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			You have to create a composite column and use the template language. See User Manual for details on the template language. This is not an area of the code I work on/use, so I can't be more specific than that.
		 | 
|   |   | 
|  02-06-2011, 01:33 AM | #3 | |
| Addict            Posts: 385 Karma: 6514 Join Date: Aug 2010 Location: Denmark Device: Kindle 3 3G+Wifi, Oasis | 
				
				Need more info
			 Quote: 
 I need to see an example of the info you have in the Authors and Author_sort fields too figure this out. However if you create a custom column, choose Column Type as "Column built from other columns", enter Code: {title_sort}But maybe I'm not quite understanding your request.   | |
|   |   | 
|  02-06-2011, 09:25 AM | #4 | 
| Zealot            Posts: 110 Karma: 5176 Join Date: Dec 2010 Device: Mac OSX, iPad, iPod, & Nook | 
			
			Let me just question your concept a little by saying there are many authors with the same last name that could be lumped together in your 'download' (I assume you mean save-to-disk). This could become a problem for you later when you have 4 authors named Brown and you can't remember who wrote which book. For instance, if you saved your whole library in that format how could you find all the books written by Dan Brown vs all the books written by John Brown or Sandra Brown? Just a suggestion. Happy Sunday Archon | 
|   |   | 
|  02-06-2011, 12:55 PM | #5 | |
| Well trained by Cats            Posts: 31,249 Karma: 61360164 Join Date: Aug 2009 Location: The Central Coast of California Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A | Quote: 
  I'm with you: 2100 books: (only 2 Browns  ) 3 Andersons 3 Greens 3 Hamiltons 4 Jones Lots of 2's (Many not related) | |
|   |   | 
|  02-06-2011, 09:25 PM | #6 | |
| Jr. - Junior Member            Posts: 586 Karma: 2000358 Join Date: Aug 2010 Location: Alabama Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10" | Quote: 
 Beats me. Regards -John | |
|   |   | 
|  02-06-2011, 10:06 PM | #7 | |
| Jr. - Junior Member            Posts: 586 Karma: 2000358 Join Date: Aug 2010 Location: Alabama Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10" | Quote: 
 I created an additional column the I use to hand enter the last name of the author. The original, full name, column is still there so there is no confusion in Calibre. And since the metadata is still intact the file name has no effect on the readers. But it helps with the Sony which allows sorting by file name - no change to the display. Where it is really handy is with the JetBook Lite. It is a pure DOS file system so I setup folders with genre names and place the books in them. I wanted the last name only so that it would be an author sort but would take up minimum space allowing me to see as much of the title as possible. The question is moot now. Since I have to set up some sort of template to have my "lastname" field automated and I am to lazy to learn how to do that, I will just leave well enough alone. My best to all- John | |
|   |   | 
|  02-07-2011, 01:44 AM | #8 | |
| Addict            Posts: 385 Karma: 6514 Join Date: Aug 2010 Location: Denmark Device: Kindle 3 3G+Wifi, Oasis | Quote: 
 Sorry to ask this, but .. did you remember to click Apply when creating the custom column before leaving the costum column window ? | |
|   |   | 
|  02-07-2011, 05:01 AM | #9 | |
| Jr. - Junior Member            Posts: 586 Karma: 2000358 Join Date: Aug 2010 Location: Alabama Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10" | Quote: 
 My solution was about the same sort of thing. The column was created but displayed off screen and then, I didn't remember that you had to create the column for each library. Oh well, I'll just chalk it up to "old timers disease",  with my apologies  to the forum members. Regards - John Last edited by Jabby; 02-07-2011 at 05:04 AM. | |
|   |   | 
|  02-07-2011, 09:43 AM | #10 | 
| Wizard            Posts: 3,130 Karma: 91256 Join Date: Feb 2008 Location: Germany Device: Cybook Gen3 | 
			
			If this is still relevant, this template should do what you wanted to do in your original post for the first of the authors: Code: {author_sort:re(\,.*,)} | 
|   |   | 
|  02-07-2011, 12:26 PM | #11 | 
| Zealot            Posts: 110 Karma: 5176 Join Date: Dec 2010 Device: Mac OSX, iPad, iPod, & Nook | 
			
			Manichean's solution works to create the custom column when you use the 'Column built from other columns' and paste it into the 'Template' field and then restart. I named my custom column 'lastname' for the sort field and Author Lastname to display but you can call it what you wish. Just adjust the 'save to disk' statement I have here accordingly. Then just put this into the 'save to disk' field for naming the files. {#lastname}_{title} Then I got this file saved to disk for example: Dickson_Call Him Lord.epub It still saves the files with the .jpg cover and the .opf file you will have to sort out and trash if you don't need them. Interesting problem. I learned something today. The day is a success. Archon | 
|   |   | 
|  02-07-2011, 04:23 PM | #12 | |
| Jr. - Junior Member            Posts: 586 Karma: 2000358 Join Date: Aug 2010 Location: Alabama Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10" | Quote: 
 I'm just starting some regex tutorials but I'm still pretty confused. I'll sort it in time (maybe?). Regards -John | |
|   |   | 
|  02-07-2011, 04:30 PM | #13 | |
| Jr. - Junior Member            Posts: 586 Karma: 2000358 Join Date: Aug 2010 Location: Alabama Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10" | Quote: 
 Thanks to both -John | |
|   |   | 
|  02-08-2011, 05:40 AM | #14 | |
| Wizard            Posts: 3,130 Karma: 91256 Join Date: Feb 2008 Location: Germany Device: Cybook Gen3 | Quote: 
 | |
|   |   | 
|  02-08-2011, 06:37 AM | #15 | |
| Wizard            Posts: 2,013 Karma: 251649 Join Date: Apr 2010 Location: Tempe, AZ, USA, Earth Device: JetBook Lite (away from home) + 1 spare, 32" TV (at home) | Quote: 
 ", I was so confused, my eyes were crossing and glazing over and I had the starts of a headache. Seriously, it may make sense to you but it won't to everyone (especially me; having ADD, I had serious trouble trying to stay focussed on it). | |
|   |   | 
|  | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Curious - what custom columns are you creating/using? | texasnightowl | Calibre | 16 | 05-28-2015 10:26 AM | 
| Creating columns | Jabby | Library Management | 0 | 02-04-2011 05:46 PM | 
| Been away for a few releases...question about custom columns support | texasnightowl | Calibre | 3 | 10-14-2010 09:48 AM | 
| Creating custom columns is broken in 0.7.3 | chaley | Calibre | 6 | 06-20-2010 03:40 AM | 
| Question: Creating a Folder only for Classics | Dr. Drib | Sony Reader | 7 | 08-22-2007 03:09 AM |