I'd suggest sending it as one message so it's not interrupted by other chats in between. Matrix supports html being sent so you can just place <br> line breaks.

This is the hideous bash I was using to do it before, found it on my server: https://pastes.dev/5San77eoCU - I can't remember what broke but if you want to use it for ideas go ahead.

On 24/7/23 20:30, Ben Bonacci wrote:

Hi Nate,

I've recorded the script in action which can be accessed with this link: https://benbonacci.com/files/shares/1w-bug-safari-demo.mp4 (Expires in 1 week)

Regards,

Ben

On 23/7/23 23:43, Nate Graham wrote:
Very cool stuff. Can we see it in action anywhere?

Nate


On 7/23/23 01:38, Ben Bonacci wrote:
Hi Ben,

Thanks for the suggestion! Now after each request the script will wait 1-5 seconds before making the next request.

Regards,

Ben

On 22/7/23 22:30, Ben Cooksley wrote:
On Sun, Jul 23, 2023 at 12:18 AM Ben Bonacci <b...@benbonacci.com> wrote:

    Hi everyone!


Hi Ben,


    For the past few days I've been working on Bug Safari, which is a
    Python
    script that gets statistics for Plasma bugs and sends a report to the
    #plasma room on Matrix, which is one of the dot points for KDE's
    Automation goal.

    I've now got the script uploaded to Invent at
https://invent.kde.org/bbonacci/bug-safari for anyone to look
    over, make
    improvements or implement.


Thanks for this, I have just had a quick look over the code and it overall looks pretty reasonable, and also follows best practice of setting it's own user agent.

One small suggestion would be to add some small sleeps in to ensure that the server endpoints don't get hammered by your requests. While the script by itself is fairly innocent, if similar scripts were added for a series of other channels and they all ran at the same time, this could result in a rush on the server that could make it inaccessible to normal users (or at the very least impact responsiveness).

Adding some sleeps (ideally for a random number of seconds as people tend to pick the same cron times to run stuff on) will ensure this doesn't become an issue.


    Regards,

    Ben


Cheers,
Ben


    --     Ben Bonacci
https://benbonacci.com
    C0A9 E67F 8CDC B1A1 0860 1807 E018 065C C7DF 3976

    Quote of the Day: "What's the good of living if you don't try a
    few things?" - Charles M. Schulz

--
Ben Bonacci
https://benbonacci.com
C0A9 E67F 8CDC B1A1 0860 1807 E018 065C C7DF 3976

Quote of the Day: "If you only read the books that everyone else is reading, you can only think what everyone else is thinking." - Haruki Murakami

--
Ben Bonacci
https://benbonacci.com
C0A9 E67F 8CDC B1A1 0860 1807 E018 065C C7DF 3976

Quote of the Day: "It does not matter how slowly you go as long as you do not 
stop." - Confucius

Reply via email to