index.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <title>#git bot interface</title>
  5. <link rel="stylesheet" type="text/css" href="../style.css">
  6. <link rel="shortcut icon" href="/git/bot/favicon.ico">
  7. </head>
  8. <body>
  9. <h1>#git bot interface</h1>
  10. <h2>Functions</h2>
  11. <p>Here are your choices so far:
  12. <ul>
  13. <li><a href="faq.php">List FAQ entries</a>
  14. <li><a href="trigger.php">List active triggers</a> (those things that
  15. look like !<em>foo</em>)
  16. <li><a href="voice.php">Get voiced on the channel</a> (to bypass the
  17. spam filter without a libera.chat account)
  18. </ul>
  19. <h2>Introduction</h2>
  20. <p>The following features are available on IRC:
  21. <ul class="long">
  22. <li><strong>Triggers</strong>: inline commands in the form of !<em>foo</em>
  23. (<a href="trigger.php">list</a>) spit out a previously defined text for
  24. <em>foo</em>. It will be addressed to whoever you addressed with the line that
  25. you used the trigger in. It can be used anywhere in the middle of a line,
  26. though it should not run into other words.
  27. <ul><li><strong>Edit</strong>: If you are logged into NickServ, you
  28. can use ".trigger_edit &lt;trigger&gt; &lt;new expansion&gt;" to
  29. change the value of a trigger (no "!" there).
  30. <li><strong>Add new</strong>: Only available to selected people; same
  31. syntax as for editing. If you have been hanging out in #git for quite
  32. some time and haven't been selected yet, go shout at jast to make it
  33. happen.
  34. <li><strong>Aliases</strong>: to make one trigger an alias for
  35. another, set its contents to "@!othertrigger".
  36. <li><strong>Matching</strong>: if a request for !foo doesn't find an
  37. expansion named "foo", it will search for other names that
  38. <em>contain</em> "foo", and will spit out the shortest match instead.
  39. <li><strong>Private delivery</strong>: append "@p" to a trigger to
  40. have the response delivered to the person you are addressing, in a
  41. NOTICE.
  42. </ul>
  43. <li><strong>Manpages</strong>: Say something like "man git-commit" to show a
  44. link to one of git's manpages. Addressing works the same as for triggers.
  45. <li><strong>FAQs</strong>: Say something like "faq non-bare" to link to an FAQ
  46. from the git wiki. Valid keywords are the anchors used on the wiki page.
  47. Addressing works the same as for triggers.
  48. <li><strong>Draw graphs</strong>: the ".graph" and ".digraph" commands are
  49. interfaces to <a href="/g/">Instagraph</a> (the syntax is
  50. explained there).<br>
  51. The main use case is visualizing scenarios people might come across in
  52. everyday Git. For this we also have a small custom graphing language with the
  53. <a href="gitgraph.php">.gitgraph command</a>.
  54. <li><strong>Linking to things in the Git repo</strong>:<ul>
  55. <li><code>git::master</code> (list of commits in branch)
  56. <li><code>git::master^{commit}</code> or <code>git::master^c</code> (commit
  57. view)<br>
  58. We try to auto-detect whether to show a list of commits or a single commit:
  59. if the argument looks like a commit ID, we show a single commit, otherwise
  60. it's the list. If a branch name was mistakenly detected as a commit ID, you
  61. can use something like <code>git::beef^{log}</code> or
  62. <code>git::beef^l</code> to force the list.
  63. <li><code>git::master:Documentation/</code> (tree view, trailing slash)
  64. <li><code>git::master:builtin/commit.c</code> (blob view)</ul>
  65. <li><strong>Linking to things in other repos</strong>: <code>git[github
  66. jast/gitinfo] master:gitinfo.pl</code> etc. Other supported hosting sites are
  67. bitbucket, gitlab, repo[.or.cz] and notabug.
  68. <li><strong>Random stuff</strong>: use the ".random" command to get a random
  69. line of wisdom (well, a random line of text, at any rate) contributed by a
  70. user.
  71. <ul><li><strong>Add</strong>: you can contribute lines if you are
  72. logged in. Simply use the command ".random add <em>Your line
  73. here</em>".
  74. <li><strong>Delete</strong>: the bot appends a line's ID when
  75. outputting the line. You can use the command ".random delete 5" to
  76. delete the line with ID 5. Note that only a select few can delete
  77. lines.
  78. </ul>
  79. <li><strong>Git version</strong>: #git has the most recent version of git in
  80. the topic. If you notice that it is out of date, use ".version" to
  81. automatically find the most recent version and update the topic. It may take
  82. up to 15 minutes after a release until it detects the new version.
  83. <li><strong>Knowledge base</strong>: Use ".info <em>query</em>" to query a
  84. general knowledge base that will try to match the query against many things,
  85. including: Wikipedia, github, Sourceforge, calculator, Merriam-Webster,
  86. TheFreeDictionary. Powered by <a href="//duckduckgo.com/">DuckDuckGo</a>'s
  87. ZeroClick Info API.
  88. <li><strong>Web search</strong>: Use ".search <em>query</em>" to get up to
  89. three web search results. Powered by <a
  90. href="//duckduckgo.com/">DuckDuckGo</a>.
  91. <li><strong>Web login</strong>: use the ".weblogin" command to get a link for
  92. activating extra features on the web page, such as editing and reverting
  93. trigger texts.
  94. </ul>
  95. <p>Commands and triggers can be used both in-channel and privately (by using
  96. /msg). By default, private messages will be responded to via NOTICE to you
  97. personally... but if you do something like "/msg gitinfo someuser: !foo
  98. to:#git", the response will be addressed to someuser in #git. The channel must
  99. be specified because gitinfo hangs out (or supports hanging out) in multiple
  100. channels.
  101. <h2>Source code</h2>
  102. <ul>
  103. <li><a href="//notabug.org/jast/gitinfo">Bot</a> (requires Perl,
  104. common::sense, DBD::SQLite, File::Slurp, JSON, POE::Component::IRC and
  105. friends)
  106. <li><a href="//notabug.org/jast/gitinfo-web">web interface</a> (requires
  107. PHP 5.x)
  108. </ul>
  109. <p>Both projects are published under the GPL v3. When contributing, please
  110. sign off (using git commit -s) your commits to confirm:
  111. <ol type="a">
  112. <li>you have permission to license your changes under the GPL v3, and
  113. <li>you do license your changes under the GPL v3.
  114. </ol>
  115. <p>Commits that are not signed off will not be accepted.
  116. </body>
  117. </html>