Create Binary From Python Script
I wrote a script for this homelab-blog, so I don't have to edit the HTML and CSS all by myself. The script uses some keywords to know what kind of blog feature I want to use in my article. After writing the article in a simple TXT file with the keywords, it converts it to an HTML site with JavaScript for copying code blocks and CSS for some good looks.
But, I also want to use this on different machines where I don't have python installed, so a binary it must be.
Use PyInstaller
To "compile" my python script to a binary, I had to use a tool called "PyInstaller".
1 2 3 4 5 |
|
After that the finished binary file is located under /dist and can be run just like every other binary. I just also added it to my system's path, so I can use it system-wide.
1 2 3 4 5 |
|
XOR gitfeber