[ANN] rest2web 0.5.0 Beta 1 Released

Fuzzyman fuzzyman at gmail.com
Sun Aug 6 22:22:21 CEST 2006

After five months there is finally a new release of `rest2web
<http://www.voidspace.org.uk/python/rest2web/>`_. This is **0.5.0 Beta

There are an awful lot of changes and improvements, but there shouldn't
be any backward compatability issues with previous versions.

* `rest2web 0.5.0Beta1 zip
* `rest2web 0.5.0Beta1 tar.gz

One of the best changes, is the addition of a new `Quickstart Guide
<http://www.voidspace.org.uk/python/rest2web/quickstart.html>`_ by
*Andrew Ittner*.

What is rest2web ?

**rest2web** is a tool that generates html files for websites, parts of
websites, or project documentation. It allows you to keep your page
content in `ReST <http://docutils.sourceforge.net>`_ format, and has a
simple but flexible templating system.

It can automatically build index pages, 'breadcrumbs' and sidebars for
your site. By providing access to a data-structures that represents
your site (for example `indextree and thispage
you can easily build in extra functionality.

What's New in 0.5.0 ?

The full changelog is below. As you can see a *lot* has changed. I will
try to summarise the most important changes first :

* Addition of 'Quickstart Guide'
* rest2web can now build a site from just a directory of ReST
documents; no need tosupply *restindexes* or index pages if you don't
want to {sm;:-)}
* Global uservalues (effectively variables available in every page) can
be set in the `Config File
<http://www.voidspace.org.uk/python/rest2web/config_file.html>`_ or at
the command line
* Lots of new `command line options
available, including setting verbosity levels (make rest2web quieter !)
* New `Standard Functions
especially 'include' for better customisation of templates (e.g. for
defining a different footer for some directories)
* More information available in the namespace and indextree (source
filename, target filename, full url etc)

Plus a host of bugfixes and minor improvements.

Version 0.5.0 Beta 1 2006/08/06

Updated docs.

Moved 'pythonutils' distribution into the 'rest2web' directory for ease

Added a ``#!`` line to ``r2w.py``.

All rest2web imports now absolute imports.

Added 'quickstart.txt' thanks to Andrew Ittner.

Added an ``include`` standard function, this can be used to nest
templates or
customise sections. (It will walk up the directory tree looking for the

file you specify and takes an optional argument if the file doesn't
exist -
useful for templates that allow subdirectories to add to the template,
even wrap the body.)

``make_dist.py`` now takes ``nopause`` as a command line argument
is in `Subversion`_ for creating distributions.)

Default breadcrumb divider is now '&gt;'. Breadcrumbs are also output
on separate lines for readability.

Fixed bug when ``final_encoding`` is ``None``.

Default config file is now called ``r2w.ini``. ``rest2web.ini`` will
still be
supported until the next release.

Fixed bug with ``standerr`` where no logfile is used.

``print_crumbs`` can now take ``None`` for the dividers.

Added 'globalValues' to the namespace. (Available in templates and
pages for
storing values which can be accessed across all pages.)

Added 'uservalues' and 'restindex' into each page in the indextree.

A new command line 'nopause' option to override the config file.

Change so that variables (and functions etc) defined in templates can
be used
in single code blocks (like ``<% new_name %>``).

Added more information about pages to the namespace and indextree. The
values are :

    'source_file': The source file for the page

    'current_dir': The current directory being processed - this can be
                   into an absolute filepath by doing
``os.path.join(os.getcwd(), current_dir)``

    'target_dir': The target file directory (as an absolute file path)
                  rendered into. Note if the file has a target
specified it may
                  not be put in this directory. Use

    'full_page_url': The full url (starting with '/') for the current

    'target_file': The full filename of the page being rendered

Fixed bug where 'thispage' wasn't set on pages in the indextree. (Value
be ``True`` for the current page.)

Fixed bug where 'thispage' (in the namespace) would sometimes be

Cached template files for faster execution.

Special thanks to Martin Krafft for bugfixes and suggestions.

Version 0.5.0 alpha 2006/05/01

**rest2web** can now build a site with no index pages, no template and
restindexes. This is the `force <../force_mode.html>`_ command line
option. It can
be used to automatically build a site from a collection of ReST
documents, and
use default templates.

``uservalues`` can be passed at the `command line
and in the config file. (Command line `uservalues <uservalues.html>`_
config file ones.) These uservalues are now available in every page.
encoding of uservalues in the config file is specified by the

A ``--template-file`` (or ``-t``) command line option. (Will override
the top
level ``template`` keyword specified in the restindex.) This allows you
to have
alternative templates for a site; for example one for an online version
another for distributed documentation.

New website template, created by `Fuchsiashock Design

``final_encoding`` should never be ``utf8`` - should be ``utf-8``
instead. This
is because ``utf8`` is not recognised by browsers. (This is now

Added ``initialheaderlevel`` a new restindex keyword. It sets the size
headers used in ReST documents. Can be set per page.

The ``file`` keyword has been bugfixed. It now only operates if the
target file
doesn't exist or is different to the source file. It copies the
timestamp along
with the file.

The `gallery plugin <gallery.html>`_ now ignores non-image files. It
also skips
image files it can't handle (currently only animated jpgs.

**rest2web** now has three levels of verbosity, controlled from the
line :

    * ``-v`` : Verbose, the default.
    * ``-a`` : Warnings and actions.
    * ``-w`` : Warnings only.

``uservalues`` can now be inserted in pages using a new syntax. Where
this is
used, the uservalues are inserted *before* the page is rendered from
ReST to
HTML. This means uservalues can be in ReST format. The syntax for
single values
is ``<* ... *>``. For multiple lines of code it is ``<$ ... $>``.

Added ``modtimeiso`` value to the namespace and the ``formattime``
`standard function <../functions.html>`_.

The ``namespace`` and ``uservalues`` are both now available (as
to the macros and the standard functions.

Removed the two ``<br />`` from ``listend`` in the standard function
``minibar`` and added ``wrapper_class`` to ``print_details``.

Added ``os`` and ``sys`` to the namespace for every page.

The default crumb for index pages (if no ``page-title`` specified) is
filename, minus the extension and turned to title case.

Removed ``urlpath`` from rest2web, because it is now in pythonutils.

It won't run in the distribution directory - need to run
"make_dist.py". (This
only applies if fetched from `subversion

More information about the Python-announce-list mailing list