Properties in File Browser - page 2 - General Discussion and Assistance - CHDK Forum supplierdeeply

Properties in File Browser

  • 17 Replies
  • 3217 Views
Re: Properties in File Browser
« Reply #10 on: 27 / June / 2017, 23:17:38 »
Advertisements
I know I said I liked the properties dialog earlier, but from a usability POV, if the hash is going to be optional it should just be a separate option in the context menu, or perhaps a button in the properties dialog.

So all that's left is remove the hash computation altogether? :(

Quote
Require the user to turn on/off an option in between browsing files seems less than optimal.

I'm sorry, but I don't follow. Once the user selected their favorite hash, why would they need to change it in between?

Quote
I'm really sorry to be critical of so many of your suggestions, I know you put a lot of time into this and it's really nice to see someone wanting to contribute. At the same time, as the de-facto ringleader of this circus for a number of years, I've regretted adding stuff on a number of occasions...

I must admit that I've gotten the urge to fork CHDK and just implement anything I wanted more than once, courtesy of certain members of this forum. I've been resisting that urge mostly because of you and your good demeanor.

Thank you.
Author of CHIMP, Canon Hack Installation and Management Platform

*

Offline reyalp

  • ******
  • 11862
Re: Properties in File Browser
« Reply #11 on: 28 / June / 2017, 00:39:46 »
I'm sorry, but I don't follow. Once the user selected their favorite hash, why would they need to change it in between?
IMO, most users don't care about hashes, and those who do will only want them very occasionally. The fact that they can take significant time to compute means a user might prefer to have them off. The size limit is a workaround for this, but if the hash operation was a separate item, it would be moot: you'd just use it on whatever files you wanted and not need any options.

Quote
So all that's left is remove the hash computation altogether?
My preference would be either or both of:
1) A script interface. This would potentially have broader application than just displaying it in the file browser, and a script can use the file_browser function to let the user interactively select files.
2) A simple UI for a single hash function, e.g. a "md5 sum" item in the menu, or a button in the properties dialog (assuming the properties dialog is kept and adding a button isn't too hard)

Since this is a feature with a very small use case, I'd rather keep it to the bare minimum needed to get the desired result (checking a file on the camera matches one elsewhere) or make it a general building block (script).
Quote
I must admit that I've gotten the urge to fork CHDK and just implement anything I wanted more than once, courtesy of certain members of this forum.
Which is totally fine if you just want it for yourself. If it's something other people use, you may find this approach becomes unsustainable. In the early days, CHDK had a lot of stuff thrown in because someone thought it was cool, and this has made it a lot harder to maintain in the long run.
Don't forget what the H stands for.

Re: Properties in File Browser
« Reply #12 on: 29 / June / 2017, 22:59:27 »
Hashes submenu removed, 0-1 hashes in Properties.
Attributes added.
readme.txt added.

Edit: Added readme.txt.
« Last Edit: 29 / June / 2017, 23:58:32 by dmitrys »
Author of CHIMP, Canon Hack Installation and Management Platform

Re: Properties in File Browser
« Reply #13 on: 29 / June / 2017, 23:04:21 »
A script interface

1. Should it be md5(filename)? md5(buffer)? md5.digest(buffer)? md5.init()?
2. Where do I put the source files? lib/crypto?
Author of CHIMP, Canon Hack Installation and Management Platform


*

Offline reyalp

  • ******
  • 11862
Re: Properties in File Browser
« Reply #14 on: 30 / June / 2017, 00:23:52 »
1. Should it be md5(filename)? md5(buffer)? md5.digest(buffer)? md5.init()?
I would say a single call to hash a file is good. Lua should not be required to load the entire file, since in many cases it wouldn't fit in memory, and loading chunks though Lua strings would be inefficient.

Allowing Lua to hash a sequence of arbitrary strings (init / update / final) might be a nice additional feature. I haven't thought too much about this though.

Quote
2. Where do I put the source files? lib/crypto?
If they add significant size, they should probably be loaded as modules themselves, and live in modules. However, it's fine to make an initial implementation that's statically linked to the Lua module and just leave the source in the modules directory.
Don't forget what the H stands for.

Re: Properties in File Browser
« Reply #15 on: 30 / June / 2017, 15:58:29 »
If they add significant size, they should probably be loaded as modules themselves, and live in modules.

Good catch on the size. I removed all the unused stuff from md5 and sha1 and extracted pbkdf2_sha1 into a separate unit. That brought fselect.flt down to 22060 bytes. Incidentally, eyefi.flt is now only 8248 bytes, since it doesn't actually require md5.
Author of CHIMP, Canon Hack Installation and Management Platform

Re: Properties in File Browser
« Reply #16 on: 30 / June / 2017, 17:38:20 »
Script and module titles added.
Author of CHIMP, Canon Hack Installation and Management Platform

Re: Properties in File Browser
« Reply #17 on: 01 / July / 2017, 12:37:24 »
Adaptive title display:
Author of CHIMP, Canon Hack Installation and Management Platform


 

Related Topics