Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex

Notices

Reply
 
Thread Tools Search this Thread
Old 08-11-2008, 02:45 AM   #16
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
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
$STARTDIR is the starting directory. That comes from the config file, and if you are using the CF entry it should be /mnt/cf. The find command looks for files (-type f) called manifest.xml (-name 'manifest.xml') starting from that directory.
You could try
Code:
find /mnt/cf -type f -name 'manifest.xml'
to see the file names (full paths) in the terminal.
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.
daudi is offline   Reply With Quote
Old 08-11-2008, 08:25 AM   #17
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
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
The "Delete results" entry will now delete the log file as well as the results.

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.
daudi is offline   Reply With Quote
Advert
Old 08-11-2008, 12:57 PM   #18
Dabon
Connoisseur
Dabon doesn't litterDabon doesn't litter
 
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.
Dabon is offline   Reply With Quote
Old 08-11-2008, 01:44 PM   #19
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
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.
daudi is offline   Reply With Quote
Old 08-11-2008, 08:40 PM   #20
engunneer
Member
engunneer began at the beginning.
 
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.
engunneer is offline   Reply With Quote
Advert
Old 08-12-2008, 02:01 AM   #21
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
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)+
does not work for me with grep on my iliad or my PC. You need to escape the brackets (see note below) and pipe, like this:
Code:
\(foo\)\|\(bar\)
For those who don't know regular expressions, this code above searches for either "foo" or "bar" in the manifest. For two words that both have to exist, but not necessarily right next to each other, e.g. "foo wibble wibble bar", it would be:
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.
daudi is offline   Reply With Quote
Old 08-13-2008, 11:57 PM   #22
engunneer
Member
engunneer began at the beginning.
 
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.
engunneer is offline   Reply With Quote
Old 08-14-2008, 02:42 AM   #23
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
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:
how can I do AND instead of OR, and yet not know word order?)
Try this as a search for "foo wibble wibble bar" or "bar wibble wibble foo" (not tested on the iliad):
Code:
\(foo.*bar\)\|\(bar.*foo\)

Last edited by daudi; 08-14-2008 at 02:46 AM.
daudi is offline   Reply With Quote
Old 08-14-2008, 07:55 AM   #24
curbarthedog
Enthusiast
curbarthedog began at the beginning.
 
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
curbarthedog is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 08:46 AM.


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