Go to content|Go to the main menu|Go to search

edhouse-CookieGdpr-Policy-s
6533657
2
/en/gdpr/
653650B6A

Back to Blog

SQA

Sekubu - Simple Script Launcher

1.8.2024Jan Zatloukal

I use various scripts daily for automation or at least to speed up my work. I have quite a lot of them now, and the efficiency of using them started to decrease slowly because launching scripts always required some "extra steps". The most annoying step is remembering the name or location of a given script and running it in the command line.

Sekubu

So I was looking for a solution - a tool that could easily run scripts by clicking a button. I didn't expect or require anything else from the tool, yet I couldn't find one. So I created it myself.

Sekubu is written in Python and commands (buttons) are defined using an XML file. If you're interested in technical details, commands are executed via subprocess.Popen() and I used DearPyGui to generate the GUI.

You'll find instructions and several examples on GitHub on how to create your XML configuration. The configuration file is created automatically on first launch, so you can start from there.

Running a specific application or PowerShell script is a piece of cake:

<button label="Click me!">run_this_app.exe</button>
<button label="My script">powershell.exe -NoExit "./my_script.ps1"</button>

<button label="Click me!">run_this_app.exe</button>
<button label="My script">powershell.exe -NoExit "./my_script.ps1"</button>

Running a PowerShell script in the background and having its output displayed in a modal window is no problem at all:

<button label="Hello World!" new_console="false" show_output="if_not_empty">powershell.exe -Command "Write-Host 'Hello World!'"</button> 

<button label="Hello World!" new_console="false" show_output="if_not_empty">powershell.exe -Command "Write-Host 'Hello World!'"</button> 

Text labels or separators ensure better clarity in the GUI:

<text>Some fancy text note</text>
<separator/>

<text>Some fancy text note</text>
<separator/> 

How do I use Sekubu?

Sekubu serves as a "Start menu" on my computer. I use it to run a script to download the development build of the project I'm working on, run automatic tests, or use it to download test results from a shared drive and save them to my notes in Obsidian. I use it to set up my Python environment, restart our application server, or even open a configuration file in a text editor.

I'm not sure how much time this saves me daily. But you have to admit that clicking a button and getting straight to work is much better than opening a text editor, finding the required file, editing it, restarting the application, and only then getting to work.

Toolkits

I also have other instances of Sekubu and folders with scripts, which I automatically copy to virtual computers or real computers in the lab where I go to test, stored on network storage. I call them "toolkits" for work purposes. This way, I have tools available that help me quickly set up testing environments wherever I need them. Instead of clicking through installers and running various commands or scripts, I just need to click the "Set up environment" button.
One of my scripts is specifically for creating these toolkits. If I make any changes to the toolkit, one click is enough, and in a moment, everything is updated on that network storage.

Will you help with testing?

The shoemaker's children go barefoot, as they say. Sekubu hasn't undergone any testing yet. Although I use it daily without problems, I wouldn't dare to claim it's bug-free. So I'll appreciate any feedback.

The only thing I occasionally struggle with is the correct format for writing the command itself. I don't modify the input in any way and pass it directly to subprocess.Popen(). So if a command appears that can't be executed, it's usually just due to incorrect syntax.

Toolkity

Další instance Sekubu a složek se skripty, které automaticky kopíruji na virtuální počítače nebo skutečné počítače v laboratoři, kam chodím testovat, mám také uložené na síťovém úložišti. Pracovně jim říkám „toolkity“. Mám tak k dispozici nástroje, které mi pomáhají rychle nastavovat testovací prostředí všude, kde potřebuji. Namísto klikání do instalátorů a spouštění různých příkazů nebo skriptů stačí jen kliknout na tlačítko „Nastavit prostředí“.

Jeden z mých skriptů slouží právě k vytvoření těchto toolkitů. Pokud udělám v toolkitu nějakou změnu, stačí jeden klik a za moment mám vše aktualizované na onom síťovém úložišti.

Pomůžete s testováním?

Kovářova kobyla chodí bosa, to je známá věc. Sekubu zatím neprošlo žádným testováním. I když jej bez problémů denně používám, netroufnu si tvrdit, že chyby neobsahuje. Budu tedy rád za každou zpětnou vazbu.

Jediná věc, se kterou se občas potýkám je správný formát zápisu samotného příkazu. Zápis nijak neupravuji a předávám rovnou do subprocess.Popen(). Pokud se tedy objeví příkaz, který nejde spustit, je to většinou jen špatným zápisem.

Share article

Author

Jan Zatloukal

Jan ZatloukalQA & Cybersecurity Technical Lead dedicated to process automation and the development of mature corporate standards. Previously focused on automating electron microscopes, I now specialize in cybersecurity and the integration of development processes.

Edhouse newsletter

Get the latest updates from the world of Edhouse – news, events, and current software and hardware trends.

By signing up, you agree to our Privacy Policy.

Thank you for your interest in subscribing to our newsletter! To complete your registration you need to confirm your subscription. We have just sent you a confirmation link to the email address you provided. Please click on this link to complete your registration. If you do not find the email, please check your spam or "Promotions" folder.