triptico.com

Angel Ortega's Site
Ángel Ortega is a programmer, writer, composer and illustrator based in El Casar (Guadalajara, Spain). Author of the award-winning Minimum Profit text editor for programmers, main musician of the Ann Hell band and many other things.

Gruta Release Notes

2.3.0 "Lucca"

  • Stories can now include comments from visitors. Comments are disabled by default (it can be enabled by setting cfg_disable_comments in the config template to 0) and can also be enabled or disabled on a per story basis. Comments are never automatically published: they require approval one by one, unless it's posted by an identified user that also has section editor capabilities.
  • Support for the new 5.x version of Artemus has been added. This version is now the recommended one and upgrading of existing installations to it is encouraged, as new features are only implemented on 5.x (as, for example, the new "comments from visitors" feature).
  • If a story pseudo-url points to a non-existent story, it shows a link to create it (ala Wikis).
  • Date formatting is done using strftime(), so its full set of percent-prefixed commands is available.
  • A new field in stories allow a Table of Contents to be created for each story.
  • A new template status has been added to set the HTTP status.
  • A security bug that allowed to bypass a story's publication date by using the STORY_PRINTABLE template has been fixed.
  • Improved cookie parsing.
  • The gruta_mksite helper scripts has been renamed to gruta-mksite and it's also installed in /usr/local/bin.
  • Many new commands to the gruta command line tool.
  • All image pseudo-urls include the image's width and height in the img tag if the Image::Size Perl module is detected and installed.
  • A timeout watchdog now exists to avoid the CGI hanging for too much with a default of 20 seconds. It can be changed in the creation of the Gruta::CGI object by setting the query_timeout argument.

2.2.1 "Montecatini"

  • Templates are now stored inside source backends instead of having a special directory of plain files. So, it's no longer necessary to prepend the writable directory to the template path in Gruta::Template::Artemus creation.
  • The TT template toolkit has been officially deprecated.
  • New global CGI variable set_date, to force a date to be assumed as today, to be used to take a look at how would a page be shown in the given date. Only usable by a logged-in admin user.
  • A new script gruta_mksite, to help in the creation of a new site.
  • A new command, set_story_date, has been added to bin/gruta.
  • The full set of mod_rewrite keywords to be used if static_urls is set has been expanded.

 RewriteRule ^/([0-9]+)\.html$		/?t=INDEX&offset=$1		[PT,L]
 RewriteRule ^/([0-9]+)-([0-9]+)\.html$	/?t=SEARCH_BY_DATE&from=$1&to=$2 [PT,L]
 RewriteRule ^/tag/(.+)\.html$		/?t=SEARCH_BY_TAG&tag=$1	[PT,L]
 RewriteRule ^/tag/$			/?t=TAGS			[PT,L]
 RewriteRule ^/top/$			/?t=TOP_TEN			[PT,L]
 RewriteRule ^/(.+)/$			/?t=TOPIC&topic=$1		[PT,L]
 RewriteRule ^/(.+)/index\.html$		/?t=TOPIC&topic=$1		[PT,L]
 RewriteRule ^/(.+)/([0-9]+)\.html$	/?t=TOPIC&topic=$1&offset=$2	[PT,L]
 RewriteRule ^/(.+)/(.+)\.html$		/?t=STORY&topic=$1&id=$2	[PT,L]
 RewriteRule ^/rss\.xml$			/?t=RSS				[PT,L]
 RewriteRule ^/sitemap\.xml$		/?t=SITEMAP			[PT,L]
 RewriteRule ^/style\.css$		/?t=CSS				[PT,L]

2.2.0 "Osmannoro"

Please note that version 4.1.2 of the Artemus template toolkit is required for this release to work properly.

  • Story rendering is cached, resulting in faster page loading.
  • An existing story can be copied to another topic from the story edition form.
  • The template stories_by_date has changed the order of their output values; now they are topic_id, id and date.
  • The RSS template now accepts an optional CGI argument tag, to get feeds on stories by tag.
  • Multiple sources are no longer supported; it never really worked well, made the code cumbersome and had no real advantage after all. The cgi caller needs not to be changed, as the sources argument is still supported (only the first one is used, though), but the scalar source is preferred now.
  • The file format in the FS source has changed; the .META extension has been changed to .M, and .TAGS to .T. Also, new files appear in the stories directory with the .A and .B extensions, holding the rendered abstract and story body, respectively. The transition is made automatically on the first run, no manual operation is needed.
  • New argument hard_top_ten_limit to Gruta::Source::FS, to set the maximum number of stories to be tested when generating the top read stories index (previously hardcoded to 100).
  • New argument min_size_for_gzip to Gruta::CGI, to set the minimum size for the output body to be Gzip compressed (previously hardcoded to 10000).
  • If a story pointed by a story:// pseudo-url has a publication date in the future, only the title is shown (i.e., it's not clickable).
  • The Mbox source is officially deprecated.
  • Static URLs are also generated for the CSS, RSS and SITEMAP pages. The following mod_rewrite rule must be added to the ones suggested in the previous version:

 RewriteRule ^/style\.css$     /?t=CSS              [PT]

2.1.1 "Calenzano"

  • Fixed a last time bug in the DBI schema generation.

2.1.0

  • On-the-fly Gzip compression (if browser accepts it).
  • New special uris; abstract, to paste a story's abstract, and body, to paste the full body of another one.
  • A new renderer, Text, for plain text content.
  • New Artemus variables to set HTML metadata; html_title, html_description and html_keywords.
  • A new supertemplate called CSS, that returns the Cascading Style Sheet instead of having it embedded in all output.
  • A new supertemplate called SITEMAP (to be aliased to /sitemap.xml).
  • If a story called index is present in a topic, the 'TOPIC' template shows its body instead of the list of stories in it.
  • Several new commands in the gruta command line tool; new_story (to create a new story from STDIN), import_rss (to import an RSS file into a topic), update_story (to update a story from STDIN).
  • Topics and stories now have a new field, description, that is used in the HTML description meta tag in TOPIC or STORY.
  • Internal server errors set the HTTP status to 500.
  • Some old function templates have been deleted and moved to Artemus.
  • Many templates have been simplified with new Artemus keywords.
  • The DBI driver is less verbose on errors.
  • Those templates more prone to be changed when configuring a new site have been renamed to have a prefix of 'cfg_'.
  • Added POD documentation to some templates.
  • Date formatting functions now accept %w to print the week day as a number.
  • New global argument dummy_touch to avoid updating the hits count of each story.
  • Several fixes to the Mbox driver.
  • Don't generate empty 'about' and 'legal' links in 'meta_menu' if they don't exist.
  • Confirmation is requested when deleting a story.
  • New global argument static_urls, that forces some urls (mainly links to topics and stories) to use a simplified, static-like look. You need to have the following Apache's mod_rewrite keywords for these urls to be re-converted to usable ones:

 RewriteEngine On
 RewriteRule /(img|download)/.* - [L]
 RewriteRule ^/(.+)/index\.html$ /?t=TOPIC&topic=$1       [PT]
 RewriteRule ^/(.+)/(.+)\.html$  /?t=STORY&topic=$1&id=$2 [PT]
 RewriteRule ^/(.+)/$            /?t=TOPIC&topic=$1       [PT]
 RewriteRule ^/rss\.xml$         /?t=RSS                  [PT]
 RewriteRule ^/sitemap\.xml$     /?t=SITEMAP              [PT]

Related

Add a comment

Author:

Comment: