zevv / duc

Dude, where are my bytes: Duc, a library and suite of tools for inspecting disk usage
GNU Lesser General Public License v3.0
589 stars 79 forks source link

Feature Request: Switch between bytes and count as URL parameter #253

Open NicolasGoeddel opened 4 years ago

NicolasGoeddel commented 4 years ago

It would be nice to add a button or just a parameter to duc cgi, so one can switch between the file-size view and the number-of-files view without changing the CGI script.

Add the moment the script looks like this:

#!/bin/bash

/usr/bin/duc cgi -d /mnt/netdrive/.duc.db --list --palette=rainbow --ring-gap=3 --size=900 --tooltip

And I have to add the parameter --count manually via the terminal or some other way to be able to see the number of files. It would be better to have that switch in the webinterface or somehow just show size and number of files at the same time.

l8gravely commented 4 years ago

"NicolasGoeddel" == NicolasGoeddel notifications@github.com writes:

NicolasGoeddel> It would be nice to add a button or just a parameter NicolasGoeddel> to duc cgi, so one can switch between the file-size NicolasGoeddel> view and the number-of-files view without changing the NicolasGoeddel> CGI script.

NicolasGoeddel> Add the moment the script looks like this:

NicolasGoeddel> #!/bin/bash

NicolasGoeddel> /usr/bin/duc cgi -d /mnt/netdrive/.duc.db --list --palette=rainbow --ring-gap=3 --size=900 --tooltip

NicolasGoeddel> And I have to add the parameter --count manually via NicolasGoeddel> the terminal or some other way to be able to see the NicolasGoeddel> number of files. It would be better to have that NicolasGoeddel> switch in the webinterface or somehow just show size NicolasGoeddel> and number of files at the same time.

That could be an interesting feature to add. I won't say it will happen, but I'll keep it in mind as I look over the code for the next release.

Feel free to try and implement it yourself, the .cgi isn't that complex. I'd probably put a button in a corner of the window to toggle the view. Have to think about details.

John