Skip to content

podhmo/htmlpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

htmlpp

simple.pre.html

<@def name="box">
<div class="box">
  <@yield/>
</div>
</@def>

code

# -*- coding:utf-8 -*-
from htmlpp import get_repository
import os.path


here = os.path.join(os.path.abspath(os.path.dirname(__file__)))
repository = get_repository([here], outdir=here)

html = """\
<@import module="simple" alias="s"/>

<@s:box>
<p>this is the contents of a box</p>
</@s:box>
"""
print(repository.render(html))

output

<div class="box">

<p>this is the contents of a box</p>

</div>

TODO: gentle introduction.

About

expression base html preprocessor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published