Skip to content

Commit

Permalink
Added -P to print places
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Mar 28, 2024
1 parent af5f354 commit 83f4e1d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ The options are:
an animated gif of births into $surname.gif
-O: print a list of occupations, useful for finding typoes and inconsistencies
-p: print the biography of the given person
-P: print a list of places, useful for finding typoes of inconsistencies
-r: print a list of residences, useful for finding typos and inconsistencies
-t: print tomorrow's information, don't use with -a
-s: only print entries matching the home person's surname
Expand Down
10 changes: 8 additions & 2 deletions gedcom
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ use Array::Iterator::BiDirectional;
sub get_location($);

my %opts;
getopts('aAbB:cCdDe:fFGgh:Hi:m:M:lLOp:rsStwWxvy:', \%opts);
die "Usage: $0 [ -a ] [ -A ] [ -b ] [ -B book.pdf ] [ -c ] [ -C ] [ -d ] [ -D ] [ -f ] [ -F ] [ -G ] [ -h home-person-name ] [ -H [ -L [ -e ] ] [ -i ics_file ] [ -M place ] [ -m month ] [ -y year ] ] [ -l ] [ -p person-to-print ] [ -r ] [ -s ] [ -S ] [ -t ] [ -w [ -W ] [ -g | -x ]] filename [ filename2 ]" unless($ARGV[0]);
getopts('aAbB:cCdDe:fFGgh:Hi:m:M:lLOp:PrsStwWxvy:', \%opts);
die "Usage: $0 [ -a ] [ -A ] [ -b ] [ -B book.pdf ] [ -c ] [ -C ] [ -d ] [ -D ] [ -f ] [ -F ] [ -G ] [ -h home-person-name ] [ -H [ -L [ -e ] ] [ -i ics_file ] [ -M place ] [ -m month ] [ -y year ] ] [ -l ] [ -p person-to-print ] [ -P ] [ -r ] [ -s ] [ -S ] [ -t ] [ -w [ -W ] [ -g | -x ]] filename [ filename2 ]" unless($ARGV[0]);

print "Starting\n" if($opts{'v'});

Expand Down Expand Up @@ -241,6 +241,9 @@ if($opts{h}) {
if($opts{'f'}) {
$opts{'w'} = 1;
}
if($opts{'P'}) {
$opts{'r'} = 1;
}

die '-w option needs -d or -M option' if($opts{'w'} && (!$opts{'M'}) && !$opts{'d'});

Expand Down Expand Up @@ -11700,6 +11703,9 @@ sub dump_places {
warn "'$place' not found";
}
next;
} elsif($opts{'P'}) {
print "$place\n";
next;
} else {
# $opts{'r'}
print "$place: ";
Expand Down

0 comments on commit 83f4e1d

Please sign in to comment.