{"id":21965095,"url":"https://github.com/weisslj/dir-edit","last_synced_at":"2025-04-24T02:49:10.581Z","repository":{"id":885684,"uuid":"633134","full_name":"weisslj/dir-edit","owner":"weisslj","description":"Rename or remove files in a directory using an editor","archived":false,"fork":false,"pushed_at":"2023-02-03T21:35:51.000Z","size":156,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-24T02:49:03.074Z","etag":null,"topics":["editor","renamer","tool"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weisslj.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-04-28T10:55:21.000Z","updated_at":"2021-03-29T10:48:12.000Z","dependencies_parsed_at":"2023-02-18T11:16:00.920Z","dependency_job_id":null,"html_url":"https://github.com/weisslj/dir-edit","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weisslj%2Fdir-edit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weisslj%2Fdir-edit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weisslj%2Fdir-edit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weisslj%2Fdir-edit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weisslj","download_url":"https://codeload.github.com/weisslj/dir-edit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250552035,"owners_count":21449161,"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":["editor","renamer","tool"],"created_at":"2024-11-29T12:33:11.373Z","updated_at":"2025-04-24T02:49:10.562Z","avatar_url":"https://github.com/weisslj.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"dir-edit\n========\n\nRename or remove files in a directory using an editor.\n\nMotivation\n----------\n\nIf you want to rename files in a directory, things get really cumbersome if:\n\n- the name modifications are not easily automatable (e.g. spelling mistakes)\n- file names contain spaces / special characters (when using a shell)\n- you have to rename a lot of files (when using a GUI)\n- you would need to use temporary files (e.g. ``mv a tmp ; mv b a ; mv tmp b``)\n- etc.\n\nThis script launches a used-defined text editor with a temporary file, where\nevery line is a filename in the directory. This enables the user to rename\n(edit a line) or delete (blank line) entries. After saving and exiting the\neditor, the script checks the file for consistency, detects rename loops and\nfinally performs the changes.\n\nNews\n----\n\n=====  ==========  ==================================================================\n3.0.0  2021-03-29  Require Python 3.6 (no new features, just usage of \"try ... from\")\n2.1.0  2017-05-01  Support renaming of intermediate dirs in recursive mode,\n                   drop ``--safe`` mode, small bugfixes\n2.0.0  2017-03-22  Bugfixes, Python 3 support, ``-o`` and ``-L`` option,\n                   extensive test suite\n1.1    2010-11-21  Bugfixes\n1.0    2010-05-06  First working version\n=====  ==========  ==================================================================\n\nExamples\n--------\n\nRename non-hidden files in the current directory::\n\n  dir_edit\n\nRename mp3 files in the music directory using gedit::\n\n  dir_edit -e gedit ~/Music ~/Music/*.mp3\n\nReview changes before executing them::\n\n  dir_edit -vd -L log.txt\n  view log.txt\n  sh -e log.txt\n\nRename pictures with maximum directory depth 2::\n\n  find pics -maxdepth 2 -type f -iregex \".*\\.\\(jpg\\|png\\)\" \u003e file_list\n  dir_edit -i file_list\n\nUsage\n-----\n\n::\n\n  dir_edit [OPTION]... [DIR] [FILES]...\n\n    DIR        directory to edit (default: current directory)\n    FILES      limit to these filenames (default: all non-hidden in directory)\n\n  Some options:\n\n    -e CMD, --editor=CMD       use CMD to edit dirfile (default: $EDITOR or vi)\n    -d, --dry-run              don't perform any file system modifications\n    -v, --verbose              output filesystem modifications to stdout\n    -L FILE, --logfile FILE    path to logfile for verbose mode (default: stdout)\n    -i FILE, --input FILE      FILE containing paths to be edited\n\nCopyright\n=========\n\n| Copyright (C) 2010-2021 Johannes Weißl\n| License GPLv3+:\n| GNU GPL version 3 or later \u003chttp://gnu.org/licenses/gpl.html\u003e\n| This is free software: you are free to change and redistribute it.\n| There is NO WARRANTY, to the extent permitted by law.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweisslj%2Fdir-edit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweisslj%2Fdir-edit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweisslj%2Fdir-edit/lists"}