HTML is too hard, let's write the website in Python!
Pintes is a tool made in Python that allows users to develop static HTML pages with ease.
- The tool itself can be pretty useful in some cases, such as for a prototype or a simple GUI for something like pywebview.
- At first, the name "Pintes" was a joke but now doubles as a play on the word "pint", a unit of liquid.
- In Pintes, a pint is what holds your elements.
Pintes internally uses a list that the tag create functions append to. This list is then joined and written to a file after the necessary tags are added.
As of 0.1:PRERELEASE, Pintes is not on PyPI. And since I don't understand how to use setup.py, you'll have to clone the repository and use the pintes.py file as a module.
As of 0.2.alpha.1 (0.2a1), Pintes is now on PyPI. You can install it using pip install pintes and use it as a module.
Check out the demo folder for a demo on how to use Pintes.
- Most HTML tags
- Divs support
- Classes support
- CSS support
- Image support
- Anchor/
atag support - JS support
-
<script>tag - Basic JS functionality from within Python
-
- Custom divs support (e.g.
ulandol) - Self-closing tags support (e.g.
br)
Am I missing something? Help Pintes and make an issue!
The license for Pintes is the GNU General Public License v3.0. You can view the license here in the LICENSE file or here.
Because of the license, Pintes is free to use, modify, and distribute. However, you must provide the source code and the license with the distribution if you modify it.
If you want to contribute to Pintes, you can fork the repository and make a pull request. Don't know where to start? I recommend just reading through the code and adding features that haven't been added yet.
Nix users (and by extent, NixOS users) can take advantage of the shell.nix file. Just cd into the project and run nix-shell. It'll take care of everything; installing the required packages, setting up the venv if needed and activating it, all in a temporary environment that won't affect your system.