Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Suggestion: Add an entrypoint and/or scripts for command-line use #184

Open
@sakurai-youhei

Description

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 in ipython, and copy & paste import humanize and humanize.naturalsize().

But it'd be more than great if this small task could be simplified in something like these ways.

$ naturalsize 8589934592
8.6 GB
$ naturalsize --binary 8589934592
8.0 GiB
$ echo 8589934592 | python -m humanize naturalsize --format "%.3f"
8.590 GB

There are tools such as numfmt, but pip 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /