Skip to content
Permalink
Browse files

Change change.log into a PSV

  • Loading branch information...
nigelhorne committed Sep 11, 2019
1 parent f74b0f8 commit 6132a302ab733823590a6035a56dd30fda35ea45
Showing with 7 additions and 14 deletions.
  1. +7 −14 ged2site
@@ -891,35 +891,28 @@ if(scalar(%military)) {

if(scalar(%changes)) {
print "Adding to change blog\n";
open(my $log, '>>', 'change.log');
open(my $log, '>>', 'change.psv');

my $added_date;
my $date = DateTime->now(time_zone => 'local')->ymd('');
while(my $person = shift(@{$changes{'added_people'}})) {
if(!$added_date) {
print $log DateTime->now(time_zone => 'local')->ymd(''), "\n", '=' x 8, "\n";
$added_date = 1;
}
print $log 'Added ',
print $log "$date|",
$person->as_string({
include_years => 1,
nee => 1,
middle_names => 1,
title => 1
}),
"\n";
"|Added new person\n";
}
while(my $change = shift(@{$changes{'changes'}})) {
if(!$added_date) {
print $log DateTime->now(time_zone => 'local')->ymd(''), "\n", '=' x 8, "\n";
$added_date = 1;
}
print $log $change->person()->as_string({
print $log "$date|",
$change->person()->as_string({
include_years => 1,
nee => 1,
middle_names => 1,
title => 1
}),
': ',
'|',
$change->change(),
"\n";
}

0 comments on commit 6132a30

Please sign in to comment.
You can’t perform that action at this time.