Added web pages, and some ee/passes stuff. *Broken*.
git-svn-id: http://llvm-py.googlecode.com/svn/trunk@3 8d1e9007-1d4e-0410-b67e-1979fd6579aa
131
www/makeweb.py
Executable file
|
|
@ -0,0 +1,131 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os, sys, shutil
|
||||
from stat import *
|
||||
from string import Template
|
||||
from optparse import OptionParser
|
||||
|
||||
# files in src dir that should not be copied to web dir
|
||||
SKIP_FILES = [ 'layout.conf' ]
|
||||
|
||||
# asciidoc command line
|
||||
ASCIIDOC = 'asciidoc --unsafe --conf-file=${srcdir}/layout.conf -a icons -o ${outfile} ${infile}'
|
||||
|
||||
|
||||
def _is_older(inp, outp):
|
||||
older = True
|
||||
if os.path.exists(outp):
|
||||
modin = os.stat(inp)[ST_MTIME]
|
||||
modout = os.stat(outp)[ST_MTIME]
|
||||
older = (modin > modout)
|
||||
return older
|
||||
|
||||
|
||||
def _rmtree_warn(fn, path, excinfo):
|
||||
print "** WARNING **: error while doing %s on %s" % (fn, path)
|
||||
|
||||
|
||||
def asciidoc(opts, srcdir, inp, outp):
|
||||
if _is_older(inp, outp) or opts.force:
|
||||
if opts.verbose:
|
||||
print "asciidoc %s -> %s" % (inp, outp)
|
||||
cmd = Template(ASCIIDOC).substitute(srcdir=srcdir, infile=inp, outfile=outp)
|
||||
if opts.verbose >= 3:
|
||||
print "asciidoc command is [%s]" % cmd
|
||||
if not opts.dryrun:
|
||||
os.system(cmd)
|
||||
else:
|
||||
if opts.verbose >= 2:
|
||||
print "up to date %s -> %s" % (inp, outp)
|
||||
|
||||
|
||||
def copy(opts, inp, outp):
|
||||
if os.path.isdir(inp):
|
||||
if os.path.exists(outp) and not os.path.isdir(outp):
|
||||
print "** ERROR **: cannot copy directory ('%s') to file ('%s')" % (inp, outp)
|
||||
sys.exit(1)
|
||||
if not os.path.exists(outp):
|
||||
if opts.verbose:
|
||||
print "creating %s" % (outp)
|
||||
if not opts.dryrun:
|
||||
os.mkdir(outp)
|
||||
for file in os.listdir(inp):
|
||||
copy(opts, os.path.join(inp, file), os.path.join(outp, file))
|
||||
else:
|
||||
if _is_older(inp, outp) or opts.force:
|
||||
if opts.verbose:
|
||||
print "copying %s -> %s" % (inp, outp)
|
||||
if not opts.dryrun:
|
||||
shutil.copy(inp, outp)
|
||||
else:
|
||||
if opts.verbose >= 2:
|
||||
print "up to date %s -> %s" % (inp, outp)
|
||||
|
||||
|
||||
def make(opts, indir, outdir):
|
||||
# make output dir if it does not exist
|
||||
if not os.path.exists(outdir):
|
||||
if opts.verbose:
|
||||
print "creating %s" % outdir
|
||||
if not opts.dryrun:
|
||||
os.mkdir(outdir)
|
||||
# process all files/dirs under input directory
|
||||
for elem in os.listdir(indir):
|
||||
inp = os.path.join(indir, elem)
|
||||
if elem.endswith('.txt'):
|
||||
outp = os.path.join(outdir, elem[:-4] + '.html')
|
||||
asciidoc(opts, indir, inp, outp)
|
||||
elif elem not in SKIP_FILES:
|
||||
outp = os.path.join(outdir, elem)
|
||||
copy(opts, inp, outp)
|
||||
|
||||
|
||||
def get_opts():
|
||||
usage = "usage: %prog [options] srcdir destdir"
|
||||
|
||||
p = OptionParser(usage=usage)
|
||||
p.add_option("-f", "--force", action="store_true", dest="force", default=False,
|
||||
help="ignore timestamps and force build of all files")
|
||||
p.add_option("-v", "--verbose", action="count", dest="verbose", default=0,
|
||||
help="be chatty (use more v's to be more friendly)")
|
||||
p.add_option("-c", "--clean-first", action="store_true", dest="clean", default=False,
|
||||
help="remove outdir and everything under it before building")
|
||||
p.add_option("-n", "--dry-run", action="store_true", dest="dryrun", default=False,
|
||||
help="just print what will happen rather than doing it")
|
||||
|
||||
(opts, args) = p.parse_args()
|
||||
if len(args) != 2:
|
||||
p.error("incorrect number of arguments")
|
||||
srcdir, destdir = args
|
||||
|
||||
if not os.path.exists(srcdir):
|
||||
p.error("srcdir (%s) does not exist" % srcdir)
|
||||
if not os.path.isdir(args[0]):
|
||||
p.error("srcdir (%s) is not a directory" % srcdir)
|
||||
if os.path.exists(destdir) and not os.path.isdir(destdir):
|
||||
p.error("destdir (%s) is not a directory" % destdir)
|
||||
|
||||
if opts.verbose == None:
|
||||
opts.verbose = 0
|
||||
|
||||
return (opts, srcdir, destdir)
|
||||
|
||||
|
||||
def main():
|
||||
opts, src, dest = get_opts()
|
||||
if opts.verbose >= 3:
|
||||
print ("running with options:\nsrc = [%s]\ndest = [%s]\nverbose = [%d]\n" +\
|
||||
"dry-run = [%d]\nclean-first = [%d]\nforce = [%d]") %\
|
||||
(src, dest, opts.verbose, opts.dryrun, opts.clean, opts.force)
|
||||
if opts.dryrun and opts.verbose == 0:
|
||||
opts.verbose = 1
|
||||
if opts.clean:
|
||||
if opts.dryrun or opts.verbose:
|
||||
print "removing tree %s" % dest
|
||||
if not opts.dryrun:
|
||||
os.rmtree(dest, True, _rmtree_warn)
|
||||
make(opts, src, dest)
|
||||
|
||||
|
||||
main()
|
||||
|
||||
15
www/src/about.txt
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
About
|
||||
=====
|
||||
|
||||
[NOTE]
|
||||
._llvm-py_ Mission Statement
|
||||
=======================================================================
|
||||
Provide a simple, consistent and well-documented suite of APIs
|
||||
that exposes just enough of LLVM to write a compiler/interpreter/VM
|
||||
in Python.
|
||||
=======================================================================
|
||||
|
||||
_llvm-py_ is developed by Mahadevan R, in his spare time, without being
|
||||
paid for it. He can be reached at _mdevan.foobar .at. gmail.com_, on the
|
||||
llvm-dev mailing list and irc.oftc.net#llvm (mdevan).
|
||||
|
||||
16
www/src/contribute.txt
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
Contribute
|
||||
==========
|
||||
|
||||
_llvm-py_ is just hatching. It needs your patches and suggestions to
|
||||
grow up. Please contribute! All patches are welcome.
|
||||
|
||||
The _llvm-py_ code is hosted on a google code project by the same name,
|
||||
http://code.google.com/p/llvm-py/[here]. It provides the SVN repository
|
||||
and a http://code.google.com/p/llvm-py/issues/list[bug tracker].
|
||||
|
||||
The latest code can be checked out from SVN like so:
|
||||
|
||||
----
|
||||
$ svn checkout http://llvm-py.googlecode.com/svn/trunk/ llvm-py
|
||||
----
|
||||
|
||||
82
www/src/download.txt
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
Download and Setup
|
||||
==================
|
||||
|
||||
The latest release is 0.2, released xx-Jun-2008 (full link:changelog[Changelog]
|
||||
below).
|
||||
|
||||
Download it here:
|
||||
|
||||
[frame="all",grid="all"]
|
||||
````~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Release,Date,Package,Mirror
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
0.2,xx-xxx-2008,http://link1/[llvm-py-0.2.tar.bz2],http://link1/[llvm-py-0.2.tar.bz2]
|
||||
0.1,xx-xxx-2008,http://link1/[llvm-py-0.1.tar.bz2],http://link1/[llvm-py-0.1.tar.bz2]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Bleeding Edge
|
||||
-------------
|
||||
|
||||
The latest code can be checked out from SVN thusly:
|
||||
|
||||
----
|
||||
$ svn checkout http://llvm-py.googlecode.com/svn/trunk/ llvm-py
|
||||
----
|
||||
|
||||
Happy hacking, and please send in your patches.
|
||||
|
||||
|
||||
Setting Up
|
||||
----------
|
||||
|
||||
Follow these steps to get _llvm-py_ up and running:
|
||||
|
||||
* Get and build LLVM.
|
||||
* Optionally, install it.
|
||||
* Get the latest release (see above) of _llvm-py_ and untar it:
|
||||
----
|
||||
$ wget http://link/llvm-py-0.2.tar.bz2
|
||||
$ tar jxvf llvm-py-0.2.tar.bz2
|
||||
----
|
||||
* If you've installed LLVM, setup _llvm-py_ like this:
|
||||
----
|
||||
$ cd llvm-py-0.2
|
||||
$ sudo python setup.py install
|
||||
----
|
||||
* If you haven't installed LLVM, locate the executable +llvm-config+
|
||||
under your LLVM build directory (should be something like
|
||||
+/home/mdevan/llvm/Release/bin/llvm-config+) and pass this to setup.py:
|
||||
----
|
||||
$ cd llvm-py-0.2
|
||||
$ sudo python setup.py install --llvm-config=/path/to/llvm-config
|
||||
----
|
||||
|
||||
That's it!
|
||||
|
||||
NOTE: _setup.py_ is a standard Python distutils script. See the Python
|
||||
documentation regarding http://docs.python.org/inst/inst.html[Installing
|
||||
Python Modules] and http://docs.python.org/dist/dist.html[Distributing
|
||||
Python Modules] for more information on such scripts.
|
||||
|
||||
Uninstall
|
||||
---------
|
||||
|
||||
To get rid of llvm-py completely, if you wish to do so:
|
||||
|
||||
----
|
||||
# rm -rf /usr/lib/python2.5/site-packages/llvm
|
||||
# rm -f /usr/lib/python2.5/site-packages/llvm_py-0.1.egg-info
|
||||
----
|
||||
|
||||
You'll need to be root to do this. Paths are for debian-based systems,
|
||||
in other distros it might be different.
|
||||
|
||||
|
||||
[[changelog]]
|
||||
Changelog
|
||||
----------
|
||||
|
||||
----
|
||||
include::changelog[]
|
||||
----
|
||||
67
www/src/examples.txt
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
Examples
|
||||
========
|
||||
|
||||
Here's an example:
|
||||
|
||||
[python]
|
||||
source~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#!/usr/bin/env python
|
||||
|
||||
from llvm.core import *
|
||||
|
||||
## create a module
|
||||
module = Module.new("my_module")
|
||||
|
||||
## create a function type taking two doubles and returning a (32-bit) integer
|
||||
ty_double = Type.double()
|
||||
ty_int = Type.int()
|
||||
ty_func = Type.function( ty_int, [ ty_double, ty_double ] )
|
||||
|
||||
## create a function of this type
|
||||
func = Function.new( module, ty_func, "foobar" )
|
||||
|
||||
# name function args
|
||||
func.args[0].name = "arg1"
|
||||
func.args[1].name = "arg2"
|
||||
|
||||
## implement the function
|
||||
|
||||
# add a basic block
|
||||
entry = func.append_basic_block("entry")
|
||||
|
||||
# create an llvm::IRBuilder
|
||||
builder = Builder.new()
|
||||
builder.position_at_end(entry)
|
||||
|
||||
# add two args into temp1
|
||||
temp1 = builder.add(func.args[0], func.args[1], "temp1")
|
||||
|
||||
# sub `1' from that
|
||||
one = Constant.real( ty_double, 1.0 )
|
||||
temp2 = builder.sub(temp1, one, "temp2")
|
||||
|
||||
# convert to integer
|
||||
temp3 = builder.fptoui(temp2, ty_int, "temp3")
|
||||
|
||||
# return it
|
||||
builder.ret(temp3)
|
||||
|
||||
# dump the module to see the bc
|
||||
module.dump()
|
||||
source~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
which gives this output:
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
; ModuleID = 'my_module'
|
||||
|
||||
define i32 @foobar(double %arg1, double %arg2) {
|
||||
entry:
|
||||
%temp1 = add double %arg1, %arg2 ; <double> [#uses=1]
|
||||
%temp2 = sub double %temp1, 1.000000e+00 ; <double> [#uses=1]
|
||||
%temp3 = fptoui double %temp2 to i32 ; <i32> [#uses=1]
|
||||
ret i32 %temp3
|
||||
}
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
|
||||
BIN
www/src/images/icons/callouts/1.png
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
www/src/images/icons/callouts/10.png
Normal file
|
After Width: | Height: | Size: 361 B |
BIN
www/src/images/icons/callouts/11.png
Normal file
|
After Width: | Height: | Size: 565 B |
BIN
www/src/images/icons/callouts/12.png
Normal file
|
After Width: | Height: | Size: 617 B |
BIN
www/src/images/icons/callouts/13.png
Normal file
|
After Width: | Height: | Size: 623 B |
BIN
www/src/images/icons/callouts/14.png
Normal file
|
After Width: | Height: | Size: 411 B |
BIN
www/src/images/icons/callouts/15.png
Normal file
|
After Width: | Height: | Size: 640 B |
BIN
www/src/images/icons/callouts/2.png
Normal file
|
After Width: | Height: | Size: 353 B |
BIN
www/src/images/icons/callouts/3.png
Normal file
|
After Width: | Height: | Size: 350 B |
BIN
www/src/images/icons/callouts/4.png
Normal file
|
After Width: | Height: | Size: 345 B |
BIN
www/src/images/icons/callouts/5.png
Normal file
|
After Width: | Height: | Size: 348 B |
BIN
www/src/images/icons/callouts/6.png
Normal file
|
After Width: | Height: | Size: 355 B |
BIN
www/src/images/icons/callouts/7.png
Normal file
|
After Width: | Height: | Size: 344 B |
BIN
www/src/images/icons/callouts/8.png
Normal file
|
After Width: | Height: | Size: 357 B |
BIN
www/src/images/icons/callouts/9.png
Normal file
|
After Width: | Height: | Size: 357 B |
BIN
www/src/images/icons/caution.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
www/src/images/icons/example.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
www/src/images/icons/home.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
www/src/images/icons/important.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
www/src/images/icons/next.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
www/src/images/icons/note.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
www/src/images/icons/prev.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
www/src/images/icons/tip.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
www/src/images/icons/up.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
www/src/images/icons/warning.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
27
www/src/index.txt
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
llvm-py: Python Bindings for LLVM
|
||||
===================================
|
||||
|
||||
_llvm-py_ provides http://www.python.org/[Python] bindings for
|
||||
http://llvm.org/[LLVM]. It currently provides APIs to build the in-memory IR
|
||||
(intermediate representation) and to dump it. Execution engine and related APIs
|
||||
should appear soon.
|
||||
|
||||
_llvm-py_ is a set of Python-based and C-based Python modules. It makes use of
|
||||
llvm-c, the C binding for LLVM. It is based on the latest SVN version of LLVM
|
||||
(and will not work on 2.2). It has been tested only with Python 2.5, although
|
||||
it should be usable with 2.4 also. I've built and tested it only on Linux/i386
|
||||
machines.
|
||||
|
||||
Download links, setup help and changelog are on the
|
||||
link:download.html[download] page.
|
||||
|
||||
News
|
||||
----
|
||||
|
||||
xx-Jun-2008::
|
||||
0.2 released. Head to the link:downlad.html[download] page!
|
||||
|
||||
xx-May-2008::
|
||||
0.1 released.
|
||||
|
||||
// vim: set syntax=asciidoc:
|
||||
82
www/src/layout.conf
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
#
|
||||
# AsciiDoc website.
|
||||
# Three division table based layout (layout1).
|
||||
#
|
||||
# +-----------------------------------------------------+
|
||||
# | #layout-banner |
|
||||
# +--------------+--------------------------------------+
|
||||
# | | |
|
||||
# | | |
|
||||
# | #layout-menu | #layout-content |
|
||||
# | | |
|
||||
# | | |
|
||||
# | | |
|
||||
# +--------------+--------------------------------------+
|
||||
#
|
||||
# - The #layout-menu and #layout-content divisions are contained in a
|
||||
# two cell table.
|
||||
# I would be nice to use pure CSS for the layout but the table is better for
|
||||
# this layout because:
|
||||
#
|
||||
# * The column widths automatically size to fit column width (specifically
|
||||
# the #layout-menu)
|
||||
# * The column heights automatically size to the tallest.
|
||||
#
|
||||
# - The #layout-content division is a container for AsciiDoc page documents.
|
||||
# - Documents rendered in the #layout-content use the standard AsciiDoc
|
||||
# xhtml11 backend stylesheets.
|
||||
|
||||
[specialwords]
|
||||
emphasizedwords=(?u)\\?\bAsciiDoc\b
|
||||
monospacedwords=(?u)\\?\basciidoc\(1\) (?u)\\?\ba2x\(1\)
|
||||
|
||||
[header]
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset={encoding}" />
|
||||
<meta name="generator" content="AsciiDoc {asciidoc-version}" />
|
||||
<meta name="description" content="Text based document generation" />
|
||||
<meta name="keywords" content="text to HTML, text to DocBook, text to XML, AsciiDoc" />
|
||||
<link rel="stylesheet" href="style/{theme={backend}}.css" type="text/css" />
|
||||
<link rel="stylesheet" href="style/{theme={backend}}-quirks.css" type="text/css" />
|
||||
<link rel="stylesheet" href="style/layout.css" type="text/css" />
|
||||
<title>{doctitle} - llvm-py</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="layout-banner">
|
||||
<div id="layout-title">llvm-py</div>
|
||||
<div id="layout-description">Python Bindings for LLVM</div>
|
||||
</div>
|
||||
<table>
|
||||
<tr valign="top">
|
||||
<td id="layout-menu">
|
||||
<div>»<a href="index.html">Home</a></div>
|
||||
<div>»<a href="examples.html">Examples</a></div>
|
||||
<div>»<a href="download.html">Download</a></div>
|
||||
<div>»<a href="userguide.html">User Guide</a></div>
|
||||
<div>»<a href="contribute.html">Contribute</a></div>
|
||||
<div>»<a href="license.html">License</a></div>
|
||||
<div>»<a href="about.html">About</a></div>
|
||||
<div id="page-source">»<a href="http://www.python.org/">Python</a></div>
|
||||
<div>»<a href="http://llvm.org/">LLVM</a></div>
|
||||
</td>
|
||||
<td>
|
||||
<div id="layout-content">
|
||||
<div id="header">
|
||||
<h1>{doctitle}</h1>
|
||||
</div>
|
||||
|
||||
[footer]
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Web pages © Mahadevan R. Generated with <a href="http://www.methods.co.nz/asciidoc/">asciidoc</a>.
|
||||
Last updated {localdate}.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
40
www/src/license.txt
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
License
|
||||
=======
|
||||
|
||||
_llvm-py_ is distributed under the
|
||||
http://www.opensource.org/licenses/bsd-license.php[new BSD license].
|
||||
This is similar to LLVM's license. You should be able to use _llvm-py_
|
||||
where-ever and how-ever you're able to use LLVM itself.
|
||||
|
||||
The license text is present in the
|
||||
http://code.google.com/p/llvm-py/source/browse/trunk/LICENSE[LICENSE]
|
||||
file in the distribution, and is reproduced here:
|
||||
|
||||
----
|
||||
Copyright (c) 2008, Mahadevan R All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the Mahadevan R, llvm-py nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
----
|
||||
71
www/src/style/layout.css
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
|
||||
body {
|
||||
background-color: white;
|
||||
margin: 1%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
#layout-banner {
|
||||
background-color: #73a0c5;
|
||||
color: white;
|
||||
font-family: sans-serif;
|
||||
text-align: left;
|
||||
padding: 0.8em 20px;
|
||||
}
|
||||
|
||||
#layout-title {
|
||||
font-family: monospace;
|
||||
font-size: 3.5em;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.2em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#layout-description {
|
||||
font-size: 1.2em;
|
||||
letter-spacing: 0.1em;
|
||||
}
|
||||
|
||||
#layout-menu {
|
||||
background-color: #f4f4f4;
|
||||
border-right: 3px solid #eeeeee;
|
||||
padding-top: 0.8em;
|
||||
padding-left: 20px;
|
||||
padding-right: 0.8em;
|
||||
font-size: 1.1em;
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
#layout-menu a {
|
||||
line-height: 2em;
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
#layout-menu a:link, #layout-menu a:visited, #layout-menu a:hover {
|
||||
color: #527bbd;
|
||||
text-decoration: none;
|
||||
}
|
||||
#layout-menu a:hover {
|
||||
color: navy;
|
||||
text-decoration: none;
|
||||
}
|
||||
#layout-menu #page-source {
|
||||
border-top: 2px solid silver;
|
||||
margin-top: 0.2em;
|
||||
}
|
||||
|
||||
#layout-content {
|
||||
margin-left: 1.0em;
|
||||
}
|
||||
|
||||
.para {
|
||||
line-height: 1.5em;
|
||||
margin-top: 1.2em;
|
||||
}
|
||||
|
||||
@media print {
|
||||
#layout-banner { display: none; }
|
||||
#layout-menu { display: none; }
|
||||
}
|
||||
18
www/src/style/xhtml11-manpage.css
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/* Overrides for manpage documents */
|
||||
h1 {
|
||||
padding-top: 0.5em;
|
||||
padding-bottom: 0.5em;
|
||||
border-top: 2px solid silver;
|
||||
border-bottom: 2px solid silver;
|
||||
}
|
||||
h2 {
|
||||
border-style: none;
|
||||
}
|
||||
div.sectionbody {
|
||||
margin-left: 5%;
|
||||
}
|
||||
|
||||
@media print {
|
||||
div#toc { display: none; }
|
||||
}
|
||||
|
||||
40
www/src/style/xhtml11-quirks.css
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
/* Workarounds for IE6's broken and incomplete CSS2. */
|
||||
|
||||
div.sidebar-content {
|
||||
background: #ffffee;
|
||||
border: 1px solid silver;
|
||||
padding: 0.5em;
|
||||
}
|
||||
div.sidebar-title, div.image-title {
|
||||
color: #527bbd;
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
margin-top: 0.0em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
div.listingblock div.content {
|
||||
border: 1px solid silver;
|
||||
background: #f4f4f4;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.quoteblock-content {
|
||||
padding-left: 2.0em;
|
||||
}
|
||||
|
||||
div.exampleblock-content {
|
||||
border-left: 2px solid silver;
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
|
||||
/* IE6 sets dynamically generated links as visited. */
|
||||
div#toc a:visited { color: blue; }
|
||||
|
||||
/* Because IE6 child selector is broken. */
|
||||
div.olist2 ol {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
div.olist2 div.olist ol {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
276
www/src/style/xhtml11.css
Normal file
|
|
@ -0,0 +1,276 @@
|
|||
/* Debug borders */
|
||||
p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
|
||||
/*
|
||||
border: 1px solid red;
|
||||
*/
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 1em 5% 1em 5%;
|
||||
}
|
||||
|
||||
a {
|
||||
color: blue;
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:visited {
|
||||
color: fuchsia;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
color: navy;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: bold;
|
||||
color: #083194;
|
||||
}
|
||||
|
||||
tt {
|
||||
color: navy;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color: #527bbd;
|
||||
font-family: sans-serif;
|
||||
margin-top: 1.2em;
|
||||
margin-bottom: 0.5em;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
border-bottom: 2px solid silver;
|
||||
}
|
||||
h2 {
|
||||
padding-top: 0.5em;
|
||||
}
|
||||
h3 {
|
||||
float: left;
|
||||
}
|
||||
h3 + * {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
div.sectionbody {
|
||||
font-family: serif;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: 1px solid silver;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
ul, ol, li > p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
span#author {
|
||||
color: #527bbd;
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
span#email {
|
||||
}
|
||||
span#revision {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
div#footer {
|
||||
font-family: sans-serif;
|
||||
font-size: small;
|
||||
border-top: 2px solid silver;
|
||||
padding-top: 0.5em;
|
||||
margin-top: 4.0em;
|
||||
}
|
||||
div#footer-text {
|
||||
float: left;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
div#footer-badges {
|
||||
float: right;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
|
||||
div#preamble,
|
||||
div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
|
||||
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
|
||||
div.admonitionblock {
|
||||
margin-right: 10%;
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
div.admonitionblock {
|
||||
margin-top: 2.5em;
|
||||
margin-bottom: 2.5em;
|
||||
}
|
||||
|
||||
div.content { /* Block element content. */
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Block element titles. */
|
||||
div.title, caption.title {
|
||||
color: #527bbd;
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
div.title + * {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
td div.title:first-child {
|
||||
margin-top: 0.0em;
|
||||
}
|
||||
div.content div.title:first-child {
|
||||
margin-top: 0.0em;
|
||||
}
|
||||
div.content + div.title {
|
||||
margin-top: 0.0em;
|
||||
}
|
||||
|
||||
div.sidebarblock > div.content {
|
||||
background: #ffffee;
|
||||
border: 1px solid silver;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.listingblock {
|
||||
margin-right: 0%;
|
||||
}
|
||||
div.listingblock > div.content {
|
||||
border: 1px solid silver;
|
||||
background: #f4f4f4;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.quoteblock > div.content {
|
||||
padding-left: 2.0em;
|
||||
}
|
||||
|
||||
div.attribution {
|
||||
text-align: right;
|
||||
}
|
||||
div.verseblock + div.attribution {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.admonitionblock .icon {
|
||||
vertical-align: top;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
color: #527bbd;
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
div.admonitionblock td.content {
|
||||
padding-left: 0.5em;
|
||||
border-left: 2px solid silver;
|
||||
}
|
||||
|
||||
div.exampleblock > div.content {
|
||||
border-left: 2px solid silver;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.verseblock div.content {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
div.imageblock div.content { padding-left: 0; }
|
||||
div.imageblock img { border: 1px solid silver; }
|
||||
span.image img { border-style: none; }
|
||||
|
||||
dl {
|
||||
margin-top: 0.8em;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
dt {
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0;
|
||||
font-style: normal;
|
||||
}
|
||||
dd > *:first-child {
|
||||
margin-top: 0.1em;
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
list-style-position: outside;
|
||||
}
|
||||
div.olist > ol {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
div.olist2 > ol {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
|
||||
div.tableblock > table {
|
||||
border: 3px solid #527bbd;
|
||||
}
|
||||
thead {
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
tfoot {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.hlist {
|
||||
margin-top: 0.8em;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
div.hlist td {
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
td.hlist1 {
|
||||
vertical-align: top;
|
||||
font-style: normal;
|
||||
padding-right: 0.8em;
|
||||
}
|
||||
td.hlist2 {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
@media print {
|
||||
div#footer-badges { display: none; }
|
||||
}
|
||||
|
||||
div#toctitle {
|
||||
color: #527bbd;
|
||||
font-family: sans-serif;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 0.1em;
|
||||
}
|
||||
|
||||
div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
div.toclevel2 {
|
||||
margin-left: 2em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
div.toclevel3 {
|
||||
margin-left: 4em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
div.toclevel4 {
|
||||
margin-left: 6em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
22
www/src/userguide.txt
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
AsciiDoc User Guide
|
||||
===================
|
||||
Stuart Rackham <srackham@methods.co.nz>
|
||||
:Author Initials: SJR
|
||||
|
||||
AsciiDoc is a text document format for writing short documents,
|
||||
articles, books and UNIX man pages. AsciiDoc files can be translated
|
||||
to HTML and DocBook markups using the asciidoc(1) command. AsciiDoc
|
||||
is highly configurable: both the AsciiDoc source file syntax and the
|
||||
backend output markups (which can be almost any type of SGML/XML
|
||||
markup) can be customized and extended by the user.
|
||||
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
TIP: Sometimes incorrect highlighting is caused by preceding lines
|
||||
that appear blank but contain white space characters -- setting your
|
||||
editor options so that white space characters are visible is a good
|
||||
idea.
|
||||
|
||||
// vim: set syntax=asciidoc:
|
||||