Skip to main content

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:

  1. src/make.py: This file contains a run function responsible for building the website. Whenever the contents of the src folder change, this function is triggered. It takes an EZJinja object and processes the templates to generate the website.

  2. Jinja2 Templates: Found in the src/templates directory, 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.

  3. Static Files: The src/static directory 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.

  4. Meta Technique Files: Located in the src/meta directory, 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

  1. Clone the repository:
git clone https://github.com/adanayi/pykatana.git
cd pykatana
  1. Copy the necessary files:
cp -r pykatana/__make/* .
  1. On Linux:
./make.sh

On Windows:

./make.bat

On Mac: pykatana never supports mac.

  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pykatana-1.0.5.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pykatana-1.0.5-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file pykatana-1.0.5.tar.gz.

File metadata

  • Download URL: pykatana-1.0.5.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

Hashes for pykatana-1.0.5.tar.gz
Algorithm Hash digest
SHA256 3d0f2d22836b3f8815b5ae08dc489ea60ffa95671c0c1da36e7078f9958a3a76
MD5 c7f8f242b1fd12d737b97f8ee46c0610
BLAKE2b-256 d6cd5d6e571afdf767b2e7f69872fb598a6e901687c88c58d234e36919225a7a

See more details on using hashes here.

File details

Details for the file pykatana-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: pykatana-1.0.5-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

Hashes for pykatana-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 008782a444558f702b819e266611202a6fe4d983fced6e7776c06762cd6a94e4
MD5 6200fd4ab9cfbd2ccbd2d6228d91b338
BLAKE2b-256 a38bbe3bcb3cfb74765d9f06270f402ef28027d80b5031bf391b89cdba4c284c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page