{"id":19305927,"url":"https://github.com/chayandatta/humanreadableformatter.jl","last_synced_at":"2026-06-18T11:32:00.571Z","repository":{"id":261495391,"uuid":"883653196","full_name":"chayandatta/HumanReadableFormatter.jl","owner":"chayandatta","description":"Humane Units and make them Readable","archived":false,"fork":false,"pushed_at":"2024-11-07T11:32:16.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-06T00:42:40.384Z","etag":null,"topics":["julia","package"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chayandatta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-05T10:47:35.000Z","updated_at":"2024-11-07T11:32:20.000Z","dependencies_parsed_at":"2024-11-07T12:30:14.798Z","dependency_job_id":"c3866d87-5520-4744-b9ba-81d369b8daba","html_url":"https://github.com/chayandatta/HumanReadableFormatter.jl","commit_stats":null,"previous_names":["chayandatta/readable.jl","chayandatta/layman.jl","chayandatta/humanreadableformatter.jl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chayandatta%2FHumanReadableFormatter.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chayandatta%2FHumanReadableFormatter.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chayandatta%2FHumanReadableFormatter.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chayandatta%2FHumanReadableFormatter.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chayandatta","download_url":"https://codeload.github.com/chayandatta/HumanReadableFormatter.jl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240405501,"owners_count":19796197,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["julia","package"],"created_at":"2024-11-10T00:03:07.429Z","updated_at":"2026-06-18T11:32:00.509Z","avatar_url":"https://github.com/chayandatta.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HumanReadableFormatter.jl\n\n`HumanReadableFormatter.jl` is a Julia package that offers straightforward functions for converting data sizes (and upcoming, time) into easy-to-read, human-friendly formats. Whether you’re dealing with bytes or seconds, `HumanReadableFormatter.jl` simplifies your data into comprehensible units, so you can focus on what matters.\n\n## Installation\n\nTo install `HumanReadableFormatter.jl`, open your Julia REPL, press `]` to enter the package manager, and then run:\n\n```julia\nadd HumanReadableFormatter\n```\n\n## Usage\n\n### Data Size Conversion\n\nThe package provides functions that convert data sizes (in bytes) into human-readable formats, automatically using appropriate units (KB, MB, GB, etc.). \n\n#### Example\n\n```julia\njulia\u003e using HumanReadableFormatter\n\njulia\u003e datasize(1000, format=:decimal)\n\"1k\"\n\njulia\u003e datasize(1024)\n\"1KB\"\n\njulia\u003e datasize(1024, format=:jdec)\n\"1KB\"\n\njulia\u003e datasize(1024, format=:binary)\n\"1KiB\"\n```\n\n*`datasize` automatically converts the byte size to the best-fitting unit, rounding for simplicity and ease of understanding.*\n\n### Time Conversion (Upcoming)\n\nThe next version of `HumanReadableFormatter.jl` will include time conversion functions, making it just as easy to format time intervals in a human-friendly way.\"\n\n## Function Reference\n\n### `datasize(bytes::Int; format::Symbol=:si) -\u003e String`\n\nConverts an integer representing bytes into a more readable string format, choosing the best-fitting unit (e.g., KB, MB, GB) based on the input size.\n\n- **Parameters**:\n  - `bytes`: An integer representing the size in bytes.\n  - `format` (optional): Name for the format (default: SI).\n\n- **Returns**: A string with the human-readable format of the data size.\n\n### Future Functions (Time Conversion)\n\nTime conversion functions will soon be available to handle time durations in a similar human-readable format.\n\n## Contributing\n\nContributions are welcome! If you’d like to contribute to `HumanReadableFormatter.jl`, feel free to submit issues, open pull requests, or reach out for suggestions.\n\n## License\n\n`HumanReadableFormatter.jl` is open-source software, available under the MIT License.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchayandatta%2Fhumanreadableformatter.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchayandatta%2Fhumanreadableformatter.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchayandatta%2Fhumanreadableformatter.jl/lists"}