{"id":20111737,"url":"https://github.com/openstack/ptgbot","last_synced_at":"2025-05-06T11:31:12.178Z","repository":{"id":56149534,"uuid":"93161650","full_name":"openstack/ptgbot","owner":"openstack","description":"Source code for the PTG event scheduling bot. Mirror of code maintained at opendev.org.","archived":false,"fork":false,"pushed_at":"2023-10-04T17:20:23.000Z","size":470,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-05-09T18:51:00.148Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://opendev.org/openstack/ptgbot","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openstack.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-06-02T12:03:59.000Z","updated_at":"2024-01-17T16:00:15.000Z","dependencies_parsed_at":"2023-10-04T23:10:08.479Z","dependency_job_id":"f624afb2-7b75-4cb1-88d7-5e7a039d2bc7","html_url":"https://github.com/openstack/ptgbot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fptgbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fptgbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fptgbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fptgbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openstack","download_url":"https://codeload.github.com/openstack/ptgbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224499851,"owners_count":17321605,"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-11-13T18:17:30.963Z","updated_at":"2024-11-13T18:17:33.958Z","avatar_url":"https://github.com/openstack.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"===========================\nOpen Infrastructure PTG Bot\n===========================\n\nptgbot is the bot that PTG track moderators use to surface what's\ncurrently happening at the event. Track moderators send messages to\nthe bot, and from that information the bot builds a static webpage\nwith several sections of information:\n\n* The discussion topics currently discussed (\"now\")\n* An indicative set of discussion topics coming up next (\"next\")\n* The tracks pre-scheduled for the day\n* The tracks which booked available slots in the additional rooms\n\nThe bot also allows people to voluntarily check into (and out of)\ntracks or other arbitrary locations, if they want to be found more\neasily by other people.\n\n\nUser commands\n=============\n\nAnyone can privately message the bot with the following commands\n(chevrons like \u003c\u003e denote required parameters):\n\n* ``in \u003c#TRACKNAME\u003e`` - tells the bot you are currently in the track\n  named ``TRACKNAME``.  This must be one of the tracks it knows about,\n  for example: ``in #nova``\n\n* ``in \u003cLOCATION\u003e`` - tells the bot you are currently in a location\n  which doesn't correspond to any track.  This can be any freeform\n  text, for example: ``in the pub``\n\n* ``out`` - tells the bot you've checked out of your current location.\n  However others will still be able to see when and where you checked\n  out.\n\n* ``seen \u003cNICK\u003e`` - asks the bot where the user with the given IRC nick\n  was last seen (if anywhere).  The nick is case-insensitive.\n\n* ``subscribe \u003cREGEXP\u003e`` - subscribes for a direct message notification\n  from the bot whenever a topic with a substring matching ``REGEXP``\n  is set via the ``now`` or ``next`` commands (see below).  The exact\n  string the (case-insensitive) regular expression will be matched\n  against is of the form ``#track now topic`` (i.e. the same as the\n  full commands issued by track moderators).  So for example\n  ``subscribe #nova.*test|python *3`` would match any testing topics\n  in the nova track, and any Python 3 topics in any track.\n\n* ``subscribe`` - shows your current subscription regular expression\n  (if any)\n\n* ``unsubscribe`` - cancels your current subscription (if any)\n\nThe above commands also work in the channel when prefixed with ``+``,\nfor example ``+in the pub``.  You can use the ``+`` prefix with\nprivate messages to the bot too, in case you don't want to memorise\ndifferent syntax for these commands depending on whether you are\nmessaging the bot privately or in a channel.\n\n\nTrack moderators commands\n=========================\n\nBy default the bot allows anyone in the channel to issue track moderation\ncommands. However note that it is possible for admins to restrict access\nto people who have voice in the channel (+v).\n\nCommands follow the following format::\n\n  #TRACKNAME \u003cCOMMAND\u003e [PARAMETERS]\n\nHere is the list of available commands.\n\nnow\n---\n\nThe ``now`` command indicates the current topic of discussion in a given\ntrack. Example usage::\n\n  #swift now discussing ring placement\n\n* Your track needs to exist in the system, and be scheduled in the day.\n  Information about the room will be added automatically from the schedule.\n\n* You can mention other tracks by using the corresponding hashtags, like:\n  ``#nova now discussing multi-attach with #cinder``.\n\n* There can only be one ``now`` discussion topic at a time. If multiple\n  topics are discussed at the same time in various corners of the room,\n  they should all be specified in a single ``now`` command.\n\n* In order to ensure that information is current, entering a ``now`` command\n  wipes out any ``next`` entry for the same track.\n\nnext\n----\n\nThe ``next`` command lets you communicate the upcoming topics of discussion in\nyour track. You can use it as a teaser for things to come. Example usage::\n\n  #swift next at 2pm we plan to discuss #glance support\n  #swift next around 3pm we plan to cover cold storage features\n\n* Your track needs to exist in the system, and be scheduled in the day.\n\n* You can specify multiple ``next`` discussion topics. To clear the list, you\n  can enter a new ``now`` discussion topic, or use the ``clean`` command.\n\n* Since passing a new ``now`` command wipes out the ``next`` entries, you\n  might want to refresh those after entering a ``now`` topic.\n\nbook\n----\n\nThe ``book`` command is used to book available slots in the additional rooms.\nAvailable time slots (at the bottom of the PTGbot page) display a slot code\nyou can use book the room. Example usage::\n\n  #vitrage book Missouri-MonAM\n\n* Your track needs to exist in the system.\n\n* Once you booked the slot, you are part of the schedule for the day, and\n  you can use the ``now`` and ``next`` commands to communicate what topic\n  is being discussed.\n\nunbook\n------\n\nThe ``unbook`` command is used to free up booked slots in the additional rooms.\nYou should generally not unbook a track without the consent of its track lead.\nExample usage::\n\n  #vitrage unbook Missouri-MonAM\n\nclean\n-----\n\nYou can remove all ``now`` and ``next`` entries related to your track by\nissuing the ``clean`` command (with no argument). Example usage::\n\n  #ironic clean\n\netherpad\n--------\n\nBy default the bot generates etherpad links for all tracks. If you already\nhave an etherpad, you can set its URL using the ``etherpad`` command::\n\n  #keystone etherpad https://etherpad.openstack.org/p/awesome-keystone-pad\n\nIf you set a URL and would like to revert to the autogenerated name, you can\npass ``auto`` as the etherpad URL::\n\n  #keystone etherpad auto\n\nurl\n---\n\nA URL can be associated to a track, for example pointing to where the video\nmeeting happens. By default the bot points to the URL associated to the room,\nif any. You can override it using the ``url`` command::\n\n  #keystone url https://meet.jit.si/awesome-keystone-meeting\n\nIf you set a track-specific URL and would like to remove it, you can pass\n``none`` as the URL::\n\n  #keystone url none\n\ncolor\n-----\n\nBy default all tracks appear as blue badges on the page. You can set your\nown color using the ``color`` command. Colors can be specified in any\nform supported by the CSS attribute background-color::\n\n  #infra color red\n  #oslo color #42f4c5\n\n* The color command only sets the background color for the track\n  name. The foreground is always white.\n\nlocation\n--------\n\nThe room your track discussions happen in should be filled automatically\nby the PTGbot by looking up the schedule information. In case it's not right,\nyou can overwrite it using the ``location`` command. This command is\nuseless in a virtual PTG, where you should use the \"url\" command to update\nthe virtual meeting location. Example usage::\n\n  #oslo location Level B, Ballroom A\n\n\nAdmin commands\n==============\n\nYou have to be a channel operator (+o) to use admin commands (chevrons\nlike \u003c\u003e denote required parameters).\n\n~list\n  List available track names\n\n~add \u003cTRACK\u003e [TRACK..]\n  Add new track(s)\n\n~del \u003cTRACK\u003e [TRACK..]\n  Deletes track(s)\n\n~clean \u003cTRACK\u003e [TRACK..]\n  Removes active entries for specified track(s)\n\n~newday\n  Removes existing now/next/location/presence entries. This command is\n  meant to be run at the start of a new day\n\n~motd add \u003cLEVEL\u003e \u003cMESSAGE\u003e\n  Adds a message of the day on top of the rendered page. Level must be one of\n  info, success, warning or danger. Multiple messages can be provided.\n\n~motd del \u003cN\u003e\n  Removes Nth message from the top of the page (first message is number 1).\n\n~motd reorder \u003cX\u003e \u003cY\u003e [Z...]\n  Reorder messages. For example, ~motd reorder 2 1 would swap the top two\n  messages, and remove any other message present.\n\n~motd clean\n  Removes all messages of the day on top of the rendered page.\n\n~emptydb\n  Resets the database entirely to minimal contents\n\n~fetchdb \u003cURL\u003e\n  Fetches JSON DB from specified URL. Any JSON key specified will replace\n  existing data in database.\n\n~requirevoice\n  Requires that users are voiced (+v) to issue track moderation commands\n\n~alloweveryone\n  Allows everyone in the channel to issue track moderation commands\n\n\nLocal testing\n=============\n\nCopy config.json.sample to config.json::\n\n  cp config.json.sample config.json\n\nEdit config.json contents, for example::\n\n  {\n  \"irc_nick\": \"ptgbot\",\n  \"irc_server\": \"irc.oftc.net\",\n  \"irc_port\": 6697,\n  \"irc_channel\": \"#testptg\",\n  \"db_filename\": \"html/ptg.json\",\n  }\n\nIn one terminal, run the bot::\n\n  tox -evenv -- ptgbot -d config.json\n\nJoin that channel and load base JSON data from a public URL (see base.json\nfor an example). You can use the pastebin service as a quick way to publish\nthat data::\n\n  ~fetchdb http://paste.openstack.org/raw/793040/\n\nThen you can give other commands to the bot, like::\n\n  #swift now discussing ring placement\n\n(note, the bot currently only takes commands from Freenode identified users)\n\nIn another terminal, start the webserver::\n\n  cd ptgbot/html \u0026\u0026 python -m http.server\n\nOpen the web page in a web browser: http://127.0.0.1:8000/ptg.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Fptgbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenstack%2Fptgbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Fptgbot/lists"}