Author: earle Date: 2005-10-12 02:19:57 +0100 (Wed, 12 Oct 2005) New Revision: 687
Modified: trunk/Changes trunk/lib/OpenGuides.pm trunk/wiki.cgi Log: new format=raw output option
Modified: trunk/Changes =================================================================== --- trunk/Changes 2005-10-11 13:39:10 UTC (rev 686) +++ trunk/Changes 2005-10-12 01:19:57 UTC (rev 687) @@ -1,4 +1,5 @@ 0.51 + New "format=raw" option for outputting wiki text of a node. New "summary" metadata field for one-line summaries of nodes. Add "summary" field to RDF as dc:description. Show node summary in search results.
Modified: trunk/lib/OpenGuides.pm =================================================================== --- trunk/lib/OpenGuides.pm 2005-10-11 13:39:10 UTC (rev 686) +++ trunk/lib/OpenGuides.pm 2005-10-12 01:19:57 UTC (rev 687) @@ -170,6 +170,12 @@ my $modified = $node_data{last_modified}; my %metadata = %{$node_data{metadata}};
+ if ($args{format} && $args{format} eq 'raw') { + print "Content-Type: text/plain\n\n"; + print $raw; + exit 0; + } + my %metadata_vars = OpenGuides::Template->extract_metadata_vars( wiki => $wiki, config => $config,
Modified: trunk/wiki.cgi =================================================================== --- trunk/wiki.cgi 2005-10-11 13:39:10 UTC (rev 686) +++ trunk/wiki.cgi 2005-10-12 01:19:57 UTC (rev 687) @@ -112,6 +112,11 @@ } else { # Default is to display a node. if ( $format and $format eq "rdf" ) { display_node_rdf( node => $node ); + } elsif ( $format and $format eq 'raw' ) { + $guide->display_node( + id => $node, + format => 'raw', + ); } else { my $version = $q->param("version"); my $other_ver = $q->param("diffversion");
openguides-commits@lists.openguides.org