158
submitted 7 months ago* (last edited 2 months ago) by [email protected] to c/[email protected]

I made this bot so that users who want to provide a quick summary of the wikipedia article they linked to in their comment can do so just by including a mention of the bot in their comment, and the bot will reply to the comment with the summary.

Currently multiple wikipedia links are not supported.

bot: https://lemmy.world/u/wikibot

all 31 comments
sorted by: hot top controversial new old
[-] [email protected] 11 points 7 months ago
[-] [email protected] 17 points 7 months ago

Here's the summary for the wikipedia article you mentioned in your comment:

Hello Internet is an audio podcast hosted by educational YouTube content creators Brady Haran and CGP Grey. The podcast debuted in 2014 and released 136 numbered episodes and 18 unnumbered episodes until February 2020, when the last episode was published. The podcast is currently indefinitely suspended and inactive. Listeners of the podcast are known as "Tims". The episodes of the podcast are usually about the interests of the creators and the differences between the hosts' lifestyles.

^article^ ^|^ ^about^

[-] [email protected] 2 points 7 months ago

Great job! What about mentioning the bot in the response to a comment that has a Wikipedia link.

[-] [email protected] 2 points 7 months ago* (last edited 7 months ago)

Well, that wasn't something I have planned. For now, you can just take the wikipedia link from that parent comment, mention the bot with it and send it as a comment. Will implement that feature, thanks.

[-] [email protected] 2 points 7 months ago
[-] [email protected] 4 points 7 months ago

Here's the summary for the wikipedia article you mentioned in your comment:

Jammie Dodgers are a popular British biscuit, made from shortcake with a raspberry or strawberry flavoured jam filling. Introduced in 1960, they are currently produced by Burton's Biscuit Company at its factory in Llantarnam. In 2009, Jammie Dodgers were the most popular children's sweet biscuit brand in the United Kingdom, with 40% of the year's sales consumed by adults.

^article^ ^|^ ^about^

[-] [email protected] 3 points 7 months ago

Sorry, I could not get the wikipedia summary for the wikipedia link mentioned in your comment.

[-] [email protected] 4 points 7 months ago
[-] [email protected] 2 points 7 months ago* (last edited 7 months ago)

Sorry, seems like the link extraction regex is a bit broken. Will fix it soon.

Edit: Fixed. See your comment again.

[-] [email protected] 1 points 7 months ago

Testing to see if the subscription bot works with Voyager’s auto complete @[email protected]

[-] [email protected] 1 points 7 months ago
[-] [email protected] 2 points 7 months ago

Can you fix it to just comment on any links to Wikipedia?

[-] [email protected] 2 points 7 months ago* (last edited 7 months ago)

The bot was doing exactly that a few days ago when I got a suggestion by an user and decided to rewrite the main program to only respond to mentions. Not only does this make the program less error prone, but also smaller and more efficient. I'll keep it this way.

[-] [email protected] -1 points 7 months ago
[-] [email protected] 4 points 7 months ago* (last edited 7 months ago)

Why though? People were complaining about it making too much noise anyways. The optout functionality was used frequently. Plus this reduces the burden on the server and on the one hosting the bot. And I can't stress this enough but it also made the errors much easier to handle. If I were to get a timeout or some server error from the server, there was no easy way to handle it. I also had to keep two databases to keep track of opted users and checked comments. Now even if there are any errors, I can just wait a few moments and continue. The comment won't be marked as read and thus can be dealt with the next iteration of the loop. This is not easily possible with the previous way. The reason is simple: the posts were being sorted by NewComments and I was getting 10 of them. What if 10 new comments appeared in the meantime when the error was being handled? They are gone to be checked along with another new comment if the post ever gets one. This could be done with another Vector keeping track of the posts that couldn't be checked because of errors but it only makes the program more complex and I hated trying to handle these pain in the ass errors for literally like 4 functions and the code was looking very messy. The current program does not look messy and the error handling is not only more efficient but also easier to do. Honestly, I don't want to do what it was doing before because of those stuff. After I am done with my new big project, I will be probably making another Lemmy bot. If you want that functionalit so much, check the repository's commits and find the one with the old code in it. Then you can run it on your own machine or server or whatever. I might rethink this if the current mention-only way doesn't go well and switch to lemmings.world to have the benefit of having webhooks which should let me make the old way somewhat as good as the current way.

[-] [email protected] 2 points 7 months ago

The way you mentioned the bot is wrong. Try @[email protected]

[-] [email protected] 2 points 7 months ago

Sorry, I could not get the wikipedia summary for the wikipedia link mentioned in your comment.

[-] [email protected] 1 points 7 months ago

@Asudox

Mention work OK
Thought bot will show up on Kbin but didn't
There is some issues that some users aren't showing up on kbin.social but wanted to test it anyway.

[-] [email protected] 1 points 7 months ago* (last edited 7 months ago)

Another user also using kbin got it to work though. Interesting.

Might be a federation issue. Could be related to LW still being on v18.5.0

[-] [email protected] 1 points 7 months ago

Does it work if i use Voyagers auto complete function for @‘s? https://en.wikipedia.org/wiki/Hello_Internet

I think bots like these should work without having to be mentioned since they're so useful and unobtrusive.

@[email protected]

[-] [email protected] 2 points 7 months ago

Here's the summary for the wikipedia article you mentioned in your comment:

Hello Internet is an audio podcast hosted by educational YouTube content creators Brady Haran and CGP Grey. The podcast debuted in 2014 and released 136 numbered episodes and 18 unnumbered episodes until February 2020, when the last episode was published. The podcast is currently indefinitely suspended and inactive. Listeners of the podcast are known as "Tims". The episodes of the podcast are usually about the interests of the creators and the differences between the hosts' lifestyles.

^article^ ^|^ ^about^

[-] [email protected] 1 points 7 months ago

I think bots like these should work without having to be mentioned since they're so useful and unobtrusive.

Could you elaborate further on that?

[-] [email protected] 2 points 7 months ago

Like itd be convenient if they worked whenever someone included a wiki link. So people didn’t have to remember to mention its username

[-] [email protected] 2 points 7 months ago* (last edited 7 months ago)

About that, well, read this conversation I had with another user that mentioned your idea:

https://lemmy.today/comment/5308154

[-] [email protected] 2 points 7 months ago

Ohh ok that’s fair. I just feel like barely anyone will remember to use it

[-] [email protected] 2 points 7 months ago

That indeed was my concern when I discussed this with the user that suggested this mention-only setup and also in the long text I sent to the user in the convo I sent you.

this post was submitted on 01 Feb 2024
158 points (98.2% liked)

Open Source

30150 readers
99 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS