After five months there is finally a new release of `rest2web <http://www.voidspace.org.uk/python/rest2web/>`_. This is **0.5.0 Beta 1**.
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 <http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?file=rest2web-0.5.0beta1.zip>`_ * `rest2web 0.5.0Beta1 tar.gz <http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?file=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 <http://www.voidspace.org.uk/python/rest2web/reference/indextree.html>`_), 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 <http://www.voidspace.org.uk/python/rest2web/command_line.html>`_ available, including setting verbosity levels (make rest2web quieter !) * New `Standard Functions <http://www.voidspace.org.uk/python/rest2web/functions.html>`_, 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 of packaging. 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, or even wrap the body.) ``make_dist.py`` now takes ``nopause`` as a command line argument (``make_dist.py`` is in `Subversion`_ for creating distributions.) Default breadcrumb divider is now '>'. Breadcrumbs are also output in HTML 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 new values are : 'source_file': The source file for the page 'current_dir': The current directory being processed - this can be turned into an absolute filepath by doing ``os.path.join(os.getcwd(), current_dir)`` 'target_dir': The target file directory (as an absolute file path) being rendered into. Note if the file has a target specified it may not be put in this directory. Use ``os.path.dirname(target_file)`` instead. 'full_page_url': The full url (starting with '/') for the current page 'target_file': The full filename of the page being rendered Fixed bug where 'thispage' wasn't set on pages in the indextree. (Value should be ``True`` for the current page.) Fixed bug where 'thispage' (in the namespace) would sometimes be incorrectly ``None``. 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 no 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 <../command_line.html>`_ and in the config file. (Command line `uservalues <uservalues.html>`_ override config file ones.) These uservalues are now available in every page. The encoding of uservalues in the config file is specified by the ``__encoding__`` value. 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 and another for distributed documentation. New website template, created by `Fuchsiashock Design <http://www.fuchsiashock.co.uk>`_. ``final_encoding`` should never be ``utf8`` - should be ``utf-8`` instead. This is because ``utf8`` is not recognised by browsers. (This is now automatically handled.) Added ``initialheaderlevel`` a new restindex keyword. It sets the size of 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 command 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 dictionaries) 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 the 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 <http://svn.rest2web.python-hosting.com>`_). -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations.html