#!/usr/bin/env perl

use strict;
use lib "$ENV{'HOME'}/.config/lib";
use News::Article;
# Depends on my updated PGP::Sign to not require a passphrase; should be 
# documented as such, and perhaps this whole script should be written up
# separately as well!

use strict;

my $person = 'tskirvin@killfile.org';
#my $id = "0x0427609D";
my $id = "0x0C2EE21D";
my $phrase = "XXXXXXXXXXX";     # not necessary with gpg-agent

my $article = new News::Article(\*STDIN);
die "No article\n" unless $article;

# $article->drop_headers('x-auth');

print $article->sign_pgpmoose($person, undef, $id);
$article->rename_header('x-auth', 'x-signature');
$article->write(\*STDOUT);
