{"id":17305253,"url":"https://github.com/splittydev/witty","last_synced_at":"2025-08-18T12:09:15.572Z","repository":{"id":34052878,"uuid":"37836008","full_name":"SplittyDev/witty","owner":"SplittyDev","description":"A small irc bot","archived":false,"fork":false,"pushed_at":"2015-06-28T09:57:53.000Z","size":10448,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-11T03:33:13.221Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/SplittyDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-22T03:31:14.000Z","updated_at":"2015-06-22T18:53:30.000Z","dependencies_parsed_at":"2022-07-14T03:10:39.201Z","dependency_job_id":null,"html_url":"https://github.com/SplittyDev/witty","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SplittyDev/witty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SplittyDev%2Fwitty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SplittyDev%2Fwitty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SplittyDev%2Fwitty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SplittyDev%2Fwitty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SplittyDev","download_url":"https://codeload.github.com/SplittyDev/witty/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SplittyDev%2Fwitty/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270989164,"owners_count":24680688,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-15T11:55:09.442Z","updated_at":"2025-08-18T12:09:15.541Z","avatar_url":"https://github.com/SplittyDev.png","language":"Python","readme":"# witty\nA small irc bot with plugin support.\n\n## Dependencies\n- [Twisted](https://pypi.python.org/pypi/Twisted)\n- [Yapsy](https://pypi.python.org/pypi/yapsy)\n- [pyOpenSSL](https://pypi.python.org/pypi/pyOpenSSL)\n- [beautifulsoup4](https://pypi.python.org/pypi/beautifulsoup4)\n- Python 2.7\n\nOptional:\n- [service_identity](https://pypi.python.org/pypi/service_identity)\n\n## Plugins\n### How to write a plugin\nYou'll need to create two files in the `src/plugins` directory:\n- plugin_name.py\n- plugin_name.yapsy-plugin\n\nYou can arrange your plugins in subfolders.  \nWitty doesn't care where they are as long as it\ncan find them anywhere in the `plugins` folder.\n\n`plugin_name.yapsy-plugin` should look like this:\n```ini\n[Core]\nName = Name of your plugin\nModule = Name of the python file containing your plugin code without `.py`\n\n[Documentation]\nAuthor = Your name/nick\nVersion = 1.0\nDescription = This is my awesome plugin\n```\n\nNow you can start writing the plugin code!  \n`plugin_name.py`:\n```python\nfrom yapsy.IPlugin import IPlugin\nfrom yapsy.PluginManager import PluginManagerSingleton\n\nclass EchoPlugin(IPlugin):\n  # called by witty when a message arrives\n  def privmsg(self, user, channel, msg):\n    # get the bot instance\n    witty = PluginManagerSingleton.get().app\n    # echo everything said in the channel\n    witty.say(channel, '%s said: %s' % (user, msg))\n\n```\n\n### Advanced plugin example\n`advanced.yapsy-plugin`:\n```ini\n[Core]\nName = Advanced plugin\nmodule = advanced\n\n[Documentation]\nAuthor = SplittyDev\nVersion = 1.0\nDescription = A more advanced plugin\n```\n\n`advanced.py`:\n```python\nfrom yapsy.IPlugin import IPlugin\nfrom yapsy.PluginManager import PluginManagerSingleton\n\nclass AdvancedPlugin(IPlugin):\n  # automatically set by witty\n  # doesn't need to be declared here\n  plugin_name = None\n  config = None\n  \n  # optional, used by witty\n  usage = '_register'\n  default_config = {\n    'users': []\n  }\n  \n  # called by witty on startup and plugin reload\n  def init(self):\n    self.manager = PluginManagerSingleton.get()\n    # fill the user list with values from the config\n    self.users = self.config['users']\n  \n  # called by witty when a message arrives\n  def privmsg(self, user, channel, msg):\n    if msg == '_register':\n      if not user in self.users:\n        self.users.append(user)\n        # save the user list to the config\n        self.config['users'] = self.users\n        self.manager.wittyconf.update_plugin_conf(self.plugin_name, self.config)\n        self.manager.app.say(channel, '%s registered!' % user)\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplittydev%2Fwitty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsplittydev%2Fwitty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplittydev%2Fwitty/lists"}