changeset 185:82917ab0dff4

Allow 'subject' as a synonym for 'title'
author Steve Kemp <steve@steve.org.uk>
date Wed, 02 Apr 2008 13:27:11 +0100
parents 3739e04097da
children c078b940bf3b
files README bin/chronicle
diffstat 2 files changed, 24 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/README	Tue Apr 01 22:24:21 2008 +0100
+++ b/README	Wed Apr 02 13:27:11 2008 +0100
@@ -44,7 +44,7 @@
 
     /usr/share/chronicle        <-  The theme directories.
     /usr/bin/chronicle          <-  The main binary.
-    /etc/chroniclerc            <-  The main configuration file.
+    /etc/chroniclerc            <-  The global configuration file.
 
   If you wish to customise the templates it is recommended you
  make a copy of them with a new name, then edit that copy.  This
@@ -71,16 +71,29 @@
   \--
 
 
-  The tags are optional, but recommended, similarly the date of the post
- is used in preference to the current date if none is present.
+  The three key fields are:
+
+Title:
+   This holds the name of the post.  ("Subject:" may be used as a synonym.)
+   If neither "Title" or "Subject" are present the filename itself is
+ used.
+
+
+Date:
+   The date this entry was created.  If not present the creation time
+ of the file is used.
+
+
+Tags:
+   If any tags are present they will be used to catagorise the entry.
+
 
 
 Entry Cutting
 -------------
 
-  If you wish to truncate an entry you may do so via the <cut> tags.
-
-  For example:
+  If you wish you may truncate a long entry via the special <cut> tag,
+ for example:.
 
 
 /--------------------------\
--- a/bin/chronicle	Tue Apr 01 22:24:21 2008 +0100
+++ b/bin/chronicle	Wed Apr 02 13:27:11 2008 +0100
@@ -102,7 +102,10 @@
 
 =item Title:
 Describes the title of the post.  If not present the filename of the entry
-is used instead.
+is used instead.  "Subject:" may also be used.
+
+=item Subject:
+This is a synonym for 'Title:'.
 
 =item Date:
 The date the post was written.  If not present the creation time of the
@@ -1483,7 +1486,7 @@
         {
             $tags = $1;
         }
-        elsif ( ( $line =~ /^title:(.*)/i ) && !length($title) )
+        elsif ( ( $line =~ /^(title|subject):(.*)/i ) && !length($title) )
         {
 
             #