Page 2 of 3

Re: Bat file to search local Audacity Manual

Posted: Sat Aug 27, 2016 12:05 pm
by Gale Andrews
Java is considered something of a security risk (especially on Windows of course as the main "target" platform for malware writers).

So ensure your Java settings allow automatic updates and require you to be asked before untrusted Java applications will run. More information at https://java.com/en/security/.


Gale

Re: Bat file to search local Audacity Manual

Posted: Sat Aug 27, 2016 1:04 pm
by DickN
My reservation re: using an index to search label tracks in .aup files is the amount of irrelevant data an index file would contain unless there's a way to target particular tags in xml format documents. If there is, and adding new files to the library doesn't require re-scanning all the old ones, then yippee! - that's the way to go.

Brainstorm: Maybe I'll learn enough about Java to write an extractor to do just that.

Just for an estimate, how big is the index file for the Audacity manual?

Gale - Yes, I do keep Java UTD. I wouldn't be too concerned about running a 2010 Java app on any Java much newer than the app, however, especially an open-source one ;) .

Re: Bat file to search local Audacity Manual

Posted: Sat Aug 27, 2016 1:39 pm
by steve
DickN wrote:Just for an estimate, how big is the index file for the Audacity manual?
The database for Puggle seems to be 4.6MB after fully indexing the manual, but note that this is designed as a general purpose Desktop search, so it is probably storing a lot more information than we need. Even so, 4.6MB is a small file for modern computers.

Re: Bat file to search local Audacity Manual

Posted: Sat Aug 27, 2016 1:55 pm
by Gale Andrews
DickN wrote:I do keep Java UTD. I wouldn't be too concerned about running a 2010 Java app on any Java much newer than the app, however, especially an open-source one ;) .
Not really the point, Dick.

The point is that having Java installed creates an attack vector if an attacker can find a way to get a malicious java application installed or running on your computer, notably if you have Java enabled in your web browser.

So if you don't need Java to use any web pages you visit, disable Java in your browser. This is not the same as Javascript, of course.


Gale

Re: Bat file to search local Audacity Manual

Posted: Sat Aug 27, 2016 5:47 pm
by DickN
I currently have Java 11.101.2. I do frequent at least one website that requires it (astroviewer.com) and I have it set "ask to activate" in Mozilla.

But thanks for making me look up the difference between Java and Javascript. I thought it was all Javascript and that compiled Java was an executable. But to be platform independent, the runtime module has to be some meta-code that runs on a virtual machine which is written for each hardware platform.

So I won't be able to just write a custom extractor and edit it into Puggle - I'll have to get the compiler or the IDE and either compile Puggle along with it or, if it has provision for running external modules, create one with the required interface.

But wait a minute! Puggle downloads are for specific platforms. Wouldn't that imply that they run on the target processor? Guess I'll just have to see...

Re: Bat file to search local Audacity Manual

Posted: Sun Aug 28, 2016 12:40 am
by DickN
I installed Puggle on my Vista system. It puts two .exe files in Program Files (x86), so I doubt it's using the Java platform. I also downloaded the binary version and it contains the same two files which match these in a file compare.

First time I started it, there was a panel with my user folder and space to add others. I didn't want to index the whole computer, but by the time I finished unchecking all the file types I didn't want to include (and there was no way to add .aup to the assortment) I found it was already generating its database. I had only .txt, .pdf and .html selected. I tried a search, and there was no way to tell it which folder to search, only the class of files (documents, pictures, music and all). So it found hits from everywhere. Very quickly, I must concede.

The status shown at the bottom of the panel said optimizing was finished, which I take to mean it had finished indexing. When I closed the window, the process was still resident and taking ~100MB of RAM. I found a Puggle icon in the system tray but all it showed was "open...", which I tried and it opened the same window as the shortcut on the desktop. This time I went into Help, but Help doesn't seem to work. I tried the File menu and there was an Exit so I tried that. From the File menu, it wanted me to confirm my intent, which I did. Puggle was still in memory.

Then I tried a right-click on the system tray icon and there was Exit, so I tried that. The system tray icon disappeared, but not the memory footprint. I tried deleting the .Puggle data folder to force it to start over with the indexing so I could edit the path before it got too far. I launched Puggle again from the shortcut, only to find that I can't edit the initial default path - it's going to do the whole user account again. I closed the window. Then I noticed there were now two copies of Puggle in memory, each taking up ~100MB. I gave it a right-click, Exit from the system tray icon, and sure enough both copies were still there in memory. I gave up and stopped them both in Task Manager.

Steve speaks well of the Apple version, but I'm not very impressed with the PC version. It's not in Startup, so at least it shouldn't wake up with the OS.

Steve, did you find a way to append the rest of the help folder path to the default path so it doesn't index your whole machine? I guess for some people it might make sense to include all user files in a search, but for me that's way too much stuff.

Re: Bat file to search local Audacity Manual

Posted: Sun Aug 28, 2016 1:45 am
by steve
DickN wrote:Steve speaks well of the Apple version
The Linux version.

Re: Bat file to search local Audacity Manual

Posted: Sun Aug 28, 2016 1:54 am
by steve
DickN wrote:Steve, did you find a way to append the rest of the help folder path to the default path so it doesn't index your whole machine?
Yes, it was very straightforward.
On first launch it opens this window:
pug1.png
pug1.png (28.11 KiB) Viewed 569 times
As you can see, the default path is my Home folder, so I removed that (select the path then click the "- Re..." button), then added the folder containing the manual.
pug2.png
pug2.png (28.72 KiB) Viewed 569 times
Then click the "Close" button.
It then builds the index and is ready to go.

Re: Bat file to search local Audacity Manual

Posted: Mon Aug 29, 2016 10:44 am
by DickN
Arrrgh!

As my Dad used to say, "It could have bit me"!

Thanks, Steve

- DickN

Re: Bat file to search local Audacity Manual

Posted: Mon Aug 29, 2016 6:00 pm
by DickN
Interesting. I have now Puggle installed with just ...help\manual\man indexed.

Puggle gets: AudManSearch gets: (comment)
search string

190 matches 113 matches (Puggle gets 77 extra matches for "settings" - see *below)
settings

17 matches 17 matches
portable

17 matches 10 matches (Puggle's extra "settings" matches overlapped the other 7 "portable"s)
settings portable

1 match 1 match
"portable settings"

16 matches 9 matches (Both excluded the 1 match of "portable settings")
portable settings -"portable settings"

0 matches 7 matches (Puggle's extra "settings" matches overlapped the other 7 "portable"s)
-settings portable

20 matches 103 matches (Puggle: 20 vs 17 without the negation! I don't get it. There were 190 "settings"s and 17 "portable"s).
settings -portable (Swapping the order of the terms makes no difference, nor does putting them in quotes, nor does using '!' instead of '-'.)

1 match 1 match
settings portable "portable settings"

*I found that at least some (I'm guessing 'all') of the extra matches Puggle gets to settings and "settings" are because it accepts partial matches. "setting", for example, is taken as a match to "settings". Using quotes doesn't force exact match.

Too bad Help doesn't work. The subject list suggests the program is much more versatile that what I'm seeing. Or it could be that the missing Help text resides on the developer's computer as a "to do" list. I don't understand some of what Puggle is doing.

What's to like about Puggle?

It shows a sample of the matching text for each match.

It has stars - The number of stars highlighted for each match give some metric of relevance, maybe whether it's in the title, in a keyword list, or number of occurrences in the text.

It doesn't have the issue my .bat script has with getting control back after initially starting the HTML viewer (Mozilla).

It's pretty fast. OTOH, the .bat script only takes a few seconds to scan the whole folder the first time it's run. If you run it again (or do a new search), Windows has all the files cached anyway and then most searches take a second or less.

The only behavior I can confidently say is a bug (in the Windows version) is the "dog gone" memory leak at termination. If you launch Puggle and exit (not just close the window - Puggle will tell you it's already running if you try to start another instance) N times, you're left with N instances in memory taking 90-100 MB each, which you have to remove with Task Manager.

- DickN