Each teacher needs specific tools for classroom management, as each class is different, and teaching practices change over time. Piztu attempts to address this need by providing a driving engine to which any teacher can adapt the working apparatus they require. Let’s take a look at an example!
Imagine a teacher who needs a text correction system that allows us to preview applications during evaluation, for instance. We can ask an AI to take a script (like the one used in button 11, “Editor AI”), modify it, so that it loads the text of an active note, corrects it, and saves it in the same note, replacing the original. We could ask it to do anything else, but let’s continue with the example:
- We open an AI, for example, https://grok.com, and upload script 11, which is in the working folder, within the subfolder .scripts. In my case, I named the working folder “reports”, and it’s in the path /home/user/reports (if you use Windows, the explanation is the same). Remember that the .scripts folder is hidden, and to view it, you must press the Ctrl+H key combination or go to the menu and choose the “Show hidden files” option.

If we open the .scripts subfolder and then the 11. Editor IA folder, we’ll provide the artificial intelligence with the ai_prompt.py file.

In the artificial intelligence prompt, we’ll indicate what we wish. For example, the following, which can, of course, be improved:
“I want to create a new script, and possibly the ai_prompt.py file can help us. I wish to make a change in the interface: in the first column, replace the ‘AI Result’ box with ‘Active Note Content’. Specifically, I want the script to load the content of the active note into this new box. In the same column, at the bottom, keep the prompt, but with an editable default prompt. The default prompt would be: ‘Correct the text grammatically, orthographically, and lexically in Galician, of the content that appears in the “Active Note Content” text box’. In the right column, I want the ‘AI Result’ box to appear, showing the corrected text result. The rest of the options and functionalities should remain. Therefore, the functionality of the new script, which we will call corrixe.py, is to load the content of the active note, correct it, and display it, with the option of auto-saving the active note with the corrections.”
Create a new subfolder in the folder with the name you desire, for example, 13. Corrixe, and within it, save the three files provided by the AI.
Additionally, we’ll ask it to generate the requirements.txt and metadata.yaml files (for the latter, we can provide a premade example to maintain the format).

https://drive.google.com/file/d/1h5oRhiPn45zI4SjI4UtrCid-kMvLvNhB/view?usp=sharing
It’s important to note that each time you execute “Register and download”, you will delete all information from the .scripts folder. Therefore, every time you create a script, you should save it in a safe place. Additionally, it’s recommended to periodically download the scripts using the “Register and download” procedure to benefit from improvements and bug fixes.
5. And it should automatically appear in the right column of Zettlr, thanks to the api service.
6. To test the script, I asked it to create a 200-word story in Galician with spelling, grammar, or lexical errors:
Once upon a time, there was a very small boy named Xosé. He had a dog, which was very ugly, but he loved him very much. One day, he was walking with a friend, who was also named Xosé, on the street. Suddenly, they saw a cat eating a fish. Xosé’s dog, which was very smart, ran towards it and started barking. The cat, which wasn’t afraid of anything, said: “Oh, how well you get along, come with me, and we’ll be friends.” The kids, very happy, said: “We are not kids, we are children”. The cat, with a face as if he didn’t know anything, replied: “I don’t care, the point is we are friends.” And then, the cat, the two kids, and the very ugly dog went to their house to play. They were very happy because they took great care of each other, and Xosé, the boy, said that his dog was very “handsome”, despite being ugly. The end.
7. Once created, create a new note where you paste the previous text. Save. 8. Open the new script, adjust the prompt to your preferences, and correct the text, being able to save it in the active note replacing the previous version.

As you can see, it’s easy to adjust a script to your way of working, and the functionalities that can be provided to Piztu are indeed countless. It would be great if you shared your scripts with your colleagues so that they, in turn, modify them, improve them, and share them again. To do this, you can use the Telegram channel: https://t.me/+VNJJ-F91EDNiYzhk.
This is the magic of free software 😉
