LMAC Automation | LMAC Automatisierung (Dev-Blog) [EN | DE]

in Let's Make a Collage3 years ago (edited)

image.png

EnglishLanguage.png

Hello dear community,

There's something new I'd like to tell you about! :-)

I've been having fun participating in the weekly LMAC contests for about 1 year and 2 months now. But a lot has happened here since my first LMAC collage.
For example, our beloved community, after a long time of Shaka's hard work alone, has since a few weeks a moderator team, a permanent jury and weekly rotating guest judges.
Even a Discord chat is available for our artists since a few months. If you speak English or Spanish, you can get help there regarding LMAC, search and find nice conversations with other artists and promote your own artwork.
And this Discord chat is really a buster. Because since the LMAC team was set up and can have active conversations there, the ideas about how it could go on are really bubbling up.

That's how #LIL was born, the image library for artists by artists, which we can enjoy thanks to very active participation from our community and even beyond.
Of course, we also asked ourselves how we could make it easier for you to search for images in #LIL. Since all LIL posts are posted together with the regular LMAC posts in the community, the search function of PeakD, for example, would not be suitable and not very practical.
The most obvious solution to solve the problem seemed to us to have an index post and weekly compilations of our äLIL posts. But such tasks require and consume a lot of time that could also be used to work on other things. So automation was needed!

Because I work in software development professionally and therefore know a lot about programming automation tools, I offered to make a bot for LMAC that could do the job.
Shaka and the team liked the idea and so I had an exciting task from then on.

I finally got to work one night while a heavy storm was blowing outside my home office window, and there was lightning and thunder. It was an enchanting scenery for this work of creation.
The very next morning I had the basic framework finished and a few days later it was born, the LMAC Bot.
Still quite wild and totally buggy at first, it was soon able to fill a MySQL database with data from our image contributions.

GermanLanguage.png

Hallo liebe Community,

Ich habe euch etwas Neues zu erzählen! :-)

Seit ungefähr 1 Jahr und 2 Monaten habe ich Spaß dabei, an den wöchentlichen LMAC-Contests teilzunehmen. Aber seit meiner ersten Collage hat sich hier einiges getan.
Zum Beispiel hat unsere geliebte Community, nach langer Zeit, der für Shaka beschwerlichen Alleinherschafft, seit ein paar Wochen auch ein Moderatoren-Team, eine ständige Jury und wöchentlich abwechselnden Gast-Juroren.
Sogar ein Discord-Chat steht unseren Künstlern seit ein paar Monaten zur Verfügung. Wer der englischen oder der spanischen Sprache mächtig ist, dem kann dort im Bezug auf LMAC geholfen werden, nette Gespräche mit anderen Künstlern suchen und finden und eigene Kunstwerke bewerben.
Eben dieser Discord-Chat hat es in sich. Denn seitdem das LMAC-Team aufgestellt wurde und dort rege Gespräche führen kann, sprudeln die Idee darüber, wie es weiter gehen könnte.

So kam es zu #LIL, der Bildmaterial-Bibliothek für Künstler von Künstlern, an welcher wir uns dank überaus reger Teilnahme aus unserer Community uns sogar darüber hinaus erfreuen dürfen.
Natürlich stellten wir uns auch die Frage, wie wir euch die Bilder-Suche in #LIL erleichtern könnten. Da ja alle LIL-Beiträge, zusammen mit den regulären LMAC-Beiträgen in der Community gepostet werden, wäre beispielsweise die Suchfunktion von PeakD nicht geeignet und nicht besonders praktisch.
Die naheliegenste Lösung für das Problem schien uns ein Index-Post und wöchentliche Kompilationen der Beiträge zu sein. Doch solche Aufgaben erfordern und vertilgen sehr viel Zeit, die man auch für andere Dinge nutzen könnte. Eine Automatisierung musste also her!

Da ich beruflich in der Software-Entwicklung tätig bin und mich daher mit der Programmierung von Automatisierungswerkzeugen auskenne, bot ich an, einen Bot für LMAC zu basteln, der diese Aufgabe übernehmen kann.
Shaka und das Team fanden die Idee gut und ich hatte von da an eine spannende Aufgabe.

Eines Nachts ging ich schließlich an die Arbeit, während vor dem Fenster meines Arbeitszimmers ein heftiger Sturm tobte und es blitze und donnerte. Eine verheißungsvolle Kulisse für dieses schöpferische Werk.
Schon am nächsten Morgen hatte ich das Grundgerüst fertig und wenige Tage später war er geboren, der LMACs Bot.
Zunächst noch recht ungestüm und total verbuggt, konnte er aber bald eine MySQL-Datenbank mit Daten aus unseren Bildeinreichungen füllen.


EnglishLanguage.png

How the bot works

The bot, which is programmed in the Python programming language, searches the Hive once a day, or several times if necessary, for new posts that have been tagged with #LIL, and then finds the tables shown below in this article and reads out the information. After that, all the found information is stored in the database and then the bot stops its work until it is started again by a so-called cronjob (Start at predefined intervals). Unlike most other bots in the Hive, this bot does not permanently read in the Hive. Fixed working hours are completely sufficient for this bot, with regard to its task.

In order for the bot to find the LIL images, we came up with a table template that Shaka had already presented. The fixed structure that the image contributions have as a result makes it easy for the bot to read the data (title, tags and URL). In addition, it allows us to keep the bot's code simple.

Table template...

<table class="lil">

<!- COPY THIS BLOCK AND FILL IT OUT FOR EACH OF YOUR IMAGES -->
<tr>
<td class="lil-title">YOUR TITLE HERE</td>
<td class="lil-tags">YOUR, KEYWORDS, HERE</td>
<td class="lil-image"><img src="YOUR IMAGE LINK HERE" width="500"/></td>
</tr>

</table>

In a post it may look like this...

<table class="lil">
 
<tr>
<td class="lil-title">EN: It's my dog Frieda.<br/><br/>DE: Es ist mein Hund Frieda.</td>
<td class="lil-tags">dog, pet, monster, cutout</td>
<td class="lil-image"><img src="https://files.peakd.com/file/peakd-hive/quantumg/AJpiqN2PymNJZDWdamEiDovJExYA78MYRFNDvPoswonawwmPBKVBv8YkHTBtmJ2.png" width="300"/></td>
</tr>
<tr>
<td class="lil-title">EN: A shell I once found on the Rhine (river). <br/><br/>DE: Eine Muschel die ich einst am Rhein fand.</td>
<td class="lil-tags">shell, ocean, animal, fish, sea, cutout</td>
<td class="lil-image"><img src="https://files.peakd.com/file/peakd-hive/quantumg/AJmqzZgbEknZ6qPZTZx1mVSo6kiGAtYehyPF587QzmakmyeFEQt6iowLr2W3EvC.png" width="300"/></td>
</tr>
<tr>
<td class="lil-title">EN: My dog Frieda as she rolls around on the floor.<br/><br/>DE: Mein Hund Frieda, wie sie sich auf dem Boden wälzt.</td>
<td class="lil-tags">dog, pet, monster, cutout</td>
<td class="lil-image"><img src="https://files.peakd.com/file/peakd-hive/quantumg/48SM28mkJ9aTpQFZFiJfp9y61btEbYjAjpxtmbPZdsfaksRCvPY8zNWsbvtUxcaqsh.png" width="300"/></td>
</tr>

</table>

With another Python program, an index post should be automatically created or updated with the data from the database. One can then scroll through this index post or search in it with the search function in the browser to find the images of the LMAC Image Library.
I will work on this program as soon as the bot is operational. So probably in a few days.

GermanLanguage.png

Wie funktioniert der Bot genau.

Der in der Programmiersprache Python programmierte Bot durchsucht das Hive einmal am Tag, oder wenn nötig auch mehrmals nach neuen Posts, die mit #LIL getaggt wurden, um dann anschließend die weiter unten in diesem Beitrag gezeigten Tabellen zu finden und die Informationen herauszulesen. Danach werden alle gefundenen Informationen in der Datenbank gespeichert und dann beendet der Bot seine Arbeit, bis er wieder von einem sogenannten Cronjob (Aufruf in vordefinierten Intervallen) gestartet wird. Anders als die meisten anderen Bots im Hive, liest der Bot nicht ständig im Hive mit. Feste Arbeitszeiten sind für diesen Bot, hinsichtlich seiner Aufgabe völlig ausreichend.

Damit der Bot die LIL-Bilder finden kann, haben wir uns eine Tabellen-Vorlage ausgedacht, die Shaka bereits vorgestellt hatte. Durch die fest definierte Struktur, die dadurch die Bildeinreichungen haben, lassen sich die Daten (Titel, Tags, und URL) für den Bot problemlos auslesen. Zudem können wir dadurch den Code des Bots einfach halten.

Tabellen-Vorlage...

<table class="lil">

<!- COPY THIS BLOCK AND FILL IT OUT FOR EACH OF YOUR IMAGES -->
<tr>
<td class="lil-title">YOUR TITLE HERE</td>
<td class="lil-tags">YOUR, KEYWORDS, HERE</td>
<td class="lil-image"><img src="YOUR IMAGE LINK HERE" width="500"/></td>
</tr>

</table>

In einem Post kann das dann so aussehen...

<table class="lil">
 
<tr>
<td class="lil-title">EN: It's my dog Frieda.<br/><br/>DE: Es ist mein Hund Frieda.</td>
<td class="lil-tags">dog, pet, monster, cutout</td>
<td class="lil-image"><img src="https://files.peakd.com/file/peakd-hive/quantumg/AJpiqN2PymNJZDWdamEiDovJExYA78MYRFNDvPoswonawwmPBKVBv8YkHTBtmJ2.png" width="300"/></td>
</tr>
<tr>
<td class="lil-title">EN: A shell I once found on the Rhine (river). <br/><br/>DE: Eine Muschel die ich einst am Rhein fand.</td>
<td class="lil-tags">shell, ocean, animal, fish, sea, cutout</td>
<td class="lil-image"><img src="https://files.peakd.com/file/peakd-hive/quantumg/AJmqzZgbEknZ6qPZTZx1mVSo6kiGAtYehyPF587QzmakmyeFEQt6iowLr2W3EvC.png" width="300"/></td>
</tr>
<tr>
<td class="lil-title">EN: My dog Frieda as she rolls around on the floor.<br/><br/>DE: Mein Hund Frieda, wie sie sich auf dem Boden wälzt.</td>
<td class="lil-tags">dog, pet, monster, cutout</td>
<td class="lil-image"><img src="https://files.peakd.com/file/peakd-hive/quantumg/48SM28mkJ9aTpQFZFiJfp9y61btEbYjAjpxtmbPZdsfaksRCvPY8zNWsbvtUxcaqsh.png" width="300"/></td>
</tr>

</table>

Mittels eines weiteren Python Programmes, soll ein Index-Post automatisch mit den Daten aus der Datenbank erstellt bzw. aktualisiert werden. Durch diesen Index-Post kann man dann scrollen oder in ihm mit der Suchfunktion im Browser suchen um die Bilder der LMAC Image Library finden zu können.
An diesem Programm werde ich arbeiten, sobald der Bot einsatzbereit ist. Also wahrscheinlich in ein paar Tagen.


Images of the birth of a bot. | Bilder einer Bot-Geburt.

Planned work flow of the bot. | Geplanter Arbeitsablauf des Bots.

Planned infrastructure | Geplante Infrastruktur

Database - Datenbank

The workbench | Die Werkbank

EnglishLanguage.png

Opensource

The bot and all other LMAC developments are published open source on Github. We use the GIT repository feature there, so you can watch the development on our Github profile, in the dev-branch of the repository almost LIVE, if you want to. We will also allow pull requests (code change suggestions) as soon as any of our developments leave the dev branch and can then be found in a testing branch or in the master branch.

Link to Github profile: click here

The more up-to-date code base is still on my hard drive. But I will push it to the dev branch soon.

GermanLanguage.png

Quelloffen

Der Bot und alle weiteren LMAC-Entwicklungen werden quelloffen auf Github veröffentlicht. Wir nutzen dort die GIT-Repository Funktion, wodurch man die Entwicklung auf unserem Github-Profil, im Dev-Branch des Repositories quasi LIVE miterleben kann, insofern man das denn möchte. Auch Pull-Requests(Änderungsvorschläge zum Code) werden wir zulassen, sobald etwaige unserer Entwicklungen den Dev-Branch verlassen und dann in einem Testing- oder im Master-Branch zu finden sind.

Link zum Github-Profil: Klicke hier

Noch liegt die aktuellere Code-Basis auf meiner Festplatte. Ich werde sie aber bald in den Dev-Branch pushen.


EnglishLanguage.png

Development News

From now on, I will update you on a frequent basis about news regarding our automation tools. Of course, this also the implementation of suggestions from the community.

You are very welcome to share your ideas and suggestions.

GermanLanguage.png

Neuigkeiten aus der Entwicklung

Ich werde fortan regelmäßig über Neues bezüglich unserer Automatisierungswerkzeuge berichten. Das schließt selbstverständlich die Umsetzung von Vorschlägen aus der Community mit ein.

Für eure Ideen und Vorschläge sind jederzeit willkommen.


Best regards | Viele Grüße
QuantumG


╭━━⋞ ☙ My NFT artworks ≻≺ ♖ My dCity ⋟━━╮
╰━━━━⋞ ♫ My Rising Star(s) ⋟━━━━╯

Sort:  

This is so exciting. I think I told you once I took a course in programming Applesoft BASIC. So I understand the scheme. But that's like telling Picasso, "Look, I doodle." Still, I know enough to appreciate the beauty of your flowchart.

A wonderful tool for the community, @quantumg. I'll have to look at it more closely to see how much I understand.

Thank you for this contribution. Your gifts are without limit :))

Oh Applesoft-BASIC, that awakened nostalgic feelings for me. :-) I loved those BASIC variants that allowed one to do great things quite quickly without spending hours of typing and debugging Assembler code.

But that's like telling Picasso, "Look, I doodle."

Haha, that's good. :-D How would Kandinsky have reacted to it? xD

If you have any questions about the details of the charts, I'll be happy to answer it.

Thank you very much for stopping by, for your comment and for the tip! :-)
Your visits to my posts are always very much appreciated.


Das muss ich noch genauer studieren, aber auch das werde ich begreifen.
Dank für die hervorragende Arbeit, jetzt hast du dir dein Feierabend !BEER aber redlich verdient! 😎

Vielen Dank, auch fürs !BEER. :-)


Hey @muelli, here is a little bit of BEER from @quantumg for you. Enjoy it!

Did you know that you can use BEER at dCity game to **buy dCity NFT cards** to rule the world.

Wow Quantumg you are a genius! You know, I don't understand those things, sorry, but what I do understand is that it will be a great tool to search for images. As we say in my village, "if it rains like this, don't let it rain". I hope the weather continues to inspire you but not to make more disasters in your country. I will be looking forward to the final result! 🤩

"Genius" would be a great exaggeration. xD I just have a lot of fun doing it. :-)

is that it will be a great tool to search for images.

That is exactly the goal. And at the moment I have much more time than usual. The best time to bring this whole thing to a glorious end!

Thank you very much for stopping by, for your comment and for the tip. I was very happy with all of it. :-)

Hello. I understood everything until: HOW THE BOT WORKS

untitled.gif

So happy to knew you do!

How awesome it is to have this resource. You are a valuable asset to the LMAC team. Thank you for your hard work on this project. Now, all I have to do is the easy part and draw or click, publish. Voila!

Take care.

Thank you for these beautiful flowers. :-)

Hello. I understood everything until: HOW THE BOT WORKS

Imagine the bot is an employee in a warehouse of the company Hive. Once a day he searches the shelves in the warehouse for newly received boxes labeled with LIL. He then unpacks the boxes and writes down their details to register them in a book, when pictures are inside.
Another employee takes this book once a week and writes all the details of new boxes on a board in the cafeteria so that everyone can see which pictures were found in the boxes.

That is the whole magic. When I look at what I just wrote, I think I could have written it like that in my post. :-D

!LUV for you!

<><

<><

LUV

Connect

Trade


@justclickindiva, you've been given LUV from @quantumg.

Check the LUV in your H-E wallet. (1/1)

Now that is something I can relate to...especially the cafeteria. I can sit and eat lunch with my co-workers while we view the awesome pictures everyone submitted. We're not talking about how the pictures got to the cafeteria, we're just glad we get a chance to relax and eat the Pizza ordered for everyone to enjoy. You did remember to code in the food order?

Since the event is free, I'll leave a tip for the presenter!

Appreciate the tutorial!

Greetings friends, excellent flowchart images, these is a great original programming contribution, thanks for sharing to our LMAC community

Wow a very complete explanation but I was kind of stunned by so much all in one haha but what is coming for our community is amazing and the library is well loaded.

I finally got to work one night while a heavy storm was blowing outside my home office window, and there was lightning and thunder. It was an enchanting scenery for this work of creation.
The very next morning I had the basic framework finished and a few days later it was born, the LMAC Bot.

Danke fur der sturm hahahhah

Well this is great news and it’s great that a good team is formed. Thank you for the work done

xD Drama boosts everything. (But it really was.)

PS: Why did this anti-spam bot downvote your comment? That's rude.
A little bit of !LUV for consolation.

<><

<><

LUV

Connect

Trade


@brittandjosie, you've been given LUV from @quantumg.

Check the LUV in your H-E wallet. (1/1)


Hey @quantumg, here is a little bit of BEER from @muelli for you. Enjoy it!

Do you want to win SOME BEER together with your friends and draw the BEERKING.

Congrats @quantumg! What else can I say but welcome your goodwill to do something like this. !BEER !PIZZA

Connect

Trade


@quantumg! I sent you a slice of $PIZZA on behalf of @seckorama.

Learn more about $PIZZA Token at hive.pizza (3/10)

Thanks. I do it with great pleasure!

!LUV and !BEER for you, too.

@quantumg, sorry. :(

You can call the LUV bot a maximum of 1 times per day. To give more each day, check LUV Levels.


Hey @seckorama, here is a little bit of BEER from @quantumg for you. Enjoy it!

Learn how to earn FREE BEER each day by staking your BEER.


Hey @quantumg, here is a little bit of BEER from @seckorama for you. Enjoy it!

Learn how to earn FREE BEER each day by staking your BEER.

Your content has been voted as a part of Encouragement program. Keep up the good work!

Use Ecency daily to boost your growth on platform!

Support Ecency
Vote for Proposal
Delegate HP and earn more

I tried programming once and it was bleh, not for me at all. This is a huge task you've taken upon yourself and it is well appreciated, this tool will be so useful for us all, thank you

This looks really promising. Thanks for the great effort. I believe it is a benefit for all.

I find it very exciting that with everyone's contribution so much can be achieved. Your contribution is of great value in this project. I was wondering how we are going to sort this mess out?
and @Quantumg came along with his magic and made it possible. bravo!

Dear @Quantumg, after some time out of circulation due to health problems, I have allowed myself to open Hive, and, of course, I have run to see what was in Let's Make a Collage. It's been amazing to see how the community has progressed and to see that very dear people are still creating here.
I've missed a lot, and it's wonderful to see how @Shaka has continued with her usual constancy and mystique of work.
Although I'm still not 100%, it's a great joy to be able to try to make collages again.
A big hug, querido.