changeset 195:6e5557c3b3e5

Ignore publish: pseudo-header
author Steve Kemp <steve@steve.org.uk>
date Mon, 14 Apr 2008 18:51:12 +0100
parents 4004fa368f64
children e2f01ce401c0
files bin/chronicle
diffstat 1 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/bin/chronicle	Mon Apr 14 18:50:54 2008 +0100
+++ b/bin/chronicle	Mon Apr 14 18:51:12 2008 +0100
@@ -111,6 +111,9 @@
 The date the post was written.  If not present the creation time of the
 file is used instead.
 
+=item Publish:
+This header is removed from all entries, and is used by the chronicle-spooler script.
+
 =item Tags:
 Any tags which should be associated with the entry, separated by commas.
 
@@ -1470,10 +1473,11 @@
     }
 
 
-    my $title = "";    # entry title.
-    my $tags  = "";    # entry tags.
-    my $body  = "";    # entry body.
-    my $date  = "";    # entry date
+    my $title   = "";    # entry title.
+    my $tags    = "";    # entry tags.
+    my $body    = "";    # entry body.
+    my $date    = "";    # entry date
+    my $publish = "";    # entry publish date - *ignored*
 
     open( ENTRY, "<", $filename ) or die "Failed to read $filename $!";
     while ( my $line = <ENTRY> )
@@ -1486,6 +1490,10 @@
         {
             $tags = $1;
         }
+        elsif ( ( $line =~ /^publish:(.*)/i ) && !length($publish) )
+        {
+            $publish = $1;
+        }
         elsif ( ( $line =~ /^(Subject|Title):(.*)/i ) && !length($title) )
         {