A Python-based build system for creating static websites with ease and flexibility.
Project description
pykatana
pykatana is a Python-based build system designed for creating static websites with ease and flexibility.
Overview
A Katana project comprises several essential components:
-
src/make.py: This file contains arunfunction responsible for building the website. Whenever the contents of thesrcfolder change, this function is triggered. It takes an EZJinja object and processes the templates to generate the website. -
Jinja2 Templates: Found in the
src/templatesdirectory, these templates form the backbone of your website's structure and content. They provide the flexibility to customize and design your site according to your requirements. -
Static Files: The
src/staticdirectory houses static files such as CSS, JavaScript, images, and other assets required for your website. These files are served directly to users without any processing. -
Meta Technique Files: Located in the
src/metadirectory, these files enable dynamic content generation for your website. Using the meta technique, you can access and utilize metadata stored in JSON files within your Jinja2 templates. This allows for dynamic updates and customization of your site based on external data sources.
Installation
Method 1: Install via pip
You can install pykatana using pip:
pip install pykatana
Method 2: Use prebuilt executables
Download prebuilt executables from the Releases section.
Method 3: Clone the repository
Clone the repository and copy "pykatana/pykatana" inside your project folder. You can then access pykatana using:
python3 -m pykatana [args]
Method 4: Clone and build from source
- Clone the repository:
git clone https://github.com/adanayi/pykatana.git
cd pykatana
- Copy the necessary files:
cp -r pykatana/project_make/* .
- On Linux:
./make.sh
On Windows:
./make.bat
On Mac: pykatana never supports mac.
- The executable will be generated as ./dist/pykatana (or pykatana.exe).
Usage
How to use pykatana?
Method1: Executable files (prebuilt or built)
pykatana [args]
Method2: With python packages (pip3 or clone)
python3 -m pykatana [args]
Usage modes
Development server
cd to your project's folder (root), then simply run pykatana without any args. If the folder is empty, pykatana initializes it and opens the development server. Otherwise, it sets up the development server, allowing you to continue your development.
Deploy
The output of your project will always be put into the ./build folder alongside ./src. You can statically serve this folder. If you want to only build the folder without starting the development server, you can use:
pykatana -b
or
python3 -m pykatana -b
License
This project is licensed under the GNU General Public License v3.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pykatana-1.0.6.tar.gz.
File metadata
- Download URL: pykatana-1.0.6.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54c09fb4df38350957c5c03b2eefd6d06a562e4bf0a6a24568efa8f6d47dd8e5
|
|
| MD5 |
7690b7e1c99db39d21c566640d1f8f98
|
|
| BLAKE2b-256 |
5271ff7ecc0c6f88d056b1c7012e4162b7b4b22c355132210785e7f68f986d9f
|
File details
Details for the file pykatana-1.0.6-py3-none-any.whl.
File metadata
- Download URL: pykatana-1.0.6-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6ca28431b2b348ebb60ab82ddfef9b94e1f0eeb47523e1af2fd8a3e3514ae32
|
|
| MD5 |
87aee38816e10f074365c04afcfc641c
|
|
| BLAKE2b-256 |
084d447768db452ff1b338dddfd6923469d3aa464c69c82bdb34f0c2bad86eb4
|