{"id":15504749,"url":"https://github.com/taiki45/mikutter-plugin-base","last_synced_at":"2025-11-18T11:30:17.082Z","repository":{"id":6985890,"uuid":"8248318","full_name":"taiki45/mikutter-plugin-base","owner":"taiki45","description":"Deprecated","archived":false,"fork":false,"pushed_at":"2013-02-24T14:49:00.000Z","size":160,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-03-14T21:23:48.507Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/taiki45.png","metadata":{"files":{"readme":"README.md","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":"2013-02-17T08:51:13.000Z","updated_at":"2015-02-07T09:53:27.000Z","dependencies_parsed_at":"2022-09-16T18:41:48.073Z","dependency_job_id":null,"html_url":"https://github.com/taiki45/mikutter-plugin-base","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taiki45%2Fmikutter-plugin-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taiki45%2Fmikutter-plugin-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taiki45%2Fmikutter-plugin-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taiki45%2Fmikutter-plugin-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taiki45","download_url":"https://codeload.github.com/taiki45/mikutter-plugin-base/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239615862,"owners_count":19668945,"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-10-02T09:19:49.365Z","updated_at":"2025-11-18T11:30:17.045Z","avatar_url":"https://github.com/taiki45.png","language":"Ruby","readme":"# MikutterPluginBase\n\nAdd new way to write mikutter plugin.\n\n## Installation\n\nAdd this line to your mikutter's Gemfile:\n\n    gem 'mikutter_plugin_base'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install mikutter_plugin_base\n\nFinally execute mikkuter with bundled gems:\n\n    $ bundle exec ruby mikkuter.rb\n\n## Usage\n\n```ruby\n# path/to/mikutter/plugin/dir/sample.rb\nrequire 'mikutter_plugin_base'\n\nclass Sample \u003c Mikutter::PluginBase\n  def run(plugin)\n    \"write your code here.\"\n    \"you can access mikutter plugin api via `plugin`.\"\n  end\n\n  def on_update(service, messages)\n    \"define mikutter event callbacks, hooks, filters as method.\"\n    \"plugin base will automatically add them.\"\n  end\nend\n\n# at last of your plugin script do `resister!`\nSample.register!\n```\n\n## Detail\nThis gem just convert your plugin code.\n\nPlugin like this code goes...\n```ruby\nclass SamplePlugin \u003c Mikutter::PluginBase\n  def run(plugin)\n    @data_store = setup\n  end\n\n  def on_update(service, messages)\n    messages.each do |msg|\n      @data_store.save msg\n    end\n  end\nend\n\nSamplePlugin.register!\n```\n\nlike this.\n```ruby\nPlugin.create :sample_plugin do |plugin|\n  @data_store = setup\n\n  on_update do |service, messages|\n    messages.each do |msg|\n      @data_store.save msg\n    end\n  end\nend\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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaiki45%2Fmikutter-plugin-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaiki45%2Fmikutter-plugin-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaiki45%2Fmikutter-plugin-base/lists"}