Hello.
I'm still fiddling with a long time problem: how to build a dynamic list for easy access to the most accessed files and folders?
I thought PFA could be the answer but it seems to be too complicated, not to mention the fact that PFA does not intercepts folders at all.
Most accessed files / folders should be put on top of each respective listing.
Anyone, please...?
xyRecents - Recents, the XY Way
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
xyRecents - Recents, the XY Way
Last edited by SkyFrontier on 17 Jul 2014 08:44, edited 1 time in total.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Re: Script Request - Most Accessed Files and Folders
Who decides when a file/folder is most accessed? You give it as an input?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: Script Request - Most Accessed Files and Folders
Hi, Marco.
Ideally, each double click on files or each visited folders.
Each click on file adds a respective point to Clicked Files on an .ini file. Files with higher points are kept on top ranking.
Similarly happens to visited folders.
-see where PFA could be a way to add points to visited folders?
*OF COURSE* alternative methods can be presented as long as they don't imply much impact on my regular file management routines.
"Mouse or keyboard based?", you may ask. "Both inputs", I'd answer.
A SECOND PAIR COULD EXIST, listing recently-acessed items, as sometimes I need to reach recently accessed stuff, sometimes the most accessed ones.
Think on "recent locations" and "hotlist" buttons with files support, file-based and you'll get a better picture.
Thanks for the interest.
Ideally, each double click on files or each visited folders.
Each click on file adds a respective point to Clicked Files on an .ini file. Files with higher points are kept on top ranking.
Similarly happens to visited folders.
-see where PFA could be a way to add points to visited folders?
*OF COURSE* alternative methods can be presented as long as they don't imply much impact on my regular file management routines.
"Mouse or keyboard based?", you may ask. "Both inputs", I'd answer.
A SECOND PAIR COULD EXIST, listing recently-acessed items, as sometimes I need to reach recently accessed stuff, sometimes the most accessed ones.
Think on "recent locations" and "hotlist" buttons with files support, file-based and you'll get a better picture.
Thanks for the interest.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Re: Script Request - Most Accessed Files and Folders
Default PFA for folders are not allowed. related topic
I say this concept might be difficult to realize without CEA.
I say this concept might be difficult to realize without CEA.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: Script Request - Most Accessed Files and Folders
I say it is practically impossible.SammaySarkar wrote:I say this concept might be difficult to realize without CEA.
Re: Script Request - Most Accessed Files and Folders
I think it's possible except for empty folders.
However, the solution is complicated...
1) Create an Extra Tag to track the count of times an item is opened or browsed.
2) Set your PFAs to a single item for all files. It will increment the Extra Tag and then do whatever you want to open the files; somewhere there's a script that emulates XY's PFA that would be useful here.
3) Create a Custom Column script that triggers on browse for all files and folders.
This script will be used to detect browsing to a folder (so the column will need shown at all times). However, since the script runs for each item within a folder you'll need to set and check some permanent variables to ensure you only count entering the folder once rather than once for every child.* This is also why it cannot track empty folders, since the script won't run. This script can play double duty by showing the most accessed extra tag so it's not a complete waste of space.
You'll likely want to use one PV to store the current path and another to track when the script was last run. If this is not the same location as the PV's value OR the last checked PV was more than some time ago (let's say 5 seconds), update each PV value and increment the current path's Extra Tag. In all cases return the Extra Tag value for that item.
One place that might be troublesome is handling Search Results, Flat Views, and now Paper Folders - as the meaning of current path is a bit more complicated.
In theory that should work for the majority of items; I'm just not sure how well it will work in practice.
Another option might be to track views of an item with a custom column and extra tag. Then you might be able to determine your most accessed folder by the items with the most views.
In both cases you're going to be making your tag.dat file rather large since it will need to contain every item you open or view.
* This is another case for the idea of Global variables surviving the duration of the browse. The first item will check it, see it's not set, set it, and do whatever the script does. The other items will check it and see it is set so they can act differently. Then after the last item's script is run (or the user browses to a new location) the global variable will be unset.
However, the solution is complicated...
1) Create an Extra Tag to track the count of times an item is opened or browsed.
2) Set your PFAs to a single item for all files. It will increment the Extra Tag and then do whatever you want to open the files; somewhere there's a script that emulates XY's PFA that would be useful here.
3) Create a Custom Column script that triggers on browse for all files and folders.
This script will be used to detect browsing to a folder (so the column will need shown at all times). However, since the script runs for each item within a folder you'll need to set and check some permanent variables to ensure you only count entering the folder once rather than once for every child.* This is also why it cannot track empty folders, since the script won't run. This script can play double duty by showing the most accessed extra tag so it's not a complete waste of space.
You'll likely want to use one PV to store the current path and another to track when the script was last run. If this is not the same location as the PV's value OR the last checked PV was more than some time ago (let's say 5 seconds), update each PV value and increment the current path's Extra Tag. In all cases return the Extra Tag value for that item.
One place that might be troublesome is handling Search Results, Flat Views, and now Paper Folders - as the meaning of current path is a bit more complicated.
In theory that should work for the majority of items; I'm just not sure how well it will work in practice.
Another option might be to track views of an item with a custom column and extra tag. Then you might be able to determine your most accessed folder by the items with the most views.
In both cases you're going to be making your tag.dat file rather large since it will need to contain every item you open or view.
* This is another case for the idea of Global variables surviving the duration of the browse. The first item will check it, see it's not set, set it, and do whatever the script does. The other items will check it and see it is set so they can act differently. Then after the last item's script is run (or the user browses to a new location) the global variable will be unset.
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: Script Request - Most Accessed Files and Folders
I'm building concepts, snippets, lots of head scratching...
Had time to improve my current workflow and I'm saving time on reopening sessions even after system restarts, but now it's time to focus on saving time navigating thru the seas of managed stuff.
I see I may find a solution based on TheQwerty's notes, too (thanks, TQ!) but just had another idea to develop on. Will come back with something (in hopes) as soon as I get a more elegant model to present to you.
Had time to improve my current workflow and I'm saving time on reopening sessions even after system restarts, but now it's time to focus on saving time navigating thru the seas of managed stuff.
I see I may find a solution based on TheQwerty's notes, too (thanks, TQ!) but just had another idea to develop on. Will come back with something (in hopes) as soon as I get a more elegant model to present to you.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
-
SkyFrontier
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: xyRecents - Most Accessed Files and Folders
I made it.
-keep track of all files and folders launched by the script. Yes, everything;
-take control of how many entries will be displayed (default value allows 175 entries of 255 chars each, but a real case usage is allowing more than 700 items to chose from!);
-LiveFilter your recent files/folders!;
-launch multiple items at once with checkbox facility;
-duplicates are kept so you can track entire sessions of files+folders, re-launching them easily;
-have multiple folders launched as tabs instead of WinExplorer windows;
-plain-text based logs.
xyRecents_writer.xys will write the base files storing files and/or folders you launch; it is advised you use UDC to store it so a keyboard shortcut can be defined to launch-and-log your files and folders. Tip 1: "enter" cannot be reassigned to this; tip 2: this function totally ignores "recents" folders as well as "enter"-launched items.
xyRecents_launcher.xys will read the logs and display them (inputselect, checkboxes) in a recents-on-top list. Chosen items will be re-added to the logs, keeping fresh stuff always at hand. As said, multiple selections are possible.
-disclaimer: there's a little issue concerning specil folders like "desktop" - no time to play with bug fixing this, but I'm open to discussion and enhancements/suggestions.
I am having some time constraints, so expect not much upgrades for this. Requests will be considered.
__________________
Estrelinha: dedico mais esse trabalho a Você. Obrigado por trazer os sonhos de volta à realidade!
-keep track of all files and folders launched by the script. Yes, everything;
-take control of how many entries will be displayed (default value allows 175 entries of 255 chars each, but a real case usage is allowing more than 700 items to chose from!);
-LiveFilter your recent files/folders!;
-launch multiple items at once with checkbox facility;
-duplicates are kept so you can track entire sessions of files+folders, re-launching them easily;
-have multiple folders launched as tabs instead of WinExplorer windows;
-plain-text based logs.
xyRecents_writer.xys will write the base files storing files and/or folders you launch; it is advised you use UDC to store it so a keyboard shortcut can be defined to launch-and-log your files and folders. Tip 1: "enter" cannot be reassigned to this; tip 2: this function totally ignores "recents" folders as well as "enter"-launched items.
xyRecents_launcher.xys will read the logs and display them (inputselect, checkboxes) in a recents-on-top list. Chosen items will be re-added to the logs, keeping fresh stuff always at hand. As said, multiple selections are possible.
-disclaimer: there's a little issue concerning specil folders like "desktop" - no time to play with bug fixing this, but I'm open to discussion and enhancements/suggestions.
I am having some time constraints, so expect not much upgrades for this. Requests will be considered.
__________________
Estrelinha: dedico mais esse trabalho a Você. Obrigado por trazer os sonhos de volta à realidade!
- Attachments
-
xyRecents_writer.xys- (2.38 KiB) Downloaded 147 times
-
xyRecents_launcher.xys- (3.74 KiB) Downloaded 133 times
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
XYplorer Beta Club