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

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=" 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=" 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=" 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=" 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=" 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=" 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) ⋟━━━━╯

H2
H3
H4
3 columns
2 columns
1 column
28 Comments
Ecency