Upgrade yt-dlp from version stable@2023.07.06 to stable@2023.09.24
[sunny256-utils.git] / html2wiki
blob080bad48eb9b11a7ec5e301b11ebf0c0ce1f52a8
1 #!/usr/bin/env perl
3 #=======================================================================
4 # html2wiki
5 # File ID: 236cf176-5d3d-11df-a10d-90e6ba3022ac
6 # Konverterer HTML til MediaWiki-dialekt.
8 # Character set: UTF-8
9 # ©opyleft 2004– Øyvind A. Holm <sunny@sunbase.org>
10 # License: GNU General Public License, see end of file for legal stuff.
11 #=======================================================================
13 use strict;
14 use warnings;
15 use Getopt::Std;
16 use HTML::WikiConverter;
18 $| = 1;
20 our ($opt_h) =
21 ( 0);
22 getopts('h') || die("Option error. Use -h for help.\n");
24 my $VERSION = "0.0";
26 our $progname = $0;
27 $progname =~ s#^.*/(.*?)$#$1#;
29 $opt_h && usage(0);
31 my $html = join("", <>);
32 my $wc = new HTML::WikiConverter( dialect => 'MediaWiki' );
33 print $wc->html2wiki($html);
35 sub usage {
36 # Send the help message to stdout {{{
37 my $Retval = shift;
38 print(<<END);
40 $progname v$VERSION
42 Usage: $progname [options] [file [files [...]]]
44 Options:
46 -h Show this help.
48 END
49 exit($Retval);
50 # }}}
53 __END__
55 # Plain Old Documentation (POD) {{{
57 =pod
59 =head1 NAME
63 =head1 SYNOPSIS
67 =head1 DESCRIPTION
71 =head1 OPTIONS
73 =over 4
75 =item B<-h>
77 Print a brief help summary.
79 =back
81 =head1 BUGS
85 =head1 AUTHOR
87 Made by Øyvind A. Holm S<E<lt>sunny _AT_ sunbase.orgE<gt>>.
89 =head1 COPYRIGHT
91 Copyleft © Øyvind A. Holm &lt;sunny@sunbase.org&gt;
92 This is free software; see the file F<COPYING> for legalese stuff.
94 =head1 LICENCE
96 This program is free software; you can redistribute it and/or modify it
97 under the terms of the GNU General Public License as published by the
98 Free Software Foundation; either version 2 of the License, or (at your
99 option) any later version.
101 This program is distributed in the hope that it will be useful, but
102 WITHOUT ANY WARRANTY; without even the implied warranty of
103 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
104 See the GNU General Public License for more details.
106 You should have received a copy of the GNU General Public License along
107 with this program; if not, write to the Free Software Foundation, Inc.,
108 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
110 =head1 SEE ALSO
112 =cut
114 # }}}
116 # vim: set fenc=UTF-8 ft=perl fdm=marker ts=4 sw=4 sts=4 et fo+=w :
117 # End of file html2wiki