Skip to main content
=======
plywood
=======

```
load('url')
load('compress')
doctype('html') # only accepts literals. use html5 please.
html:
head:
meta(charset="utf-8")
meta(name="viewport", content="width=device-width; initial-scale=1.0")
title:
if title:
# docstrings *are* stripped of preceding whitespace (they must be
# indented), and the first and last newline is removed.
"""
{title} |
""" # string intepolation is a little more heavy-duty than `.format()`, but more similar than different.
'Welcome' # string literals require quotes :-/ I *might* add another way to do this...
compress('css'):
link(rel='stylesheet', type='text/css', href=static('css/reset.css'))
link(rel='stylesheet', type='text/css', href=static('css/welcome.css'))
script(src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js", type="text/javascript")
compress('js'):
script(src=static("js/underscore.js"), type="text/javascript")
script(src=static("js/backbone.js"), type="text/javascript")
ieif 'lt IE 9':
script(src="//html5shiv.googlecode.com/svn/trunk/html5.js", type="text/javascript")
link(rel='stylesheet', type='text/css', href=static('css/ie.css'))
block('extra_head') # blocks, and block inheritance? of course!
body:
div(class="wrapper", id="wrapper") # no shorthand for class and id (yet)
header:
block('header'):
p(class="logo"):
block('header_title'):
if user:
'Welcome, '{user.name}'
else:
'Welcome'
if current_member:
p(class="login"):
"Welcome, {current_member.preferred_name}"
a(href=url("logout")): 'Log Out'
</header>
nav:
ul:
block('nav'):
li: a(href=url("login")): 'Login'

section class="breadcrumb":
block('breadcrumb')

section(class="main"):
block('messages'):
if messages:
ul(class="messages"):
for message in messages:
li(class=message.tags): '{message}'
script:
# code literals, so that savvy editors can color the source code
```javascript
$(document).ready(function(){
$("ul.messages").addClass("animate");

var fade_out = _(function() {
this.addClass("fade-out")
}).bind($("ul.messages"))

setTimeout(fade_out, 5000);
$("ul.messages").bind("click", fade_out);
});
```
block('content')

footer:
# p:
# 'These are comments.'
# span: '|'
# '&copy;2012 CrossFit'
```

------------
INSTALLATION
------------

::

$ pip install plywood
$ ply < in.ply > out.html


-------
LICENSE
-------

:Author: Colin Thomas-Arnold
:Copyright: 2012 Colin Thomas-Arnold <http://colinta.com/>

Copyright (c) 2012, Colin Thomas-Arnold
All rights reserved.

See LICENSE_ for more details (it's a simplified BSD license).

Metadata

Release files for plywood v0.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plywood v0.0.0
File Size Uploaded
plywood-v0.0.0.tar.gz 2.5 kB Details

Release files / plywood-v0.0.0.tar.gz

Download URL plywood-v0.0.0.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d2a30802834103db1666713238f4ab6d2bf53f258f2995f1d24fa642dfcb4762
BLAKE2b-256 checksum
How to use checksums
53e3bb0d3f14b727372067665efc1b35e80e77f0a5741ddcc2f5a9660aae3445
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

2.1.0

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.11.0

1 release file

1.10.0

1 release file

1.6.3

1 release file

1.6.1

1 release file

1.5.5

1 release file

1.5.4

1 release file

1.5.3

1 release file

1.5.2

1 release file

1.5.1

1 release file

1.5.0

1 release file

1.4.0

1 release file

1.3.0

1 release file

1.2.4

1 release file

1.2.3

1 release file

1.2.2

1 release file

v1.2.0

1 release file

v1.1.2

1 release file

v0.0.3

1 release file

v0.0.2

1 release file

v0.0.1

1 release file

This release

v0.0.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page