![]() |
#1 |
Member
![]() 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? |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 '&'.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() 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... |
![]() |
![]() |
![]() |
#4 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
I'm confused, in what app does Windows need semicolons? Calibre uses the '&' as the delimiter for author fields in Windows, Linux and OSX. |
|
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 23
Karma: 10
Join Date: Aug 2011
Device: none
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
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 What are you trying to do? |
|
![]() |
![]() |
![]() |
#7 |
Member
![]() 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. |
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
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).
|
![]() |
![]() |
![]() |
#9 |
Member
![]() 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. |
![]() |
![]() |
![]() |
#10 |
Member
![]() 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. |
![]() |
![]() |
![]() |
#11 |
Member
![]() 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? |
![]() |
![]() |
![]() |
#12 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
Good Luck with your solution. |
|
![]() |
![]() |
![]() |
#13 |
Member
![]() 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. |
![]() |
![]() |
![]() |
#14 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
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? |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |