{"id":15569268,"url":"https://github.com/ssokolow/trunc_filenames","last_synced_at":"2025-05-14T02:33:09.408Z","repository":{"id":66916888,"uuid":"549974773","full_name":"ssokolow/trunc_filenames","owner":"ssokolow","description":"Minimal recursive \"truncate file/directory names to meet requirements\" tool","archived":false,"fork":false,"pushed_at":"2025-02-01T01:18:42.000Z","size":58,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T02:24:26.781Z","etag":null,"topics":["quick-hack","rust-lang","utility"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":false,"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/ssokolow.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":"2022-10-12T02:40:04.000Z","updated_at":"2025-02-01T01:18:40.000Z","dependencies_parsed_at":"2023-03-10T03:31:05.109Z","dependency_job_id":"266cdac8-8e78-4259-8dea-454981c68c1b","html_url":"https://github.com/ssokolow/trunc_filenames","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssokolow%2Ftrunc_filenames","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssokolow%2Ftrunc_filenames/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssokolow%2Ftrunc_filenames/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssokolow%2Ftrunc_filenames/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssokolow","download_url":"https://codeload.github.com/ssokolow/trunc_filenames/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239210245,"owners_count":19600499,"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":["quick-hack","rust-lang","utility"],"created_at":"2024-10-02T17:24:37.018Z","updated_at":"2025-02-16T23:26:26.233Z","avatar_url":"https://github.com/ssokolow.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# trunc_filenames\n\n    ssokolow@monolith ~ % trunc_filenames --help\n    trunc_filenames 0.1.0\n    Rename files and directories to fit length limits.\n\n    WARNING: Will not preserve secondary extensions like .tar.gz\n\n    USAGE:\n        trunc_filenames [OPTIONS] [PATH]...\n\n    ARGS:\n        \u003cPATH\u003e...    Paths to rename (recursively, if directories)\n\n    OPTIONS:\n        -h, --help                 Print help information\n            --max-len \u003cMAX_LEN\u003e    Length to truncate to. (Default chosen for rclone name encryption)\n                                  [default: 140]\n        -n, --dry-run              Don't actually rename files. Just print\n        -V, --version              Print version information\n\n## Current shortcomings\n\n1. Requires a POSIX platform because I didn't want to do something hacky and\n   then forget, so I only bothered to implement \"the length we care about is the\n   _encoded_ length\" based on `std::os::unix::ffi::OsStrExt`.\n2. Doesn't preserve secondary extensions like the `.tar` in `.tar.gz`\n3. If the file/directory name already contains bytes that aren't valid UTF-8, it\n   won't bother to ensure that the truncation falls on the boundary between\n   valid UTF-8 code points.\n\nAll of these are because it was a quick itch-scratch I would normally write in\nPython and not even revision-control or upload, it works well enough for the\nproblem it was meant to solve, and solving any of those would have a\nsignificantly lower return on investment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssokolow%2Ftrunc_filenames","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssokolow%2Ftrunc_filenames","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssokolow%2Ftrunc_filenames/lists"}