Open sakurai-youhei opened 4 months ago
Interesting idea!
I think there are too many functions altogether, some with too generic names, to add them all.
We could do just a few, but it might be better to have humanize
as the main command, so you'd run something like humanize naturalsize 8589934592
.
And also a python -m humanize naturalsize 8589934592
could be useful too.
Thank you for your great project!
Google always guides me to https://stackoverflow.com/a/15485265, which suggests
humanize.naturalsize()
. I'm ok to type inipython
, and copy & pasteimport humanize
andhumanize.naturalsize()
.But it'd be more than great if this small task could be simplified in something like these ways.
There are tools such as
numfmt
, butpip install
is easier for me as a Windows user. :)I'd open a PR if I found some time for this. But I can't promise my contribution. So, I'm filing just an idea here.