source: README

Last change on this file was 6a7adc4, checked in by Agnibho Mondal <mondal@…>, 2 years ago

Packaged with distutils

  • Property mode set to 100644
File size: 3.3 KB
Line 
1                        Statin
2                        ======
3
4What is Statin?
5================
6
7Statin is a python command line utility to generate static html websites. It
8implements SSI (Server Side Inclusion) commands to generate the static files for
9deployment.
10
11Installation
12============
13
14Download the package distribution and install it to your computer. You can
15install the package with pip by running 'pip install statin.tar.gz'. You may
16require superuser persmission to install the package. Alternatively you can
17clone the repository to your computer and exucute the script named 'run'.
18
19You need to have Python 3 installed in order to use the script.
20
21Usage
22=====
23
24Create your website in html. The files containing SSI directives should have the
25extension ".shtml", ".shtm", or ".sht". After creating the website change
26directory to the document root of the site and run the script. By default the
27static site will be generated in a subdirectory named statin-output.
28
29A number of command line options are also available.
30
31positional arguments:
32  files                 List of files to be processed
33
34optional arguments:
35  -h, --help            show this help message and exit
36  -q, --quiet           Suppress text output to console
37  -v, --verbose         Verbose text output to console
38  -s, --safe            Disable python eval of strings
39  -r, --recursive       Process files recursively
40  -l LEVEL, --level LEVEL
41                        Maximum recursion level
42  -p PATTERN, --pattern PATTERN
43                        Filename patterns to be processed
44  -o OUTPUT, --output OUTPUT
45                        Specify the output directory
46
47Supported Directives
48====================
49
50A directive is written as <!--#directive parameter="value" -->
51
52The supported directives and parameters are listed below:
53
54Directives | Parameters
55-----------|---------------------------
56include    | file / virtual
57exec       | cgi / cmd
58echo       | var
59config     | timefmt / sizefmt / errmsg
60flastmod   | file / virtual
61fsize      | file / virtual
62printenv   | (none)
63if         | expr
64elif       | expr
65else       | (none)
66endif      | (none)
67set        | var & value
68
69Defualt Variables
70=================
71
72DATE_LOCAL
73DATE_GMT
74DOCUMENT_URI
75DOCUMENT_NAME
76LAST_MODIFIED
77
78Configuration
79=============
80
81The default configuration is stored in the file conf.py. Available configuration
82options are:
83
84OUTPUT_DIR  : The directory where the statin output files will be saved.
85PROCESS_PAT : The filename extensions recognized by statin for processing.
86TIMEFMT     : The default time format.
87SIZEFMT     : The default size format.
88ERRMSG      : The default error message.
89
90Licensing
91=========
92
93Copyright (c) 2018 Agnibho Mondal
94All rights reserved
95
96This file is part of Statin.
97
98Statin is free software: you can redistribute it and/or modify
99it under the terms of the GNU General Public License as published by
100the Free Software Foundation, either version 3 of the License, or
101(at your option) any later version.
102
103Statin is distributed in the hope that it will be useful,
104but WITHOUT ANY WARRANTY; without even the implied warranty of
105MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
106GNU General Public License for more details.
107
108You should have received a copy of the GNU General Public License
109along with Statin.  If not, see <http://www.gnu.org/licenses/>.
110
111Contacts
112========
113
114Agnibho Mondal
115contact@agnibho.com
116www.agnibho.com
Note: See TracBrowser for help on using the repository browser.