Skip to content
/ statin Public

Statin is a python command line utility to generate static html websites. It implements SSI (Server Side Includes) directives to generate the static files for deployment.

License

Notifications You must be signed in to change notification settings

agnibho/statin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

                        Statin
                        ======

What is Statin?
================

Statin is a python command line utility to generate static html websites. It
implements SSI (Server Side Inclusion) commands to generate the static files for
deployment.

Installation
============

Download the package distribution and install it to your computer. You can
install the package with pip by running 'pip install statin.tar.gz'. You may
require superuser persmission to install the package. Alternatively you can
clone the repository to your computer and exucute the script named 'run'.

You need to have Python 3 installed in order to use the script.

Usage
=====

Create your website in html. The files containing SSI directives should have the
extension ".shtml", ".shtm", or ".sht". After creating the website change
directory to the document root of the site and run the script. By default the
static site will be generated in a subdirectory named statin-output.

A number of command line options are also available.

positional arguments:
  files                 List of files to be processed

optional arguments:
  -h, --help            show this help message and exit
  -q, --quiet           Suppress text output to console
  -v, --verbose         Verbose text output to console
  -s, --safe            Disable python eval of strings
  -r, --recursive       Process files recursively
  -l LEVEL, --level LEVEL
                        Maximum recursion level
  -p PATTERN, --pattern PATTERN
                        Filename patterns to be processed
  -o OUTPUT, --output OUTPUT
                        Specify the output directory

Supported Directives
====================

A directive is written as <!--#directive parameter="value" -->

The supported directives and parameters are listed below:

Directives | Parameters
-----------|---------------------------
include    | file / virtual
exec       | cgi / cmd
echo       | var
config     | timefmt / sizefmt / errmsg
flastmod   | file / virtual
fsize      | file / virtual
printenv   | (none)
if         | expr
elif       | expr
else       | (none)
endif      | (none)
set        | var & value

Defualt Variables
=================

DATE_LOCAL
DATE_GMT
DOCUMENT_URI
DOCUMENT_NAME
LAST_MODIFIED

Configuration
=============

The default configuration is stored in the file conf.py. Available configuration
options are:

OUTPUT_DIR  : The directory where the statin output files will be saved.
PROCESS_PAT : The filename extensions recognized by statin for processing.
TIMEFMT     : The default time format.
SIZEFMT     : The default size format.
ERRMSG      : The default error message.

Licensing
=========

Copyright (c) 2018 Agnibho Mondal
All rights reserved

This file is part of Statin.

Statin is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Statin is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Statin.  If not, see <http://www.gnu.org/licenses/>.

Contacts
========

Agnibho Mondal
[email protected]
www.agnibho.com

About

Statin is a python command line utility to generate static html websites. It implements SSI (Server Side Includes) directives to generate the static files for deployment.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages