]> git.proxmox.com Git - pve-docs.git/blobdiff - pve-docs-mediawiki-import.in
make dinstall: skip mediawiki deb for now
[pve-docs.git] / pve-docs-mediawiki-import.in
index 1dc4f2647c9a722c394d3f89b03eedde85bb6768..14dffa09d9e7556f1c13c72145f303f7497b308f 100755 (executable)
@@ -21,7 +21,7 @@ my $config_fn = "/root/.pve-docs"; # format 'username:pw'
 my $fh = IO::File->new("$config_fn") ||
     die "Please configure the mediawiki user/passswd in '$config_fn'\n";
 
-my $api_url = "http://localhost/mediawiki/api.php";
+my $api_url = "https://pve.proxmox.com/mediawiki/api.php";
 
 my $config = <$fh>;
 chomp $config;
@@ -55,9 +55,10 @@ sub update_page {
 
     my $parser_opts = {
        api_version => 3,
-       text_h => [ sub { $pve_content .= shift }, "dtext" ],
+       text_h => [ sub { $pve_content .= shift }, "text" ],
     };
     my $parser = HTML::Parser->new(%$parser_opts);
+    $parser->ignore_elements(qw(script style));
 
     my $fh = IO::File->new("/usr/share/pve-docs/$filename", "r") or
        die "unable to open file '$filename' - $!\n";