[β] Everything in XYplorer — Rev. 0.96 / 2014/07/24

Discuss and share scripts and script files...
Post Reply
Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: [β] Everything in XYplorer — Rev. 0.92 / 2014/07/08

Post by Marco »

No, found a nice way to handle it :)
Re last night. I remember hearing years ago, on a documentary, that basketball scores where, at the beginning of the century, like the ones of football, single digits. Last night was going to be the opposite :o

PS: so the script should not handle deletion of its paper folder - no more Purge function?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

Re: [β] Everything in XYplorer — Rev. 0.92 / 2014/07/08

Post by Enternal »

Marco wrote:No, found a nice way to handle it :)
Re last night. I remember hearing years ago, on a documentary, that basketball scores where, at the beginning of the century, like the ones of football, single digits. Last night was going to be the opposite :o

PS: so the script should not handle deletion of its paper folder - no more Purge function?
It seems to be the agreement from everyone here about the purge function. I personally did not use it either since I used PaperList to do that since it's selective.

Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: [β] Everything in XYplorer — Rev. 0.92 / 2014/07/08

Post by Marco »

Ok. Back to the monolith.

And regarding showing the search query in the status bar and then as a comment: yay or nay? In the tab caption is not possible because when you change location the new title stays, generating confusion. Plus, there might be a | that would be interpreted as icon separator > no good. Any other idea is welcome.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

sinilill
Posts: 111
Joined: 02 Dec 2013 18:37

Re: [β] Everything in XYplorer — Rev. 0.92 / 2014/07/08

Post by sinilill »

IMO with only one paper folder for the search result, then there's no need for showing the search query anymore, but maybe in the future when there's a better way to do it.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: [β] Everything in XYplorer — Rev. 0.92 / 2014/07/08

Post by admin »

I like it in the status bar!

Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: [β] Everything in XYplorer — Rev. 0.92 / 2014/07/08

Post by Marco »

Ok, just in time, I was releasing 0.93!
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: [β] Everything in XYplorer — Rev. 0.92 / 2014/07/08

Post by FluxTorpedoe »

My oh my!
This one is terrific — especially on a low-end machine with indexing disabled. Extremely impressive!
So many thanks Marco for sharing this tool and script with us. :D

And since I just discovered papers and runret along with Everything, I must admit I was so enthusiastic that I went berserk with your script... :oops: :twisted:

I'm short on time so I couldn't read all the posts and I can't test under different OSes/codepages, etc. I don't know if you're ok with me posting an alternate suggestion —clearly based and inspired by your script—, but I thought there might be some ideas that can be used to fuel the next version(s). I've kept your code as-is as much as possible so it will be easier to compare.
Anyway if you'd rather I remove it, don't hesitate to say so. :)

------------------

Quick summary of the ideas:
Enter search in AddressBar just like a regular search: simply prefix the usual search with @ (Alias) e.g. "@? XY"
Limit search to current path (by default), like with regular searches
— Search everywhere by prefixing search terms with "\" , e.g. "@? \ XY"
Enable or disable diacritics by default (in script header), or on the fly (toggle) with switch "-d", e.g. "@? élite -d"
Autoload Everything if not running
AutoPurge of all Everything papers not in use, i.e. not currently opened in any tabs: all searches in different tabs/panes remain available

Now a good but not-so-good one:
• Much faster search result, "on the fly" without creating any file, by letting only XY create its own "paper" file, and only if results are found.
Rationale: I'd noticed the huge difference of speed between a search in ET and via the script was due to disk access (at least on a slow machine), so I used runret instead.
I see in your comment that you had discarded it because of problems with CJK, so my code is probably a regression in that regard. Though for European languages, it seems to work well.

Addendum to install notes:
– To register the "Everything Search Alias", enter the following line in the AddressBar and press Enter:

Code: Select all

@?=::global $PRE_query; $PRE_query="<@1>"; load "<xyscripts>\Everything in XYplorer.xys", "Find";
– Then to search, type in AddressBar: "@? " followed by your query, e.g. "@? FindMe"

Edit: Yikes, you just posted an update!!!... :P
(BTW, as an extra note, my tests were made on a WinXP - now it's time to try your new version!)

------------------
Attachments
Everything in XYplorer.xys
(24.56 KiB) Downloaded 284 times

Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: [β] Everything in XYplorer — Rev. 0.94 / 2014/07/09

Post by Marco »

Wow, the use of the alias seems cool! I gave the script a keyboard shortcut, but the alias too is fast.
Regarding runret(), yeah it was my first solution - so elegant, let me say. Maybe an if loop could be written, and if it doesn't detect Unicode chars in the query then it uses runret. In any case, the paper folder must be written on disk, before opening it.
I'll read more carefully your code. I already did once, and I see some nice ideas, like limiting the scope of the search to the current folder/branch (I thought about that in the early stages, but I wanted to first focus on passing the right query to es before adding features and switches).
Diacritics: let me see if I understand your workflow correctly... oh now I see your point, es by default doesn't discriminate between a and à, so a boolean parameter in the script to prepend diacritics: to the query and a switch to disable it on a per-case basis. Very clever, something that I will add! :D
Two quick words about the other points.
Autopurging: will consider it
Autoloading: I'm afraid it would slow down execution
Btw, I see you rename PF tabs with the query. You know that if you then browse from that tab to another location the title remains fixed, don't you? Personally I don't like it. Plus, what if the query contains a | ? That breaks XY because it thinks you passed an icon for that tab.

And... how much you know about C++ and copydata structs?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: [β] Everything in XYplorer — Rev. 0.94 / 2014/07/09

Post by FluxTorpedoe »

Hi'
Yep, aliases seem to have been made just for this! ;)
Marco wrote:Regarding runret(), yeah it was my first solution - so elegant, let me say. Maybe an if loop could be written, and if it doesn't detect Unicode chars in the query then it uses runret.
Yes, maybe that would give the best of both worlds (at the expense of more scripting).
Marco wrote:In any case, the paper folder must be written on disk, before opening it.
Hmmm not sure in which case...? Something along the lines of: [Edit: Previous "air code" was oversimplified, it should have been:]
$results = runret("cmd /c es $query", "$path");
if $results {paperfolder("<xypaper>\$paper", $results, , "nls");}

This seems to avoid disk access until the last moment (though it doesn't tackle the Unicode issue).
Marco wrote:Autoloading: I'm afraid it would slow down execution
Well, the detection is run only if the query didn't work (and still nothing is written to disk at this point), so that shouldn't impact regular use. I couldn't try about the service -svc part though...
Marco wrote:Btw, I see you rename PF tabs with the query. You know that if you then browse from that tab to another location the title remains fixed, don't you? Personally I don't like it. Plus, what if the query contains a | ? That breaks XY because it thinks you passed an icon for that tab.
Damn, you're right on both points... I didn't realize the tab renaming problem because I never browse in my search tabs in general (I always middle-click on folders when in search ;) ).
And about the | , yep I forgot the possible use of regex in the query!...
The rationale behind the paper tab renaming was because:
— I was using it to store/get the path of the (previous) search currently displayed in a paper tab, to make it work exactly like it does with regular searches, where you can run new searches directly from old searches while keeping the search limited to the same path.
— I liked the visual identification, especially since I had more than one paper-search-tab still opened.
There should be other ways to do that...

Well, I didn't have much time to try thing further... Oh, and regarding C++ copy data, I'm probably not the person to ask, sorry. :? :)

Have a nice day, 8)
Flux

Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: [β] Everything in XYplorer — Rev. 0.94 / 2014/07/09

Post by Marco »

I'm drowning in course textbooks for the next week, so won't be able to update the script till the 19th or so.
However, regarding runret v Unicode, the pseudo code would be

Code: Select all

$results = runret(command line)

if ($results != *?*) { //ie there are no question marks that indicate undisplayable Unicode characters
 paperfolder("<xypaper>\$paper", $results, , "nls") //merely copypasting your line
} else {
 write BOM
 run command line + appending to file
}
Not bad. The drawback would be doubling the time in case Unicode is required, because two queries are performed. Also, I should test myself if all I need to check is the presence of ?, or other characters could produce gibberish.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: [β] Everything in XYplorer — Rev. 0.94 / 2014/07/09

Post by Marco »

I got a message today, that there's another interesting software out there, similar to Everything: http://hddb.xp-zed.com/index.html
Any opinions about it?
The main feature is the UAC on demand, meaning that access to the MFT must be requested actively by the user. No background monitoring.
Can someone confirm that command line works only with the installed, non-portable version?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: [β] Everything in XYplorer — Rev. 0.94 / 2014/07/09

Post by FluxTorpedoe »

Marco wrote:However, regarding runret v Unicode, the pseudo code would be […]
Not bad. The drawback would be doubling the time in case Unicode is required, because two queries are performed. Also, I should test myself if all I need to check is the presence of ?, or other characters could produce gibberish.
Maybe the query term(s) could even be checked before for the presence of Unicode…?

As for hddb, I only tested it quickly and it seems interesting but not on par (at least now) with Everything. I only tried the portable version, which doesn't seem to have a command-line mode (plus by default it located its database in the Current User folder…).
Also, a search with diacritics doesn't work (e.g. "élite" can't be found), and a corresponding non-diacritics search has problems displaying words with diacritics (e.g. "elite" finds files "élite" but displays "[]lite"). So Unicode support seems rather unlikely.

Good luck with your course… :)
Flux

Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: [β] Everything in XYplorer — Rev. 0.94 / 2014/07/09

Post by Marco »

FluxTorpedoe wrote:Don't know how that should be handled... Good luck with that! :)
EDIT: Don came first, but was going to post exactly the same solution.
FluxTorpedoe wrote:Maybe the query term(s) could even be checked before for the presence of Unicode…?
I wish it was that simple! Technically, it's the formal/logical difference between if and iff (https://en.wikipedia.org/wiki/If_and_only_if)
If you have Unicode in the query you'll have Unicode in the results.
But you could still have Unicode in the results even if you don't have Unicode in the query (*.flac matches Монтекки и Капулетти.flac).
IOW, you'll have Unicode in the results if and only if you have Unicode in the query is a false statement.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: [β] Everything in XYplorer — Rev. 0.94 / 2014/07/09

Post by FluxTorpedoe »

Marco wrote:you'll have Unicode in the results if and only if you have Unicode in the query is a false statement.
Of course. :wink:
I was only suggesting a partial workaround to lower the need of running two queries in case of Unicode. i.e. if Unicode is present in the query, don't use the "runret" method but go straight for the "write to file" method.

Marco
Posts: 2347
Joined: 27 Jun 2011 15:20

Re: [β] Everything in XYplorer — Rev. 0.95 / 2014/07/23

Post by Marco »

New release, check the first post!
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

Post Reply