It is currently March 19th, 2024, 9:53 am

FileView plugin 2.1

Plugins and Addons popular with the Community
User avatar
Brian
Developer
Posts: 2672
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: FileView plugin [WIP]

Post by Brian »

Ah, I see. I was using the latest version as my reference, hence the reason I could not find the option.

Anyway, I already added the feature, so be sure to check back in a few days!

-Brian
User avatar
fragrant.monkey
Posts: 51
Joined: September 18th, 2010, 1:03 am

Re: FileView plugin [WIP]

Post by fragrant.monkey »

Brian wrote:Ah, I see. I was using the latest version as my reference, hence the reason I could not find the option.

Anyway, I already added the feature, so be sure to check back in a few days!

-Brian
Thank you very much for the addition, I do appreciate that. :great:

As to the latest version... yes I see that your plugin syntax resembles the latest FileList version closely... which is surprisingly different from that of the earlier versions. Odd.
User avatar
Brian
Developer
Posts: 2672
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: FileView plugin 1.0

Post by Brian »

Version 1 now available, check here for more details.

I added the "WildcardSearch" option and the "IndexUp/Down" commands. I also added a new command called "PreviousFolder" that will change the path to the previous folder, kinda like the ".." folder.

I made a change to the default location of where the icons are saved. So if you do not include any path or name, the current folder is used with the icon being saved in the form of "iconX.ico" where "X" is the index number.

I also added the ability to get the file date timestamp so you can use it in a time measure to display the date as you wish. It basically works like this:

Code: Select all

[mFileDate]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileDate
Index=1

[mFileDate2]
Measure=Time
Format=Month: %m Day: %d Year: %Y Hour: %I Minute: %M Second: %S %p
Timestamp=[mFileDate:]
DynamicVariables=1
I also updated the test skin.

-Brian
User avatar
jsmorley
Developer
Posts: 22632
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: FileView plugin 1.0

Post by jsmorley »

Outstanding...
User avatar
jsmorley
Developer
Posts: 22632
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: FileView plugin 1.0

Post by jsmorley »

Couple of things I notice:

1) I would be tempted to default some UpdateDivider in the plugin, like WebParser does with UpdateRate. It might be necessary to actually add UpdateRate, as I'm not sure about the relationship of UpdateDivider to the skin if you copy/move that functionality into the plugin. One thing I notice is that if you refresh the skin while it is actively parsing the files/folders, it fails. So having it beat on the plugin every Update=1000 in the skin is going to both make it work harder than it should, and be a bit hinky... I think some reasonable UpdateDivider/UpdateRate as a default might help those who don't think to use it.

2) I'm a bit unclear on the "index" number. I notice that if you leave ShowDotDot as 1, the default, then that is index 0, with ".." as the name, no size, no date and the default "folder" icon. That is as expected. The first actual file then becomes index 1.

If I set ShowDotDot to 0, then the first actual file is index 0, however it still seems to create the default "folder" icon as "icon0.ico", but actually displays the correct file icon when used in MeasureName on an Image meter. (even though I don't see it created anywhere in the skin folder). I'm not clear what the relationship is with the icon "read" and the icon "saved" if you see what I mean.

If I set the index of the icon to 1 instead of 0, then I get the correct one both saved and displayed, even though in theory I assume there is no index 1 when ShowDotDot is 0.

Part of the issue is the fact that Count and Index are not closely tied together I think. If you say Count=1, then index=0, index=1, index=2, index=20 all give you the single file returned based on Count. That may have to do with the fact that index "rolls-over" as you mentioned, I guess I just need to wrap my head around the implications of that.

This is probably confusing. We can talk about it on IRC when you get on.
User avatar
Brian
Developer
Posts: 2672
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: FileView plugin 1.0

Post by Brian »

jsmorley wrote:1) I would be tempted to default some UpdateDivider in the plugin, like WebParser does with UpdateRate. It might be necessary to actually add UpdateRate, as I'm not sure about the relationship of UpdateDivider to the skin if you copy/move that functionality into the plugin. One thing I notice is that if you refresh the skin while it is actively parsing the files/folders, it fails. So having it beat on the plugin every Update=1000 in the skin is going to both make it work harder than it should, and be a bit hinky... I think some reasonable UpdateDivider/UpdateRate as a default might help those who don't think to use it.
What do you mean by, "it fails"? I set my folder to the Windows folder, and set "Recursive=1", and refreshed multiple times before the plugin finished and I didn't run into any problems. Could you give me a step by step guide as to what you did to cause that behavior so I can see what is going on?

The plugin only gathers the information once (or runs the thread once), until you send one of the commands: PageUp, PageDown, IndexUp, IndexDown, PreviousFolder, and Update.

jsmorley wrote:If I set ShowDotDot to 0, then the first actual file is index 0, however it still seems to create the default "folder" icon as "icon0.ico", but actually displays the correct file icon when used in MeasureName on an Image meter. (even though I don't see it created anywhere in the skin folder). I'm not clear what the relationship is with the icon "read" and the icon "saved" if you see what I mean.
I'm not entirely sure I follow. There is a strange "bug" (not sure if it is my code, or in Windows) that I stated in the first post (at the bottom) that might be related to what you are saying. The icon that shows in Windows Explorer sometimes will be a different icon then what you see in your skin. If you open the .ico file in Windows, the correct icon is shown in your default image software - but the "preview" in the Windows Explorer might be a different icon. I honestly don't know where the problem lies, but I will keep looking for an answer.

jsmorley wrote:Part of the issue is the fact that Count and Index are not closely tied together I think. If you say Count=1, then index=0, index=1, index=2, index=20 all give you the single file returned based on Count. That may have to do with the fact that index "rolls-over" as you mentioned, I guess I just need to wrap my head around the implications of that.
Right, the index does "wrap-around" if you are indexing out of the count. The count is simply how many items you intend to display, and the index corresponds to the specific item. You can get around that and directly use the Index of the file/folder with the IgnoreCount option.

-Brian
User avatar
jsmorley
Developer
Posts: 22632
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: FileView plugin 1.0

Post by jsmorley »

I just had a skin that was getting a single file in a single folder, based on a WildcardSearch. When I was first running it, if I did a "skin refresh" from the context menu it would often not display anything unless I refreshed again. Might have been something peculiar I was doing in the skin, (I was thrashing at those index numbers and ShowDotDot) as I can't get it to fail now.

Do I gather from what you said that UpdateDivider is ignored / not needed as it doesn't "re-read" the folders/files unless you update it with the command?

As to the icon, yeah. It sounds like it is that issue. Not a huge deal, as the correct icon is displayed in an image meter.

I will play around with the index and count thing. I think I just need to wrap my head around how best to manage things.

One last note. On your test skin, if I pick a fairly large folder, and scroll with the mouse really fast all the way to the bottom, all information disappears. Scrolling back up doesn't do anything, and when I refresh the skin OR unload it, Rainmeter crashes. Might want to explore that a bit. Feels like scrolling really fast can "get ahead" of the indexing and cause it to divide by zero or something.
User avatar
Brian
Developer
Posts: 2672
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: FileView plugin 1.0

Post by Brian »

jsmorley wrote:Do I gather from what you said that UpdateDivider is ignored / not needed as it doesn't "re-read" the folders/files unless you update it with the command?
Right, you shouldn't need UpdateDivider at all with this plugin (at lease at this time).
jsmorley wrote:One last note. On your test skin, if I pick a fairly large folder, and scroll with the mouse really fast all the way to the bottom, all information disappears. Scrolling back up doesn't do anything, and when I refresh the skin OR unload it, Rainmeter crashes. Might want to explore that a bit. Feels like scrolling really fast can "get ahead" of the indexing and cause it to divide by zero or something.
Hmm. I can't seem to replicate that behavior. I even tried it on "C:\Windows\System32" folder which has over 14,000 files to scroll through (took a couple of minutes to scroll through it all). Did you change any values on the test skin (other than the path) ?

-Brian
User avatar
jsmorley
Developer
Posts: 22632
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: FileView plugin 1.0

Post by jsmorley »

Brian wrote: Right, you shouldn't need UpdateDivider at all with this plugin (at lease at this time).
Hmm. I can't seem to replicate that behavior. I even tried it on "C:\Windows\System32" folder which has over 14,000 files to scroll through (took a couple of minutes to scroll through it all). Did you change any values on the test skin (other than the path) ?

-Brian
I don't even have to change the path. I just load the skin, scroll all the way down fast, and then back up.
User avatar
tru
Posts: 169
Joined: January 12th, 2010, 4:24 am
Location: A Salty Piece of Land...

Re: FileView plugin 1.0

Post by tru »

I was having the same issue as js but i closed the skin using the TopProcesses plugin and it stopped crashing.
Post Reply