{"id":18021012,"url":"https://github.com/kevinjalbert/github_archive_parser","last_synced_at":"2025-08-11T00:09:25.434Z","repository":{"id":13231025,"uuid":"15915568","full_name":"kevinjalbert/github_archive_parser","owner":"kevinjalbert","description":"Easily parse GitHub Archive","archived":false,"fork":false,"pushed_at":"2014-05-09T02:57:02.000Z","size":324,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T01:38:02.776Z","etag":null,"topics":["github","github-archive","rubygem"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/github_archive_parser","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/kevinjalbert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-14T21:08:02.000Z","updated_at":"2014-05-09T02:57:02.000Z","dependencies_parsed_at":"2022-08-29T15:41:40.433Z","dependency_job_id":null,"html_url":"https://github.com/kevinjalbert/github_archive_parser","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/kevinjalbert%2Fgithub_archive_parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinjalbert%2Fgithub_archive_parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinjalbert%2Fgithub_archive_parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinjalbert%2Fgithub_archive_parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevinjalbert","download_url":"https://codeload.github.com/kevinjalbert/github_archive_parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217522,"owners_count":20903070,"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":["github","github-archive","rubygem"],"created_at":"2024-10-30T06:08:31.061Z","updated_at":"2025-04-04T17:22:19.820Z","avatar_url":"https://github.com/kevinjalbert.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Archive Parser\n\n[![Gitter Chat](http://img.shields.io/badge/chat-gitter-brightgreen.svg)](https://gitter.im/kevinjalbert/github_archive_parser)\n[![Gem Version](https://badge.fury.io/rb/github_archive_parser.svg)](http://badge.fury.io/rb/github_archive_parser)\n[![Build Status](https://travis-ci.org/kevinjalbert/github_archive_parser.svg?branch=master)](http://travis-ci.org/kevinjalbert/github_archive_parser)\n[![Coverage Status](https://img.shields.io/coveralls/kevinjalbert/github_archive_parser.svg)](https://coveralls.io/r/kevinjalbert/github_archive_parser)\n[![Code Climate](https://img.shields.io/codeclimate/github/kevinjalbert/github_archive_parser.svg)](https://codeclimate.com/github/kevinjalbert/github_archive_parser)\n[![Dependency Status](https://img.shields.io/gemnasium/kevinjalbert/github_archive_parser.svg)](https://gemnasium.com/kevinjalbert/github_archive_parser)\n\n## Introduction\nThis gem provides a streamlined method for parsing the [GitHub Archive](http://www.githubarchive.org/). You have the ability to define custom event handlers for the different [22 GitHub Event Types](http://developer.github.com/v3/activity/events/types/). A custom event handler allows you to parse individual events as they are processed by the GitHub Archive Parser.\n\n## Example\nYou want to print the name of newly created repositories. The first thing you need to do is create your own custom event handler which requires the following statement: `includes GitHubArchiveParser::CreateEvent`. This causes GitHub Archive Parser to call your custom event handler class anytime it encounters a *CreateEvent*. In your custom event handler you only require one method `def parser(event)`, which is executed when a *CreateEvent* is encountered. The event is a [Hashie::Mash](https://github.com/intridea/hashie#mash) object which allows you to access the values of the hash using simple *dot* notation. You can define as many unique custom event handlers as needed (even for the same event type).\n\n    module AwesomeApplication\n      class PrintCreateEvent\n        include GitHubArchiveParser::CreateEvent\n\n        def parse(event)\n          # The event is a Hashie::Mash object for easy (dot) access\n          puts \"#{event.repository.owner}/#{event.repository.name}\"\n        end\n      end\n    end\n\nWhen you have your custom event handlers setup you can simply start processing [GitHub Archive](http://www.githubarchive.org/) using `GitHubArchiveParser::Processor`. Currently you can process one hour blocks on an individual basis, or by specifing ranges.\n\n    processor = GitHubArchiveParser::Processor.new\n    processor.process_url(\"http://data.githubarchive.org/2012-04-11-15.json.gz\")\n    processor.process_since(\"One Month Ago\")\n    processor.process_between(\"One Week Ago\", \"Yesterday\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinjalbert%2Fgithub_archive_parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevinjalbert%2Fgithub_archive_parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinjalbert%2Fgithub_archive_parser/lists"}