this post was submitted on 04 Jul 2023
24 points (92.9% liked)

Ask Lemmy

26613 readers
1856 users here now

A Fediverse community for open-ended, thought provoking questions


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either [email protected] or [email protected]. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email [email protected]. For other questions check our partnered communities list, or use the search function.


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 1 year ago
MODERATORS
 

I'm thinking of looking at the Lemmy api and that's best done when you have some actual problem to solve!

So, is there any bot that you'd like to see?

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 17 points 1 year ago (2 children)

Some recollections from Reddit:

A bot that links the top posts of all time for a community. Gives a good sense of the community's greatest hits when referenced in discussions.

A bot that converts imperial to metric units or vice versa. Some people do find this one annoying, but as a metric user, this one helps me understand miles and pounds, etc.

A bot that summarises or pulls the first paragraph of a Wikipedia article.

[–] [email protected] 4 points 1 year ago

The metric <-> imperial seems like something I'd have fun doing!

[–] [email protected] 2 points 1 year ago

In a similar vein, a bot that links to a timezone converter.

[–] [email protected] 6 points 1 year ago (3 children)

One that inserts a comment randomly about jumper cables or the lochness monster

[–] [email protected] 8 points 1 year ago (2 children)
[–] [email protected] 5 points 1 year ago (1 children)

Was thinking about that but it's often considered annoying, so I thought I'd ask first.

[–] [email protected] 3 points 1 year ago (1 children)

I liked the summarize bot. That one was actually contributing to conversations.

[–] [email protected] 2 points 1 year ago

Yeah, that one was definitely nice!

[–] [email protected] 3 points 1 year ago

I would rather have Lemmy get the ability to follow a comment or post. That's mostly what it had been used for.

[–] [email protected] 3 points 1 year ago (2 children)

It’s funny you mention that. My friend’s teenage son had made a bot for Reddit years ago when it was a new thing while he was in a summer program for computer science. The bot would post theater times for latest movie releases in local subreddits and it was considered a helpful bot by most. I got used to relying on it quite a bit - until one time I took the family to what I thought was a Lego movie, but we ended up seeing Darren Aronofsky’s Mother! My father had came with two of my 2nd cousins and he was disturbed to say the least. When we got home, my dad was so upset that he beat me unmercifully with a set of jumper cables to teach me a lesson - you shouldn’t expose the family to such nonsense he said. Needless to say I will never rely on online bots for movie times with my family again.

[–] [email protected] 2 points 1 year ago

Didn't see this one coming. Good job sir

[–] [email protected] 2 points 1 year ago

undefined> When we got home, my dad was so upset that he beat me unmercifully with a set of jumper cables to teach me a lesson - you shouldn’t expose the family to such nonsense he said. Needless to say I will never rely on online bots for movie times with my family again.

LMAO you bastard!

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (2 children)

My dumbass non-coder self would kill to have a bot that autoposts a thread every 12am daily. It's hard to stay up that late just to make the daily thread, lmao.

Or maybe there is one already?

[–] [email protected] 1 points 1 year ago

Hi there! I made an app that allows you to schedule posts: https://schedule.lemmings.world

Not a bot, but still should help a bit. You can also pin/unpin a post using the scheduler.

[–] [email protected] 1 points 1 year ago

Not sure if there's one, but it doesn't seem hard at all.

[–] [email protected] 3 points 1 year ago

None. None of them.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (3 children)

AutoModbot, autotldr, remindme, top posts And lemmy URL fixer (transform regular lemmy link to federated one e.g. https://lemmy.world/c/memes to [email protected]).

[–] [email protected] 2 points 1 year ago (3 children)
[–] [email protected] 2 points 1 year ago

Hi there! Looks like you linked to a Lemmy community using an URL instead of its name, which doesn't work well for people on different instances. Try fixing it like this: [email protected]

[–] [email protected] 1 points 1 year ago (1 children)

Fyi this is calling out links made with the official autocomplete. I've blocked it but does that stop it from replying to me or just stop me from seeing the replies?

[–] [email protected] 1 points 1 year ago (1 children)

It stops it from replying to you. And the official autocomplete is weird, it produces wrong links and then replaces them on the fly with the correct ones.

[–] [email protected] 1 points 1 year ago (2 children)

Yeah I'm aware not all the app interfaces etc have caught up with the proper links yet. So I'll just keep including the local ones manually for now to include the most people. Anyway cheers, I post a lot of links so as long as it's not hassling me with false positives 😄

[–] [email protected] 2 points 1 year ago

I'm currently working on handling that weirdness the UI does to ignore the default links, will let you know when it's updated.

[–] [email protected] 1 points 1 year ago (1 children)
[–] [email protected] 1 points 1 year ago

Quick work! 👏

[–] [email protected] 1 points 1 year ago (1 children)

Well done! Much needed. How it summon itself?

[–] [email protected] 2 points 1 year ago

Just write the URL and it should come. It does have to know about your community, though, not sure how exactly that works.

[–] [email protected] 2 points 1 year ago

Those are good ideas!

[–] [email protected] 0 points 1 year ago (1 children)
[–] [email protected] 0 points 1 year ago (1 children)

Is it possible to make it comment on a specific post? Mention in does nothing

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

It probably doesn't know about the community, or it doesn't have support for the site. Can you link me to the post (either here, or in PM, it's up to you).

Edit: Probably found it, it doesn't have any support for news.sky.com, shall I add it?

[–] [email protected] 0 points 1 year ago (1 children)

Thanks for your answer. idk about adding it, the article sounded interesting but idk how relayable this news site is and how much work it takes. I guess it's up to you :)

[–] [email protected] 1 points 1 year ago (1 children)

Added it along with the ability to respond to mentions. Once it's deployed, it should respond to your mention (hopefully, it was kinda huge overhaul of the code).

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Worked on my mention :)

Just throwing out an idea, feel free to ignore it XD

I think that if one would write a quick "how to write a site handler" with a built-in template (like I've seen used), I'm sure many will contribute and send PRs for their favorite sites. If you're interested of course. I don't mind volunteer for doing it either.

[–] [email protected] 0 points 1 year ago (2 children)

If you feel up to it, I'll gladly accept it! I'm planning on doing it myself, but I'm not sure when I'll have the time.

[–] [email protected] 1 points 1 year ago

I think I can do it tomorrow, hopefully it won't slip my mind

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

How to make a site handler:

  • Go to your favorite news site (for example: euronews.com)
  • Go to a random article
  • Go to the blank space inside of the actual article (Not the summary that's usually on top)
  • Right click on that spot and go to inspect

In our example:

  • Then, look at the div HTML element it selected for you, and try to go up to the Parent div element as long as when you select it, only the body of the article get mark. In our example, when I did the inspect step, I got this div element marked:

But, as I went up the tree like the last step said, I found this div:

You might think to go even upper like this:

But as you can see, the browser highlighted parts that aren't the body of the article itself. So...don't.


Now that we got the correct div, we'll fill the siteHandler template:

SiteHandler extends AbstractSiteHandler
{
    protected function getHostnames(): array
    {
        return [''];
    }

    protected function getSelector(): string
    {
        return '.> p'; 
    }
}

Like so:

 p';
    }
}
  • Save that template as SiteHandler.php (in our example, EuronewsSiteHandler.php )
  • Send PR to the Official AutoTldr repo with the file you just created.
  • DONE

Edit it as you wish, or let me know if you need me to do so. No need for credit obviously, just helping improve this amazing tool is enough :)

EDIT: something wen't wrong with the markdown, fixing it right now.___``___

[–] [email protected] 0 points 1 year ago (1 children)

Thank you very much! I've saved the comment and when I have time I'll include it in the repository's readme.

[–] [email protected] 1 points 1 year ago

NP, but I'd advise you to safe it somewhere else as a whole as I don't know for how long that code sharing website host the templates. Although you can easily rewrite this part.

[–] [email protected] 2 points 1 year ago

Maybe a "good bod", "bad bot" detection bot? I imagine a lot of people won't actually report a problem on GitHub all time (some bots don't even leave their source code in their comment), so this way you get a way to reports issues+get an example, or to see when it works fine.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

u/WanderingDwarfMiner, rock and stone!

[–] [email protected] 1 points 1 year ago

AMPutator, RSS bot, timezone bot, a bot to provide a Reddit archive URL when someone posts a Reddit URL so we don’t have to send them traffic.

[–] [email protected] 1 points 1 year ago (1 children)

The Lotrmemes collection of bots

[–] [email protected] 2 points 1 year ago

We've only just escaped them!

[–] [email protected] 0 points 1 year ago (1 children)
[–] [email protected] 1 points 1 year ago (1 children)

What's that supposed to do?

[–] [email protected] 1 points 1 year ago (1 children)

It's from the vexillology communities; it takes the image of the flag posted and creates a page where it can be viewed waving

[–] [email protected] 1 points 1 year ago

Images are not my thing, sadly :/

[–] [email protected] 0 points 1 year ago

RemindMe bot was always my favourite.

load more comments
view more: next ›