Stark · @Stark9837
120 followers · 2589 posts · Server techhub.social

The same thing happened yesterday while creating @remindMe. I was just making stupid mistakes, as one does when working with remote APIs and going deeper into returned dictionaries.

For this reason, I've started typing up the entire , which would allow you to create bots at an improved and more reliable and maintainable rate.

@Python

#mastobot #python

Last updated 1 year ago

Stark · @Stark9837
119 followers · 2586 posts · Server techhub.social

If you have ideas for a bot that I should build or you would like to use , feel free to send me a message, and I would be happy to help.

I can also help you start hosting your own !

@Python

#mastobot #group #python

Last updated 1 year ago

Stark · @Stark9837
114 followers · 2581 posts · Server techhub.social

I sometimes just love !

I am busy with testing for my next implementation, for a remindMe bot idea.

The main idea is to allow users to mention it and say `@botAccount 2 weeks 3 days 2 hours 5 minutes`, which would then in turn message them, reminding them of the post which they replied to with this comment.

Such functionality can sometimes be difficult, and regex gets its hate for speed, complexity and readibility. But this just works great in for a problem like this.

Here is the of an early prototype and example for those interested!

gist.github.com/e-dreyer/ce0f5

#regex #mastobot #python #gist

Last updated 1 year ago

Stark · @Stark9837
490 followers · 2534 posts · Server techhub.social

I don't find for very attractive. It is an old style, and the file based config of pages, all though semi-intuative for an experienced code, can be tedious and less eeadable than a standard page.

My question is, is seen is being still very slow, and would it be a good choice for a front-end local app? Should I even go this route, or should I maybe just go with for the front end and for the backend?

I would like to give a front-end side for my vots I am writing, which would allow users to easily see metrics and interact with the bot if they choose not to write any custom code.

Of course, it would be preferable for it to be OS agnostic, but it will akyway run in due to the database running in a docker compose.

@Python

#qt #python #html #electronon #djano #flask #mastobot #docker #programming #webdev #appdev #opensource

Last updated 1 year ago

Stark · @Stark9837
487 followers · 2567 posts · Server techhub.social

In the real world, there is a theory that you are only 7 minutes away from Leonard Dicaprio or that any actor has played in a movie indirectly with Kevin Bacon.

My hypothesis is that you are all ways 2 or 3 people away from @atomicpoet

This data would be useful to see how is spread out and maybe shown accounts all your followers follow or people in your circle follows, which you never knew existed .

Naturally I would use , which is running @3dprinting andb @Python so it will server as a POC to see if the class is generic enough as well as allow for the development system which can handle failed requests and get back to it again.

#Mastodon #mastobot

Last updated 1 year ago

Stark · @Stark9837
487 followers · 2566 posts · Server techhub.social

Ok, so I am just taking a break from @3dprinting and @Python for a week. They are now stable, and I am just waiting for some corner casebto crash and break it.

So what is my next challenge, you ask? Aaha, we are going to construct the social graph of Mastoson. Starting with my account, I am going to get all accounts that I follow as well as my followers and will then add them to a stack.

For every account, I will store their ID and instance domain.

From this, I will start doing a breadth-first-search, just because a depth search could go on forever without getting a usuable result.

In order to achieve this, I'll be using and for insane read and write speeds. I will also combine 3 or 4 accounts to get 4 API keys to bypass rate limits and to determine how to implement multi-bot in . I will also be doing pure webscraping. This will happen over a week or a month.

My hope is to construct something like this to see how my local communities are interconnected.

#python #Redis #mastobot

Last updated 1 year ago

stark@techhub:~$ █ · @Stark9837
464 followers · 2387 posts · Server techhub.social

Asyncio, however, will only allow Python to hand over control if it is waiting for output when we use the "await" keyword.

Because we have large functions with single lines that take long, asynio is a better choice here because we don't want something to freeze if it could actually run to completion.

Asyncio also allows us to mix blocking and not blocking functions more easily.

Thus, and @Python will need to be changed. Ideally, the periodic checks should be done with an async sleep function. During this time, the rest of the code can run. Then, we can have asyncs for all the new posts received. Finally, they can be posted.

All while this happens, the other part of the code can process mentions and followers.

Threads: realpython.com/intro-to-python

Async: realpython.com/async-io-python

How I will be doing this split is still under investigation.

@Python

#mastobot #python #programming

Last updated 1 year ago

stark@techhub:~$ █ · @Stark9837
464 followers · 2382 posts · Server techhub.social

threading, asyncio, and multi-processing

Recently, as I've worked on , I have enountered many situations where my code waits, takes a long time to execute, and my main loop is blocked.

With my @3dprinting bot, this only happens on the first run of a clean config, where all previous posts are fetched from the API and stored in a database The reason is irrelevant, but basically for metrics.

Thus, when the bot starts, it makes about 1.3k requests, one for every post by the bot. This can take about 10 minutes, with the API, paging, network speed, and rate limiting.

During this time, no mentions, new followers, or any other notifications are processed. Then BAM! Everything goes through, and WOW, we are back on track.

@Python

#python #mastobot #Mastodon #Redis #programming

Last updated 1 year ago

stark@techhub:~$ █ · @Stark9837
464 followers · 2379 posts · Server techhub.social

I did it again!

So I created , a generic Mastodon bot that allows anyone to create a bot.

I created a few versions, and I use it for @3dprinting. But naturally, knowing how to implement it and developing functions, I need a use case.

So after a discussion this morning. I spent the entire day writing @Python. Yes, I did it again.

However, this one now has a built-in to cross-post new posts fromhttps://discuss.python.org/, because why not.

This @Python required a few things, and updates were made to . I had to make it even more generic, implement an overkil datastore with , and extend the config system.

@Python will behave exactly like @3dprinting with the added feature of crossposts. These posts will, however, be "follower only" posts, to not polute and just flood everything initially.

The bot will parent posts, allowing for threads and discussions to be created.

The source code will be out tomorrow, just cleaning up.

#mastobot #python #Webscraper #Redis #boost

Last updated 1 year ago

stark@techhub.social:~$ █ · @Stark9837
430 followers · 2267 posts · Server techhub.social

@mcdanlj @3dprinting

I wrote it myself. The links were posted a week or so ago but is currently set to private as I changed the name from Mastodon-group-bot to as it now has more generic functionality and is also a Python package.

It is written in , , and also uses , but this is currently being changed to possibly use , but I am still experimenting.

I'll let you know once the repo is public again, and you can check out the source code.

The source code for this bot's config and the package will be back online in a day or two.

#github #mastobot #python #docker #sqlite #Redis

Last updated 1 year ago

Maarten Pelgrim · @maartenpelgrim
27 followers · 555 posts · Server mastodon.nl

Does anybody know what's the easiest way to create a bot for Mastodon?

#mastobots #mastobot #mastodonbots #mastodonbot #bot

Last updated 1 year ago

AI6YR · @ai6yr
3934 followers · 23430 posts · Server m.ai6yr.org

Looking to bring an RSS or ATOM feed into the ? I posted some source code for a quick-and-dirty utility to do this in here (could use some enhancements, but it's a good basic core of a feed poster) : github.com/ai6yr/rss2mastodon

#Fediverse #python #software #rss #atom #bot #mastobot

Last updated 1 year ago

Remco Boerma · @remco
13 followers · 100 posts · Server mastodon.education

@redegelde

Ik kan je bericht niet meer vinden op je FAQ bot, maar volgens mij is dit een library die je zoekt (op basis van de readme in ieder geval): pypi.org/project/mastobot/

> Use Mastobot when:
> Your bot replies to or interacts with certain posts on its home timeline; or
>Your bot answers some questions people ask it; or
> Your bot keeps track of some users it's following.

#python #mastobot

Last updated 1 year ago

DoomsdaysCW · @DoomsdaysCW
899 followers · 10614 posts · Server kolektiva.social

This week's / list - / / /

@rdrimmel
from , Mapper of the , @IDADarkSky(on Twitter)
advocate, Expert, fan of , , &

@marwellaspaceart
Amateur , love astronomy and

@mondinspace
, science and wonder. Personal account. Views and opinions my own.

@sundogplanets
Professor of astronomy, farmer of goats. (42910). She/her. Settler living on Treaty 4 lands (Saskatchewan).

@JohnBarentine
Astronomer. Historian. Author. Small business owner. Arizona native. Proud LGBT American. Retiring to asteroid 14505. Questioning everything; occasionally getting in trouble for it.

@starrytimepod
Sisters Jordan and Kit cohost this monthly featuring , ret-cons(tellations) of , and fun.

@nasapics_bot

{Bot) Universe at your fingertips, every hour!
NASA Jet Propulsion Laboratory's (JPL) unofficial Photoblog.

#followfriday #favoritefollows #darkskies #astronomy #astronomers #space #Astronomer #montana #milkyway #gaiamission #scicomm #madeinitaly #citizenscience #darkskiesforall #spaceartist #astrophotography #asteroid #Podcast #mythology #bot #mastobot #galaxy #photography #information #NASA #jpl

Last updated 1 year ago

už není jeden samostatný účet, ale skupina několika účtů. Zajímavé zprávy z tedy můžete sledovat na následujících účtech:

@Deep_in_IT_cz
@lsaeu
@MobilManiacz
@operatorivcr
@Rootcz
@smartmania

#techbot #technologie #mastobot #zpravobot

Last updated 1 year ago

už taky není jeden samostatný účet, ale skupina několika účtů. Zajímavé zprávy z tedy můžete sledovat na následujících účtech:

@Deep_in_IT_cz
@lsaeu
@MobilManiacz
@operatorivcr
@Rootcz
@smartmania

#techbot #technologie #mastobot #zpravobot

Last updated 1 year ago

už taky není jeden samostatný účet, ale skupina několika účtů. Zajímavé zprávy z tedy můžete sledovat na následujících účtech:

@Deep_in_IT_cz
@lsaeu
@MobilManiacz
@operatorivcr
@Rootcz
@smartmania

#techbot #technologie #mastobot #zpravobot

Last updated 1 year ago

už není jeden samostatný účet, ale skupina několika účtů. Zajímavé zprávy z tedy můžete sledovat na následujících účtech:

@EDNA_cz
@iliteraturacz
@kinobox_cz
@Kultura21_cz
@narodnigalerie
@narodniknihovna
@narodnimuzeum
@totalfilmweb

#kulturobot #kultura #mastobot #zpravobot

Last updated 1 year ago

už není jeden samostatný účet, ale skupina několika účtů. Zajímavé zprávy a informace tedy můžete sledovat na následujících účtech:

@DenikSport
@iDNEScz_Sport
@LivesportCZ
@sportCT
@sportcz
@F1onlinesk
@GPF1cz

#sportbot #mastobot #zpravobot

Last updated 1 year ago

už není jeden samostatný účet, ale skupina několika účtů. Zajímavé zprávy a data tedy můžete sledovat na následujících účtech:

@AgroriskC
@CHMUCHMI
@CHMU_hydrologie
@vystrahy
@Intersucho
@SUJBofficial

#meteobot #mastobot #Zprávobot

Last updated 1 year ago