changeset 27:25450021ba3e

2007-08-16 12:45:55 by steve Updated commandline handling. Added tag sizes.
author steve
date Thu, 16 Aug 2007 12:45:55 +0000
parents cc6b58cd79b5
children f7b7c3652fdc
files bin/chronicle
diffstat 1 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/bin/chronicle	Thu Aug 16 12:45:44 2007 +0000
+++ b/bin/chronicle	Thu Aug 16 12:45:55 2007 +0000
@@ -54,7 +54,7 @@
  --
  http://www.steve.org.uk/
 
- $Id: chronicle,v 1.11 2007-08-15 18:23:35 steve Exp $
+ $Id: chronicle,v 1.12 2007-08-16 12:45:55 steve Exp $
 
 =cut
 
@@ -318,13 +318,16 @@
                # paths
                "input=s",      \$CONFIG{'input'},
                "output=s",     \$CONFIG{'output'},
-               "templates=s",  \$CONFIG{'templates'},
+               "templates=s",  \$CONFIG{'template'},
 
                # optional
                "pattern=s",    \$CONFIG{'pattern'},
                "no-tags",      \$CONFIG{'no-tags'},
                "no-archive",   \$CONFIG{'no-archive'},
 
+               # prefix
+               "url-prefix=s", \$CONFIG{'url_prefix'},
+
                # commands
                "pre-build=s",  \$CONFIG{'pre-build'},
                "post-build=s", \$CONFIG{'post-build'},
@@ -336,7 +339,7 @@
 
     if ( $VERSION )
     {
-        my $REVISION      = '$Revision: 1.11 $';
+        my $REVISION      = '$Revision: 1.12 $';
         if ( $REVISION =~ /1.([0-9.]+) / )
         {
             $REVISION = $1;
@@ -521,9 +524,14 @@
 
     foreach my $key ( sort keys( %unique ) )
     {
+        my $count = $unique{$key};
+        my $size  = 10 + ( $count * 5 );
+        $size = 40 if ( $size >= 40 );
+
         push( @$results,
-            { tag => $key,
-              count => $unique{$key} } );
+            { tag   => $key,
+              count => $count,
+              size  => $size} );
     }
     return $results;