WikiBot: Difference between revisions
(Created page with "The Wikibot links the Discord to the wiki :) == Wikilinks == Messages with <nowiki>Wikilinks</nowiki> will be added to the wiki. The bot understands an extended wikilink syntax intended to make archiving threads easier. All messages added by the bot will also be indexed in Discord Messages so they don't get lost! * <code><nowiki>Regular Wikilinks</nowiki></code> - Messages with (potentially multiple) regular wikilinks will be embedded into the relevant...") |
No edit summary |
||
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Project | |||
|Homepage=https://git.jon-e.net/jonny/wiki-postbot | |||
|Description=A bot to use wikilinks from within discord | |||
|Repository URL=https://git.jon-e.net/jonny/wiki-postbot | |||
}} | |||
The Wikibot links the [[Discord]] to the wiki :) | The Wikibot links the [[Discord]] to the wiki :) | ||
== | Its source is at: [[Has git repo::https://git.jon-e.net/jonny/wiki-postbot]], and pull requests are welcome (hassle [[Jonny]] to figure out how to allow account creation in their gitea instance) | ||
Wikilinks, once created, will also be posted to [[Discord Messages]] and in the <code>#wikibot</code> channel so they can be followed directly from discord. | |||
== Wikilink Syntax == | |||
Messages with <nowiki>[[Wikilinks]]</nowiki> will be added to the wiki. The bot understands an extended wikilink syntax intended to make archiving threads easier. All messages added by the bot will also be indexed in [[Discord Messages]] so they don't get lost! | Messages with <nowiki>[[Wikilinks]]</nowiki> will be added to the wiki. The bot understands an extended wikilink syntax intended to make archiving threads easier. All messages added by the bot will also be indexed in [[Discord Messages]] so they don't get lost! | ||
Line 24: | Line 33: | ||
* <code>/debug on,off</code> Turn debugging messages on or off (for everyone) - this will print things like the full text of the detected wikilinks as replies to | * <code>/debug on,off</code> Turn debugging messages on or off (for everyone) - this will print things like the full text of the detected wikilinks as replies to | ||
== | |||
== Status Updates == | |||
{{Message | |||
|Author=sneakers-the-rat | |||
|Avatar=https://cdn.discordapp.com/avatars/305044217393053697/2970b22bd769d0cd0ee1de79be500e85.png?size=1024 | |||
|Date Sent=22-10-17 01:38:21 | |||
|Channel=testing-wikibot | |||
|Text=i'll leave the bot running for a lil bit but yeah it's just running on my laptop for now, will move it over to the linode running the wiki when i go to switch the url. made a page to document the [[WikiBot#Status Updates]] | |||
|Link=https://discord.com/channels/1029514961782849607/1029573464320917635/1031380616605868102 | |||
}} | |||
== TODO == | |||
* Implement n-back links | * Implement n-back links | ||
* Implement [[ | * Implement fully qualified semantic wikilinks | ||
* | * File/image Upload from discord | ||
* Cleanup & actual in-place docs omg. | |||
* Parse markdown -> wikitext in messages. | |||
* Create reference links in a list like [ [source#section->target#section] ] to avoid orphan pages | |||
* Support edits to messages! | |||
{{Message | |||
|Author=sneakers-the-rat | |||
|Avatar=https://cdn.discordapp.com/avatars/305044217393053697/2970b22bd769d0cd0ee1de79be500e85.png?size=1024 | |||
|Date Sent=22-11-02 08:14:45 | |||
|Channel=wikibot | |||
|Text=omg lmao [[WikiBot#TODO]] Don't make a separate page using semantic wikilinks lol | |||
|Link=https://discord.com/channels/1029514961782849607/1036778158122344448/1037278580968800276 | |||
}} | |||
== Feature Requests == | |||
{{Message | |||
|Author=sneakers-the-rat | |||
|Avatar=https://cdn.discordapp.com/avatars/305044217393053697/2970b22bd769d0cd0ee1de79be500e85.png?size=1024 | |||
|Date Sent=22-11-02 08:17:07 | |||
|Channel=fedi | |||
|Text=Then i just made a page to link to the pages. There's not really a well defined way to do meta-categorization like that in-medium as far as I'm aware, but am happy to receive [[WikiBot#Feature Requests]] about it | |||
|Link=https://discord.com/channels/1029514961782849607/1037261659368067072/1037279178883616798 | |||
}} | |||
[[Category:Software]] | [[Category:Software]] | ||
[[Category:Project]] | [[Category:Project]] | ||
[[Category:Python Package]] | [[Category:Python Package]] | ||
== Discord == | |||
{{Message | |||
|Author=sneakers-the-rat | |||
|Avatar=https://cdn.discordapp.com/avatars/305044217393053697/2970b22bd769d0cd0ee1de79be500e85.png?size=1024 | |||
|Date Sent=22-11-03 11:27:24 | |||
|Channel=off-topic | |||
|Text=this is almost exactly the idea with the [[WikiBot]] that pushes to a [[Semantic Wiki]], and good to have a name in [[Gradual Enrichment]]. looking forward to digging though the references and finishing that piece^ tomorrow. (and finishing the n-back linking syntax so I can just directly include the piece in the annotation that is this message). thanks for sharing 🙂 | |||
|Link=https://discord.com/channels/1029514961782849607/1035691728356790322/1037689452157481071 | |||
}}{{Message | |||
|Author=Wutbot | |||
|Avatar=https://cdn.discordapp.com/avatars/709165833888464966/d959819a9a72aa307c6ef1b91d7f94a2.png?size=1024 | |||
|Date Sent=22-11-12 11:22:37 | |||
|Channel=general-brainstorming | |||
|Text=those brackets cue the [[WikiBot]] to link the message to the wiki page containing the mentioned terms | |||
|Link=https://discord.com/channels/1029514961782849607/1034992937391632444/1040949739933401148 | |||
}} | |||
{{Message | |||
|Author=Konrad Hinsen | |||
|Avatar=https://cdn.discordapp.com/avatars/499904513038090240/343ae17c322fa09b3260f95e58bc4f29.png?size=1024 | |||
|Date Sent=22-11-04 16:21:19 | |||
|Channel=Wikibot | |||
|Text=Nice idea, that [[Wikibot]]! Do I understand correctly that it grabs all messages that contain a page name in double brackets, and adds them to the Wiki page with that name? (this message being as much a test as a question of course) | |||
|Link=https://discord.com/channels/1029514961782849607/1038112016038101062/1038125804032368663 | |||
}}{{Message | |||
|Author=Konrad Hinsen | |||
|Avatar=https://cdn.discordapp.com/avatars/499904513038090240/343ae17c322fa09b3260f95e58bc4f29.png?size=1024 | |||
|Date Sent=22-11-13 08:26:56 | |||
|Channel=A request from the Discourse Modeling | |||
|Text=Thanks <@322545403876868096> ! Added to https://synthesis-infrastructures.wiki/Discourse_Modeling. I guess I could have used [[Wikibot]] for that, but it was easier to do it by hand than figuring out the intricacies of Wikibot. | |||
|Link=https://discord.com/channels/1029514961782849607/1041046303804772402/1041267914017357825 | |||
}}{{Message | |||
|Author=Konrad Hinsen | |||
|Avatar=https://cdn.discordapp.com/avatars/499904513038090240/343ae17c322fa09b3260f95e58bc4f29.png?size=1024 | |||
|Date Sent=22-11-13 10:36:54 | |||
|Channel=off-topic | |||
|Text=Note to <@305044217393053697> about [[Wikibot]]: it doesn't pick up edits on messages that it has already added to the WIki. The version in the Wiki ends up being obsolete. Could be important when someone edits to add "not", for example. Discord users are used to having this possibility. | |||
|Link=https://discord.com/channels/1029514961782849607/1035691728356790322/1041300620109426699 | |||
}} | |||
== Bugfixes == | |||
{{Message | |||
|Author=sneakers-the-rat | |||
|Avatar=https://cdn.discordapp.com/avatars/305044217393053697/2970b22bd769d0cd0ee1de79be500e85.png?size=1024 | |||
|Date Sent=22-11-12 23:01:53 | |||
|Channel=wikibot | |||
|Text=<@771783584105234462> [[WikiBot#Bugfixes]] just pushed an update to the wikibot that might fix the red X's you're getting - likely an error from when there isn't an avatar set, but the logs aren't being kept long enough back for me to see for sure. | |||
|Link=https://discord.com/channels/1029514961782849607/1036778158122344448/1041125715636125696 | |||
}} |
Latest revision as of 18:04, 13 November 2022
WikiBot | |
---|---|
Homepage | https://git.jon-e.net/jonny/wiki-postbot |
Description | A bot to use wikilinks from within discord |
Repository URL | https://git.jon-e.net/jonny/wiki-postbot |
Contributors | Jonny Saunders |
The Wikibot links the Discord to the wiki :)
Its source is at: https://git.jon-e.net/jonny/wiki-postbot, and pull requests are welcome (hassle Jonny to figure out how to allow account creation in their gitea instance)
Wikilinks, once created, will also be posted to Discord Messages and in the #wikibot
channel so they can be followed directly from discord.
Wikilink Syntax
Messages with [[Wikilinks]] will be added to the wiki. The bot understands an extended wikilink syntax intended to make archiving threads easier. All messages added by the bot will also be indexed in Discord Messages so they don't get lost!
[[Regular Wikilinks]]
- Messages with (potentially multiple) regular wikilinks will be embedded into the relevant page in a section titled "Discord" in the order in which they were received.[[Wikilinks#With Section]]
- Adding a#
-delimited section will embed the message in the relevant section, rather than under "Discord"
N-Back Wikilinks
Currently implemented as a parser, but grabbing multiple messages in a thread is not yet implemented.
- Preceding Message -
[[^LINK]]
- Entire Preceding Thread -
[[^*LINK]]
- Ranges
- Fully specified -
[[^{n,m}LINK]]
wheren
andm
are the start and end of the range to be included, inclusive. eg.[[^{2,5}LINK]]
would specify four messages: the 2nd one above the initiating message through the 5th, andn == 0
indicates the initiating message. - End specified -
[[^{,m}LINK]]
OR[[^{m}LINK]]
- include the initiating message and them
messages above it. - Start specified -
[[^{n,}LINK]]
- include all preceding messages in the thread before thenth
message
- Fully specified -
Commands
/debug on,off
Turn debugging messages on or off (for everyone) - this will print things like the full text of the detected wikilinks as replies to
Status Updates
i'll leave the bot running for a lil bit but yeah it's just running on my laptop for now, will move it over to the linode running the wiki when i go to switch the url. made a page to document the WikiBot#Status Updates
TODO
- Implement n-back links
- Implement fully qualified semantic wikilinks
- File/image Upload from discord
- Cleanup & actual in-place docs omg.
- Parse markdown -> wikitext in messages.
- Create reference links in a list like [ [source#section->target#section] ] to avoid orphan pages
- Support edits to messages!
omg lmao WikiBot#TODO Don't make a separate page using semantic wikilinks lol
Feature Requests
Then i just made a page to link to the pages. There's not really a well defined way to do meta-categorization like that in-medium as far as I'm aware, but am happy to receive WikiBot#Feature Requests about it
Discord
this is almost exactly the idea with the WikiBot that pushes to a Semantic Wiki, and good to have a name in Gradual Enrichment. looking forward to digging though the references and finishing that piece^ tomorrow. (and finishing the n-back linking syntax so I can just directly include the piece in the annotation that is this message). thanks for sharing 🙂
those brackets cue the WikiBot to link the message to the wiki page containing the mentioned terms
Nice idea, that Wikibot! Do I understand correctly that it grabs all messages that contain a page name in double brackets, and adds them to the Wiki page with that name? (this message being as much a test as a question of course)
Thanks <@322545403876868096> ! Added to https://synthesis-infrastructures.wiki/Discourse_Modeling. I guess I could have used Wikibot for that, but it was easier to do it by hand than figuring out the intricacies of Wikibot.
Note to <@305044217393053697> about Wikibot: it doesn't pick up edits on messages that it has already added to the WIki. The version in the Wiki ends up being obsolete. Could be important when someone edits to add "not", for example. Discord users are used to having this possibility.
Bugfixes
<@771783584105234462> WikiBot#Bugfixes just pushed an update to the wikibot that might fix the red X's you're getting - likely an error from when there isn't an avatar set, but the logs aren't being kept long enough back for me to see for sure.