File: sanitize-file.pl

package info (click to toggle)
libhtml-restrict-perl 3.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 364 kB
  • sloc: perl: 842; makefile: 7
file content (24 lines) | stat: -rwxr-xr-x 389 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env perl

use strict;
use warnings;

use HTML::Restrict ();
use Path::Tiny     qw( path );

my $filename = shift @ARGV;
die "usage: perl $0 path/to/file > path/to/new/file" if !$filename;

my $text = path($filename)->slurp;

my $hr = HTML::Restrict->new;

print $hr->process($text);

=pod

=head1 SYNOPSIS

    perl sanitize_file path/to/filename > path/to/sanitized/file

=cut