Plugins

(page in construction)

It's possible to make some personalized operations making some scripts in a precise way. They can be done using python files, done as this simple example

def go(plugfile = "", plugtext = ""):
    if plugfile == "":
        return ""
    res = plugtext.replace("Old", "New")
    return res

def config(percorso = ""):
    fn = os.path.join(percorso, "site", "paths")
    if not os.path.exists(fn):
        os.makedirs(fn)

and putting them into directory /site/plugins. The part that is executed is the function go(). There is a naming convention for using them, and files are used differently for every purpose. Function config() is automatically called if present, but is not mandatory. Obviously, other functions can be added, but theyr scope is internal to plugin.

strt - at the start of application

prev - at the begin of processing page

post - at the end of processing page

last - at the end of works, before building html

fnal - at the end of works, before copying to dest