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 08-21-2011, 06:50 AM   #1
darkbeanies
Member
darkbeanies began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Aug 2011
Device: none
Search and Replace Tag/Author Delimiters

Hello, I already asked this in my other thread, I know it's naughty but I thought maybe no one would read it in the other thread and I'd really, really like to be able to do this.

So, my authors are currently delimited by semicolons, like "Bill Brewer; Jan Stewer; Peter Guerney". I can search and replace semicolon with ampersand in calibre, and calibre then recognises these as separate authors. However, I cannot get search and replace to put the semicolons back again, because it will not let me replace the ampersand (represented by ":::" in the search and replace function.

Does anyone know if there is a regular expression or something for the delimiters?
darkbeanies is offline   Reply With Quote
Old 08-21-2011, 07:14 AM   #2
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Why would you want to delimit authors by a semicolon in the first place? The delimiter for author fields is '&'.
Manichean is offline   Reply With Quote
Advert
Old 08-21-2011, 07:26 AM   #3
darkbeanies
Member
darkbeanies began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Aug 2011
Device: none


BoooHooooo!

Because Windows uses semicolons.....

Waaaaaaaaaaaaaaaaaaaaaaah!!!!!!!

I do have a workaround lined up if this is not possible. A huge bash script to replace all the delimiters with semicolons.

This would be very painful though...
darkbeanies is offline   Reply With Quote
Old 08-21-2011, 07:59 AM   #4
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,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by darkbeanies View Post


BoooHooooo!

Because Windows uses semicolons.....

Waaaaaaaaaaaaaaaaaaaaaaah!!!!!!!

I do have a workaround lined up if this is not possible. A huge bash script to replace all the delimiters with semicolons.

This would be very painful though...
Why?

I'm confused, in what app does Windows need semicolons? Calibre uses the '&' as the delimiter for author fields in Windows, Linux and OSX.
DoctorOhh is offline   Reply With Quote
Old 08-21-2011, 08:07 AM   #5
darkbeanies
Member
darkbeanies began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Aug 2011
Device: none
Quote:
Originally Posted by dwanthny View Post

I'm confused, in what app does Windows need semicolons?
(Much Sobbing)

Windows Explorer.

Not internet explorer.

The file manager. The windows library system. The entire operating system.

(More sobbing)
darkbeanies is offline   Reply With Quote
Advert
Old 08-21-2011, 08:12 AM   #6
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,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by darkbeanies View Post
The file manager. The windows library system. The entire operating system.
I think you might be wrong.

I just saved a multiple author book to disk and this was the result in Windows Explorer.
Code:
\lahaye, tim & jenkins, jerry b_\left behind-02.00-tribulation force-tim lahaye & jerry b. jenkins.epub
I don't see a problem with Windows using & in the path.

What are you trying to do?
DoctorOhh is offline   Reply With Quote
Old 08-21-2011, 08:17 AM   #7
darkbeanies
Member
darkbeanies began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Aug 2011
Device: none
But is the author

"lahaye, tim & jenkins, jerry"

Like, one freak with an ampersand in their name

Or

"lahaye, tim"

and

"jenkins, jerry"

Two people with no ampersand in their names?

Also, what about tags? Is the tag "medieval, science, welding" a single tag containing all three, or three separate fields?

Just to clarify - Are you talking about a folder called "lahaye, tim & jenkins, jerry"?

With a book inside?

I am not talking about this. There is no problem calling a folder "blah&blah&blah&blah"

I am refering to the details view in windows explorer, which allows you to use columns such as author, tags, title etc. If you attempt to filter ampersand/comma delimited fields, they appear as a single field, unless they are delimited by the semicolon.

Last edited by darkbeanies; 08-21-2011 at 08:41 AM.
darkbeanies is offline   Reply With Quote
Old 08-21-2011, 08:52 AM   #8
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by darkbeanies View Post
I am refering to the details view in windows explorer, which allows you to use columns such as author, tags, title etc. If you attempt to filter ampersand/comma delimited fields, they appear as a single field, unless they are delimited by the semicolon.
I'm very confused. What on earth are you talking about? I only get the normal fields in details view (file name, date, size, type).
Manichean is offline   Reply With Quote
Old 08-21-2011, 09:00 AM   #9
darkbeanies
Member
darkbeanies began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Aug 2011
Device: none
Sigh. I get title, tags, author too.

Imagine I have a folder. Filled with pdfs.

Switch on details view. Right click on the fields at the top. Add a column, say "authors". Can you do this? I can in windows 7. You can add a lot of extra columns.

Right, so your authors are all blank, right? That's because you don't have an ifilter for pdf documents. Or epub, or whatever.

Right, I personally get every authors name, every tag, in the details view.

However, my tags are in a bit of a mess. The best way to organize tags is in calibre. Calibre does not recognize the semi colon. I need to change the semicolon to ampersand (for authors) or a comma (for tags).

Then, once i have organised all my tags/authors, i need to put the semicolon back, because windows explorer uses semicolons...

Please, just assume I'm right...

I can get you a screenshot if you'd like. It will be a couple of hours, though.

Last edited by darkbeanies; 08-21-2011 at 09:02 AM.
darkbeanies is offline   Reply With Quote
Old 08-21-2011, 11:07 AM   #10
darkbeanies
Member
darkbeanies began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Aug 2011
Device: none
And here is a solution for the Tags...works for pdfs in current directory. Very slow and painful.

#!/bin/bash

#DarkbeaniesMegaDeliminationScript

ls *.pdf > ~/test1
cat ~/test1 | sed 's/^/"/' | sed 's/$/"/' > ~/test2
sed 's/^/exiftool -Keywords /' ~/test2 > ~/test3
chmod +x test3
./test3 > ~/test4
cat ~/test4 | sed 's/\<Keywords\>//g' > ~/test5
cat ~/test5 | sed "s/://g" > ~/test6
cat ~/test6 | sed 's/^[ \t]*//' > ~/test7
cat ~/test7 | sed 's/[ \t]*$//' > ~/test8
cat ~/test8 | sed 's/, /\;\ /g' > ~/test9
cat ~/test9 | sed 's/^/"/' | sed 's/$/"/' > ~/test10
awk 'NR==FNR{a[FNR]=$0;next} {print a[FNR],$0}' ~/test10 ~/test2 > ~/test11
sed 's/^/exiftool -Keywords=/' ~/test11 > ~/test12
chmod +x ~/test12
./test12

Apparently works for author too. Just replace "Keywords" with "author", and the comma with an ampersand I guess...

Last edited by darkbeanies; 08-21-2011 at 11:16 AM.
darkbeanies is offline   Reply With Quote
Old 08-21-2011, 12:21 PM   #11
darkbeanies
Member
darkbeanies began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Aug 2011
Device: none
Look ,here's my details view:

http://imageshack.us/photo/my-images...tailsview.jpg/

and here's my library:

http://imageshack.us/photo/my-images/835/libraryx.jpg/

Good, eh?
darkbeanies is offline   Reply With Quote
Old 08-21-2011, 09:58 PM   #12
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,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by darkbeanies View Post
Right, I personally get every authors name, every tag, in the details view.

However, my tags are in a bit of a mess. The best way to organize tags is in calibre. Calibre does not recognize the semi colon. I need to change the semicolon to ampersand (for authors) or a comma (for tags).

Then, once i have organised all my tags/authors, i need to put the semicolon back, because windows explorer uses semicolons...
What you are doing is interesting, but seems limited to PDFs and doesn't apply to ePubs since Windows explorer doesn't read the metadata from those files.

Good Luck with your solution.
DoctorOhh is offline   Reply With Quote
Old 08-21-2011, 10:43 PM   #13
darkbeanies
Member
darkbeanies began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Aug 2011
Device: none
Yep. I myself am limited to pdfs. I could not care less if the epub format never existed.

Also, Windows explorer doesn't read data from pdfs properly either without massive punching and kicking and screaming...

I am sure it would be easy to make an ifilter for epub format, though, as they are just htmls really.

Hmm. Could be wrong about that actually.

On a happy note, all of my authors are now sorted! Hoorah!

Last edited by darkbeanies; 08-21-2011 at 11:02 PM.
darkbeanies is offline   Reply With Quote
Old 08-22-2011, 12:35 AM   #14
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,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by darkbeanies View Post
Yep. I myself am limited to pdfs. I could not care less if the epub format never existed.
True, if you are using a regular PC and not using a 5, 6 or 7 inch ereader then PDF would be the way to go.

Quote:
Originally Posted by darkbeanies View Post
I am sure it would be easy to make an ifilter for epub format, though, as they are just htmls really.
I'll take your word that it would be easy. However whether using PDFs or ePubs it just seems to be a bunch of extra hoops to jump through. I use calibre to manage my ebooks, personally I don't care how they might look in a file manager?
DoctorOhh is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
search and replace - drops blanks in replace ? cybmole Conversion 10 03-13-2011 03:07 AM
Search and replace not working helmerer Conversion 4 02-25-2011 03:48 AM
Search and replace in 0.2.0 paulpeer Sigil 7 03-13-2010 11:59 AM
Why no search and replace? charleski Sigil 10 11-24-2009 04:13 PM
Tag Cloud Search daffy4u Lounge 12 09-04-2008 12:40 AM


All times are GMT -4. The time now is 03:44 PM.


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