# HG changeset patch # User Dominic Cleal # Date 1229903608 0 # Node ID 6f1aaf5309c7068c3dea8e73efe11feb3368bf79 # Parent 05ef582dfa3b355ded8081c5ec365a295af2c629# Parent 4985d2fda1ddbbaafe3b15cca69a221d4d418b35 Merging in latest release diff -r 05ef582dfa3b -r 6f1aaf5309c7 .hgignore --- a/.hgignore Tue Oct 28 00:44:56 2008 +0000 +++ b/.hgignore Sun Dec 21 23:53:28 2008 +0000 @@ -9,4 +9,5 @@ ./debian/*.substvars ./debian/files ./debian/chronicle/* -./debian/chronicle.debhelper.log \ No newline at end of file +./debian/chronicle.debhelper.log +./.version diff -r 05ef582dfa3b -r 6f1aaf5309c7 .hgsigs --- a/.hgsigs Tue Oct 28 00:44:56 2008 +0000 +++ b/.hgsigs Sun Dec 21 23:53:28 2008 +0000 @@ -11,3 +11,6 @@ f2d74e0a495e35b84fdab9b0de4d572c37ffd67c 0 iEYEABECAAYFAki8RMMACgkQwM/Gs81MDZ0lUwCgv6yoXneuXhUVMM+OdpsI50GXIm0AoNyYt7PboZgR2NFW061EU/IaXGMQ 3475517f0d0e6d7c482f80f7da4f5e2d4fbbc337 0 iEYEABECAAYFAki8RMwACgkQwM/Gs81MDZ1m/gCgktXNwGDIp8cCaU/WGEY0inbpJ0gAniqaXyrN0s8HwPtTyb0u5+qgwN/r c9758e7a2a4b640f20432450e75b9b0227ed62ec 0 iEYEABECAAYFAkjuVQ4ACgkQwM/Gs81MDZ0eoACglWwPJg5D2EMMXmK3rZG/4U9lPMMAoKsH2VDsk+EJnxe+qO1OePScotHK +a86f5aad996646c0d3f9915c266c0dc97cd33a28 0 iEYEABECAAYFAkk6+goACgkQwM/Gs81MDZ3R8ACfcCvg8igl+CzrLyriREfMjJTqmRUAoJ8sp/rlvvhtG4c1wp9QhQr5GlXK +65ba5f7aaa5083b54c59157a3578f7315533a8d7 0 iEYEABECAAYFAkk+wFcACgkQwM/Gs81MDZ07uwCeNuyKsqenC/MJZeIVQmybjJoWm0MAnA5/wwvniGN5CVNaVzCY05EFwFlD +b593b701d0574f0327def561e88df325e8bfd442 0 iEYEABECAAYFAklAKBcACgkQwM/Gs81MDZ3CIACeMQ6cOItrcc4ge+uXs9yEG9YgvGcAoJxgbsiUuRxwoo8wUJUI6GusVB7h diff -r 05ef582dfa3b -r 6f1aaf5309c7 .hgtags --- a/.hgtags Tue Oct 28 00:44:56 2008 +0000 +++ b/.hgtags Sun Dec 21 23:53:28 2008 +0000 @@ -10,3 +10,5 @@ 7b0e9663a4748a3da0b26a1130b37e45e623a8b7 release-3.0 a73c11c99d635a6d5c7d459479342b13d99fc1ac release-3.1 c60b7c5184cd72f5bca1b0214b77af5837865e01 release-3.2 +cc70a7663938ecc7722f635aa8846ef801ead171 release-3.3 +eba6872a5309d922647cb69d5150751c1bc88426 release-3.4 diff -r 05ef582dfa3b -r 6f1aaf5309c7 .release --- a/.release Tue Oct 28 00:44:56 2008 +0000 +++ b/.release Sun Dec 21 23:53:28 2008 +0000 @@ -5,7 +5,7 @@ # http://release.repository.steve.org.uk/ # # Steve -# -- +# -- # @@ -30,6 +30,11 @@ # +# Version number +# +version=.version + +# # Upload location. # upload=steve@www.steve.org.uk:/home/www/www.steve.org.uk/htdocs/Software/chronicle diff -r 05ef582dfa3b -r 6f1aaf5309c7 AUTHORS --- a/AUTHORS Tue Oct 28 00:44:56 2008 +0000 +++ b/AUTHORS Sun Dec 21 23:53:28 2008 +0000 @@ -30,4 +30,7 @@ - Provided fixup for the default comment handling of the default theme. Bob Walker [bob [@] uk.org.randomness] - - Added titles to RSS feeds \ No newline at end of file + - Added titles to RSS feeds + + Nicolau Werneck [nwerneck [@] com.gmail] + - Added UTF-8 support for textile formatted input files. \ No newline at end of file diff -r 05ef582dfa3b -r 6f1aaf5309c7 COMMENTS --- a/COMMENTS Tue Oct 28 00:44:56 2008 +0000 +++ b/COMMENTS Sun Dec 21 23:53:28 2008 +0000 @@ -1,8 +1,9 @@ - Chronicle, since version 2.0, supports the submission of comments - upon published posts. This document describes how you would go - about enabling this support. + Chronicle supports the submission of comments upon published posts, + via an optional CGI script. + + This document describes how you would go about enabling this support. @@ -15,11 +16,13 @@ There are two ways this software is typically used: Single Machine + -------------- The blog input is stored upon your web-server and you generate the output directly to a http-accessible directory upon that machine. Multiple Machines + ----------------- The blog input lives upon one machine, and once you've generated the output you copy it over to a remote web-server where it may be viewed. @@ -32,7 +35,7 @@ Common Setup ------------ - Install the included file cgi-bin/comments.cgi upon the web-server + Install the included file comments.cgi upon the web-server which hosts the blog, and adjust the settings at the start of that file to specify: diff -r 05ef582dfa3b -r 6f1aaf5309c7 Makefile --- a/Makefile Tue Oct 28 00:44:56 2008 +0000 +++ b/Makefile Sun Dec 21 23:53:28 2008 +0000 @@ -13,7 +13,7 @@ # Only used to build distribution tarballs. # DIST_PREFIX = ${TMP} -VERSION = 3.2 +VERSION = 3.4 BASE = chronicle @@ -44,6 +44,7 @@ @find . -name '*.1' -exec rm \{\} \; @find . -name '*.bak' -exec rm \{\} \; @find . -name '*.tmp' -exec rm \{\} \; + @if [ -e .version ]; then rm -f .version; fi @if [ -d comments ]; then rm -rf comments; fi @if [ -d output ]; then rm -rf output; fi @if [ -e build-stamp ]; then rm -f build-stamp; fi @@ -94,15 +95,16 @@ mv $(DIST_PREFIX)/$(BASE)-$(VERSION).tar.gz . rm -rf $(DIST_PREFIX)/$(BASE)-$(VERSION) gpg --armour --detach-sign $(BASE)-$(VERSION).tar.gz + echo $(VERSION) > .version + # # Tidy the code # tidy: - if [ -x /usr/bin/perltidy ]; then \ - perltidy -b -nt -bt=2 -sbt=1 -bl -mbl=3 -sbl -bbs -bbb -anl -lp bin/chronicle ;\ - perltidy -b -nt -bt=2 -sbt=1 -bl -mbl=3 -sbl -bbs -bbb -anl -lp cgi-bin/comments.cgi \ + if [ -x ~/bin/perltidy ]; then \ + ~/bin/perltidy ./bin/chronicle ./cgi-bin/comments.cgi \ ; fi diff -r 05ef582dfa3b -r 6f1aaf5309c7 README --- a/README Tue Oct 28 00:44:56 2008 +0000 +++ b/README Sun Dec 21 23:53:28 2008 +0000 @@ -114,7 +114,7 @@ \==========================/ - Or, with specific test: + Or, with specific text: /-------------------------------------------------\ This is a line of text diff -r 05ef582dfa3b -r 6f1aaf5309c7 bin/chronicle --- a/bin/chronicle Tue Oct 28 00:44:56 2008 +0000 +++ b/bin/chronicle Sun Dec 21 23:53:28 2008 +0000 @@ -30,6 +30,11 @@ --pre-build Specify a command to execute prior to building the blog. --post-build Specify a command to execute once the blog has been built. + Sorting Options: + + --recent-dates-first Show recent entries first in the archive view. + --recent-tags-first Show recent entries first in the tag view. + Optional Features: --force Force the copying of static files from the blog theme. @@ -487,6 +492,11 @@ $CONFIG{ 'force' } = 0; # + # UTF-8 for textile + # + $CONFIG{ 'charset' } = 'utf-8'; + + # # Comments enabled globally. # $CONFIG{ 'comment-days' } = 0; @@ -543,8 +553,13 @@ "lower-case", \$CONFIG{ 'lower-case' }, "comment-days=s", \$CONFIG{ 'comment-days' }, + # sorting + "recent-tags-first", \$CONFIG{ 'recent-tags-first' }, + "recent-dates-first", \$CONFIG{ 'recent-dates-first' }, + # input format. - "format=s", \$CONFIG{ 'format' }, + "format=s", \$CONFIG{ 'format' }, + "charset=s", \$CONFIG{ 'charset' }, # prefix "url-prefix=s", \$CONFIG{ 'url_prefix' }, @@ -637,6 +652,37 @@ exit; } + # + # Make sure we have no duplicate titles. + # + my %titles; + foreach my $key ( keys(%results) ) + { + + # + # Get the title for this file. + # + my $title = $results{ $key }->{ 'title' }; + next if ( !defined($title) ); + + # + # If we've seen this already then abort + # + if ( $titles{ $title } ) + { + print "Non-unique title: $title\n"; + print "Shared by (at least):\n"; + print "\t" . $key . "\n"; + print "\t" . $titles{ $title } . "\n"; + print "\nAborting\n"; + exit; + } + else + { + $titles{ $title } = $key; + } + } + return %results; } @@ -1013,7 +1059,16 @@ # # Sort the entries by date # - my @sortedEntries = reverse sort bywhen @$entries; + my @sortedEntries; + + if ( $CONFIG{ 'recent-tags-first' } ) + { + @sortedEntries = sort bywhen @$entries; + } + else + { + @sortedEntries = reverse sort bywhen @$entries; + } # # Now write the output as a HTML page. @@ -1162,7 +1217,16 @@ # # Sort the entries by date # - my @sortedEntries = reverse sort bywhen @$entries; + my @sortedEntries; + if ( $CONFIG{ 'recent-dates-first' } ) + { + @sortedEntries = sort bywhen @$entries; + } + else + { + @sortedEntries = reverse sort bywhen @$entries; + } + # # Now write the output as a HTML page. @@ -2308,10 +2372,23 @@ } # - # Convert. + # Convert, via the textile helper. # - $text = Text::Textile::textile($text); - return ($text); + my $textile = new Text::Textile; + + if ( defined( $CONFIG{ 'charset' } ) ) + { + $CONFIG{ 'verbose' } && + print "Formatting via textile with charset $CONFIG{'charset'}\n"; + + $textile->charset( $CONFIG{ 'charset' } ); + } + + # + # Now return HTML + # + my $html = $textile->process($text); + return ($html); } diff -r 05ef582dfa3b -r 6f1aaf5309c7 cgi-bin/comments.cgi --- a/cgi-bin/comments.cgi Tue Oct 28 00:44:56 2008 +0000 +++ b/cgi-bin/comments.cgi Sun Dec 21 23:53:28 2008 +0000 @@ -74,14 +74,14 @@ # # If any are missing just redirect back to the blog homepage. # -if ( !defined($name) - || !length($name) - || !defined($mail) - || !length($mail) - || !defined($body) - || !length($body) - || !defined($id) - || !length($id) ) +if ( !defined($name) || + !length($name) || + !defined($mail) || + !length($mail) || + !defined($body) || + !length($body) || + !defined($id) || + !length($id) ) { if ($ajax) { diff -r 05ef582dfa3b -r 6f1aaf5309c7 debian/changelog --- a/debian/changelog Tue Oct 28 00:44:56 2008 +0000 +++ b/debian/changelog Sun Dec 21 23:53:28 2008 +0000 @@ -1,3 +1,27 @@ +chronicle (3.4-1) unstable; urgency=medium + + * Abort if non-unique titles are encountered. + (Closes: #508268) + * Allow date + tag views to be sorted "most recent first", + via new command line arguments / configuration file options. + + -- Steve Kemp Wed, 10 Dec 2008 20:22:02 +0000 + +chronicle (3.3-1) unstable; urgency=medium + + * Default to UTF-8 when processing input in textile formats. Allow + --charset=foo to override this. + Thanks to Nicolau Werneck for the patch. + + -- Steve Kemp Sun, 6 Dec 2008 22:16:22 +0000 + +chronicle (3.2-2) unstable; urgency=medium + + * Install the file cgi-bin/comments.cgi alongside the other example + files. (Closes: #504270) + + -- Steve Kemp Sun, 2 Nov 2008 14:55:41 +0000 + chronicle (3.2-1) unstable; urgency=high * New upstream release. diff -r 05ef582dfa3b -r 6f1aaf5309c7 debian/rules --- a/debian/rules Tue Oct 28 00:44:56 2008 +0000 +++ b/debian/rules Sun Dec 21 23:53:28 2008 +0000 @@ -45,7 +45,7 @@ dh_testroot dh_installchangelogs dh_installdocs - dh_installexamples bin/chronicle-rss-importer bin/check-titles + dh_installexamples bin/chronicle-rss-importer bin/check-titles cgi-bin/comments.cgi dh_installman chronicle.1 chronicle-spooler.1 dh_compress dh_fixperms