![]() |
#16 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
|
In the line
Code:
find "$STARTDIR" -type f -name 'manifest.xml' > match.tmp You could try Code:
find /mnt/cf -type f -name 'manifest.xml' If I get some time later today I'll add some logging code to the script so we can see what is going on at each stage. |
![]() |
![]() |
![]() |
#17 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
|
I have added some logging code (new version at the top of this thread). This produces a search-log.txt file that should appear in your contentlister. Here's an example of the results while searching the internal memory:
Code:
This search was done on: Mon Aug 11 13:06:23 GMT-01:00 2008 STARTDIR (where the search will start from): "/mnt/free" STRING (the string we are searching manifest files for): illiam Number of manifest.xml files found: 33 Number of manifest.xml files that contain the search string: 0 Initially I found that it was working with USB and internal memory, but not CF. This baffled me for a bit, but it turns out I need to have a trailing slash at the end of the STARTDIR. I have added trailing slashes to the paths in the config file and have confirmed that it now works with CF. I cannot explain why it worked before with /mnt/usb and /mnt/free but not /mnt/cf. Please try the new version at the top of the thread and let me know if it works. BTW, thanks for sticking with this and not giving up on it. I don't normally use CF so I had no idea it was not working. |
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Connoisseur
![]() ![]() Posts: 80
Karma: 111
Join Date: Apr 2008
Device: iliad V2; ipad 2-64GB,3G
|
WOOOWWW!!!
WONDERFUL!! You are a true genius, Daudi!
I am sorry that I did not stick to the issue earlier. I was on a business trip, and tried a couple of times after your last email... unsuccessfully, so I got discouraged. I did not want to keep bugging you, as I do know that you are doing all of this as a passion, totally free, and you have already given to the iliad community SO MUCH!!! The correction works wonderfully, Just what I needed, with my so many ebooks...and you can even access the books fro the result folder!?! This is totallly CRAZY!!! THANKS A MILLION!!! If God did not create you, I would have created you!!! May God bless you!! Dabon. |
![]() |
![]() |
![]() |
#19 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
|
Dabon,
Thank you for your kind and enthusiatic words (I'm blushing). I'm glad it is now working for you. I fear you might have over-estimated my contribution just a tad, but I'll use your reply as an excuse to treat myself to a beer tonight. |
![]() |
![]() |
![]() |
#20 |
Member
![]() Posts: 13
Karma: 10
Join Date: May 2008
Location: Pacific Northwest, US
Device: iRex Iliad
|
I'm glad to see Dabon got it working. I'll be trying it when I get home tonight. If I'm lucky, I can soon post the windows iLiad tool I am writing, which relies on this tool, the java merger, and hopefully your snippet tool.
Update: It certainly does work now. I've been experimenting with your script (which is fun, since I have only breaking (as opposed to working) knowledge of linux commands). I see the actual search is done using grep, so I am trying to use regular expressions with it so I can search for two non-consecutive words in the descriptions. I am trying to search for thinks like (foo)+|(bar)+, but to no avail. even a simple (foo) does not find anything, even when foo would. Alternately, if the results could be searched, then this would be fine. Any input would be appreciated. As it is, I might try writing a separate search script that only searches the results of the other script. painful, but it might be usable. Thanks, Last edited by engunneer; 08-11-2008 at 11:48 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
|
Regular expressions do work. I am aware that there are some implementation differences for regexprs and something like
Code:
(foo)+|(bar)+ Code:
\(foo\)\|\(bar\) Code:
foo.*bar NOTE: I should probably say "\(brackets\)\|\(parentheses\)" depending on whether you are using british or american english ![]() Last edited by daudi; 08-12-2008 at 02:09 AM. |
![]() |
![]() |
![]() |
#22 |
Member
![]() Posts: 13
Karma: 10
Join Date: May 2008
Location: Pacific Northwest, US
Device: iRex Iliad
|
Thanks for the late reply. The regex does work, but now I need to learn regex. (Specifically, how can I do AND instead of OR, and yet not know word order?)
Also, perhaps the script could take a comma separated list and do an and? I will try tinkering with this on my own, so don't feel compelled to reply right away or spend a bunch of time on it. I don't mind the tinkering. Thanks again for explaining. |
![]() |
![]() |
![]() |
#23 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Kent, UK
Device: iRex iLiad, Psion 5MX, nokia n800
|
One idea I was thinking about was creating result sets that can be combined. So, instead of just creating a directory of results that is reused for each search, the results of each search could be stored in a separate directory, e.g. results-1, results-2, etc. Another script could then take further input to say how these result sets should be combined, e.g. (results-1 OR results-2) AND results-3. This could be written in ovid syntax just using the numbers: (1 OR 2) AND 3. The other alternative is to write something that will parse user input that is a little more friendly than regexprs, so people could enter something like google searches. To be honest I doubt I'd create something like this unless there were "many" people who want it.
Quote:
Code:
\(foo.*bar\)\|\(bar.*foo\) Last edited by daudi; 08-14-2008 at 02:46 AM. |
|
![]() |
![]() |
![]() |
#24 |
Enthusiast
![]() Posts: 45
Karma: 10
Join Date: Aug 2008
Device: Iliad
|
I have to say, for me as a complete novice in this kind of thing, it would be invaluable.
I guess it depends on how many others feel it would be useful! If only Irex had thought about this kind of stuff |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
SD Directory Limit | single650 | Sony Reader | 3 | 03-09-2010 04:45 AM |
I Can't add a directory | takelu | Calibre | 2 | 02-05-2010 07:21 PM |
directory structure | Dopedangel | Calibre | 7 | 08-20-2009 06:17 AM |
iLiad Directory Tree | The GreatGonzo | iRex Developer's Corner | 2 | 09-18-2007 11:52 AM |
Google Book Search to search full-text books online | Bob Russell | Deals and Resources (No Self-Promotion or Affiliate Links) | 1 | 08-19-2006 12:13 PM |