def convert(self, converter):
		def namekey(node):
			return str(node[name][0].content)

		dvds = xsc.Frag(self[dvd]).sorted(key=namekey)
		lds = xsc.Frag(self[ld]).sorted(key=namekey)

		with xsc.build():
			with xsc.Frag() as e:
				+xml.XML()
				+html.DocTypeXHTML10transitional()
				with html.html():
					with html.head():
						+meta.contenttype()
						+html.title("Media")
						+meta.stylesheet(href="Media.css")
					with htmlspecials.plainbody():
						+html.h1("Media")
						if lds:
							+html.h2(len(lds), " LDs")
							+html.ol(lds)
						if dvds:
							+html.h2(len(dvds), " DVDs")
							+html.ol(dvds)
		return e.convert(converter)
Exemple #2
0
    def convert(self, converter):
        def namekey(node):
            return str(node[name][0].content)

        dvds = xsc.Frag(self[dvd]).sorted(key=namekey)
        lds = xsc.Frag(self[ld]).sorted(key=namekey)

        with xsc.build():
            with xsc.Frag() as e:
                +xml.XML()
                +html.DocTypeXHTML10transitional()
                with html.html():
                    with html.head():
                        +meta.contenttype()
                        +html.title("Media")
                        +meta.stylesheet(href="Media.css")
                    with htmlspecials.plainbody():
                        +html.h1("Media")
                        if lds:
                            +html.h2(len(lds), " LDs")
                            +html.ol(lds)
                        if dvds:
                            +html.h2(len(dvds), " DVDs")
                            +html.ol(dvds)
        return e.convert(converter)
Exemple #3
0
    margin: 0px 30px 10px 30px;
    font-size: 11px;
    line-height: 18px;
    border: 1px solid #eee;
    background-color: #fafafa;
    padding: 1px 5px 2px 5px;
    overflow: auto;
}
"""

now = datetime.datetime.now()

node = xsc.Frag(html.h1("Cronjobs ", html.span("(generated at %s)" % now.strftime("%d.%m.%Y %H:%M"), class_="note")))

for host in hosts:
    node.append(html.h2(host.name))
    for (user, crontab) in sorted(host.getcrontabs()):
        node.append(html.h3(user, "@", host.name))
        node.append(html.pre(crontab.decode("latin-1").strip()))

node = xsc.Frag(
    xml.XML10(), "\n",
    html.head(
        meta.contenttype(),
        html.title("Cronjobs"),
        html.style(style, type="text/css"),
    ),
    html.body(node)
)

print e.asBytes(encoding="iso-8859-1")
from ll.xist import xsc, xfind, parse
from ll.xist.ns import html, php, abbr

node = xsc.Frag(
    html.div(
        html.h1("The ", html.em("important"), " headline"),
        html.p("The ", html.em("first"), " paragraph."),
        html.p("The ", html.em("second"), " ", html.em("important"),
               " paragraph."),
        align="left",
    ),
    html.div(
        html.h1("The headline", html.img(src="root:gurk.gif")),
        html.p("The ", html.em("first"), " paragraph."),
        html.div(
            html.h2("The ", html.em("important"), " headline"),
            html.p("The ", html.em("second"), " ", html.em("important"),
                   " paragraph."),
            id="id42",
        ),
        html.div(id="id23"),
        class_="foo",
    ),
    html.p(html.em("only")),
    php.php("echo $footer;"),
    abbr.xist(),
)


def test_levels():
    def check(node, expr, ids):
Exemple #5
0
	def convert(self, converter):
		e = html.h2(self.content)

		return e.convert(converter)
Exemple #6
0
    border: 1px solid #eee;
    background-color: #fafafa;
    padding: 1px 5px 2px 5px;
    overflow: auto;
}
"""

now = datetime.datetime.now()

node = xsc.Frag(
    html.h1(
        "Cronjobs ",
        html.span("(generated at %s)" % now.strftime("%d.%m.%Y %H:%M"),
                  class_="note")))

for host in hosts:
    node.append(html.h2(host.name))
    for (user, crontab) in sorted(host.getcrontabs()):
        node.append(html.h3(user, "@", host.name))
        node.append(html.pre(crontab.decode("latin-1").strip()))

node = xsc.Frag(
    xml.XML10(), "\n",
    html.head(
        meta.contenttype(),
        html.title("Cronjobs"),
        html.style(style, type="text/css"),
    ), html.body(node))

print e.asBytes(encoding="iso-8859-1")