{"id":23284198,"url":"https://github.com/agilecreativity/mp4_renamer","last_synced_at":"2025-04-06T15:15:13.320Z","repository":{"id":56884642,"uuid":"24292442","full_name":"agilecreativity/mp4_renamer","owner":"agilecreativity","description":"Simple ruby gem to add running times to the mp4 and m4a files","archived":false,"fork":false,"pushed_at":"2015-07-16T21:50:54.000Z","size":264,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T05:01:57.784Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/agilecreativity.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOGS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-21T14:02:05.000Z","updated_at":"2014-09-21T14:02:30.000Z","dependencies_parsed_at":"2022-08-20T23:40:57.140Z","dependency_job_id":null,"html_url":"https://github.com/agilecreativity/mp4_renamer","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Fmp4_renamer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Fmp4_renamer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Fmp4_renamer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Fmp4_renamer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agilecreativity","download_url":"https://codeload.github.com/agilecreativity/mp4_renamer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247500476,"owners_count":20948880,"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":[],"created_at":"2024-12-20T01:38:37.907Z","updated_at":"2025-04-06T15:15:13.301Z","avatar_url":"https://github.com/agilecreativity.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Mp4Renamer\n\n[![Gem Version](https://badge.fury.io/rb/mp4_renamer.svg)][gem]\n[![Dependency Status](https://gemnasium.com/agilecreativity/mp4_renamer.png)][gemnasium]\n[![Code Climate](https://codeclimate.com/github/agilecreativity/mp4_renamer.png)][codeclimate]\n\n[gem]: http://badge.fury.io/rb/mp4_renamer\n[gemnasium]: https://gemnasium.com/agilecreativity/mp4_renamer\n[codeclimate]: https://codeclimate.com/github/agilecreativity/mp4_renamer\n\nSimple gem to rename the `mp4` or `m4a` file by adding the running time to the input file name.\n\ne.g. If the input file name is `introduction.mp4` and it contain `00:54` of running time then\nthe file would be renamed to `introduction_00_54.mp4` e.g. \u003coriginal_filename\u003e\u003crunning_time\u003e.mp4\n\n- Support the `*.m4a` and `*.mp4` file formats only\n\n### Sample Usage\n\n- Install the gem\n\n```shell\n$gem install mp4_renamer\n```\n\n- Running the command without any argument will show the default help message\n\n```shell\nmp4_renamer\n```\n\nShould show the following output\n\n```\nUsage:\n  mp4_renamer [options]\n\nOptions:\n  -b, [--base-dir=BASE_DIR]        # Starting directory\n                                   # Default: . (current directory)\n  -r, [--recursive=RECURSIVE]      # Perform the operation recursively\n                                   # Default: true\n  -c, [--commit], [--no-commit]    # Commit your changes\n                                   # Default: --no-commit\n  -v, [--version], [--no-version]  # Display version number\n                                   # Default: --no-version\n\nExecute the main program\n```\n\n- Running the default command to see what will the result be like without making any changes (dry-run)\n\n```shell\nmp4_renamer --base-dir . --recursive\n\n# or short version\nmp4_renamer -b . -r\n```\n\nShould show outputs similar to the following\n\n```\nFYI: your options {:base_dir=\u003e\".\", :recursive=\u003etrue, :commit=\u003efalse, :version=\u003efalse}\n-----------------------------------------------------------------------\nFYI: this is a dry-run only, to commit your changes use --commit option\n-----------------------------------------------------------------------\nFYI: input file : ./fixtures/01.mp4\nFYI: output file: ./fixtures/01_00_54.mp4\nFYI: input file : ./fixtures/02.mp4\nFYI: output file: ./fixtures/02_00_54.mp4\n```\n\n- To make your change permanent just add the `--commit` flag\n\n```shell\nmp4_renamer --base-dir . --recursive --commit\n# or short version\nmp4_renamer -b . -r -c\n```\n\n### Why is this useful?\n\n- Know how long it will take to watch the video\n- Give you the context without the need to open file and look at the running time of a given file\n- To make your output even more useful, try using this with [filename_cleaner][] gem\n\n### Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'mp4_renamer'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install mp4_renamer\n\n### Usage\n\nUse as library try\n\n```ruby\nrequire 'mp4_renamer'\ninclude Mp4Renamer\n# then call the appropriate functions\n```\n\n### Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n[Thor]: https://github.com/erikhuda/thor\n[Minitest]: https://github.com/seattlerb/minitest\n[RSpec]: https://github.com/rspec\n[Guard]: https://github.com/guard/guard\n[Yard]: https://github.com/lsegal/yard\n[Pry]: https://github.com/pry/pry\n[Rubocop]: https://github.com/bbatsov/rubocop\n[Grit]: https://github.com/mojombo/grit\n[filename_cleaner]: https://github.com/agilecreativity/filename_cleaner\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagilecreativity%2Fmp4_renamer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagilecreativity%2Fmp4_renamer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagilecreativity%2Fmp4_renamer/lists"}