{"id":23398281,"url":"https://github.com/mattruggio/kitkat","last_synced_at":"2025-04-08T18:56:17.392Z","repository":{"id":62559596,"uuid":"502092950","full_name":"mattruggio/kitkat","owner":"mattruggio","description":"File/Metadata Database Populator","archived":false,"fork":false,"pushed_at":"2023-11-28T23:11:57.000Z","size":1721,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T09:47:02.142Z","etag":null,"topics":["filesystem-utils","metadata-extraction"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattruggio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-10T15:29:38.000Z","updated_at":"2025-03-03T10:33:36.000Z","dependencies_parsed_at":"2022-11-03T12:15:19.143Z","dependency_job_id":null,"html_url":"https://github.com/mattruggio/kitkat","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattruggio%2Fkitkat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattruggio%2Fkitkat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattruggio%2Fkitkat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattruggio%2Fkitkat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattruggio","download_url":"https://codeload.github.com/mattruggio/kitkat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247909161,"owners_count":21016478,"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":["filesystem-utils","metadata-extraction"],"created_at":"2024-12-22T09:38:24.400Z","updated_at":"2025-04-08T18:56:17.365Z","avatar_url":"https://github.com/mattruggio.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kitkat\n\n#### File/Metadata Database Populator\n\n[![Gem Version](https://badge.fury.io/rb/kitkat.svg)](https://badge.fury.io/rb/kitkat) [![Ruby Gem CI](https://github.com/mattruggio/kitkat/actions/workflows/rubygem.yml/badge.svg)](https://github.com/mattruggio/kitkat/actions/workflows/rubygem.yml) [![Maintainability](https://api.codeclimate.com/v1/badges/7d9a8642cf5bd88a550d/maintainability)](https://codeclimate.com/github/mattruggio/kitkat/maintainability) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nI had a need to recursively enumerate a directory and load the paths, and some metadata about the files, into a SQLite file.  Currently, the following metadata is stored in the SQLite file\n\nfield | description\n----- | ------------\npath | path of the file (with the root removed)\nmime_type | left-side mime type (i.e. image)\nmime_subtype | right-side mime type (i.e. jpeg)\nbytesize | size in bytes of the file.\nlast_modified_at | last time the file was reported to be modified by the filesystem.\ndigest | SHA256 hash of the file's contents.\ncreated_at | UTC date and time when the record was inserted into the DB.\n\n## Installation\n\nTo install through Rubygems:\n\n````\ngem install kitkat\n````\n\nYou can also add this to your Gemfile using:\n\n````\nbundle add kitkat\n````\n\n## Usage\n\n### Executable\n\nThis library ships with an executable: `kitkat`.  Simply run this from your shell:\n\n````zsh\nbundle exec kitkat \u003cpath\u003e \u003cdatabase\u003e\n````\n\nFor Example: `bundle exec kitkat some_directory some_directory_contents.db`.  This will recursively scan the relative path at: `some_directory` and list all its contents in a SQLite database file relatively located at: `some_directory_contents.db`.\n\nNotes:\n\n* The database positional argument is optional.  If it is not supplied then it will default to: `kitkat.db`\n\n### Ruby API\n\nYou can also include this gem and use directly through code:\n\n```ruby\nKitkat.crawl(db: 'some_directory_contents.db', path: 'some_directory')\n```\n\nThe Ruby code above is functionally equivalent to running the executable script above.\n\n## Contributing\n\n### Development Environment Configuration\n\nBasic steps to take to get this repository compiling:\n\n1. Install [Ruby](https://www.ruby-lang.org/en/documentation/installation/) (check kitkat.gemspec for versions supported)\n2. Install bundler (gem install bundler)\n3. Clone the repository (git clone git@github.com:mattruggio/kitkat.git)\n4. Navigate to the root folder (cd kitkat)\n5. Install dependencies (bundle)\n\n### Running Tests\n\nTo execute the test suite run:\n\n````zsh\nbin/rspec spec --format documentation\n````\n\nAlternatively, you can have Guard watch for changes:\n\n````zsh\nbin/guard\n````\n\nAlso, do not forget to run Rubocop:\n\n````zsh\nbin/rubocop\n````\n\nAnd auditing the dependencies:\n\n````zsh\nbin/bundler-audit check --update\n````\n\n### Publishing\n\nNote: ensure you have proper authorization before trying to publish new versions.\n\nAfter code changes have successfully gone through the Pull Request review process then the following steps should be followed for publishing new versions:\n\n1. Merge Pull Request into main\n2. Update `version.rb` using [semantic versioning](https://semver.org/)\n3. Install dependencies: `bundle`\n4. Update `CHANGELOG.md` with release notes\n5. Commit \u0026 push main to remote and ensure CI builds main successfully\n6. Run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Code of Conduct\n\nEveryone interacting in this codebase, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/mattruggio/kitkat/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThis project is MIT Licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattruggio%2Fkitkat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattruggio%2Fkitkat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattruggio%2Fkitkat/lists"}