omt-0.1.16/0000775000175000017500000000000010456536203010514 5ustar olaolaomt-0.1.16/BUGS0000664000175000017500000000155607440751235011211 0ustar olaola OpaL Mirror Tool Copyright (C) 2000 Ola Lundqvist $Id: BUGS 1408 2002-03-04 20:01:33Z ola $ For full COPYRIGHT notice see the COPYING document. If you want more information about the program or updated versions, visit the official homepage at: http://www.opal.dhs.org/programs/omt or contact the author at: opal@lysator.liu.se BUGS: ----- * The script cannot handle more than one link to other hosts. If a rewrite changes the dir than the script will not be able to recurse from there. It is easy to fix this (just one more queue) but I need time to do that. WANTED FEATURES: ---------------- Send youres. FIXED BUGS: ----------- * Can now (hopefully) handle # properly. * Use mkpath instead of mkdir. REPORT: ------- If you find a bug with this program, please let me know. Send a mail to the author at opal@lysator.liu.se. omt-0.1.16/debian/0000775000175000017500000000000010456536203011736 5ustar olaolaomt-0.1.16/debian/control0000664000175000017500000000107510456535522013347 0ustar olaolaSource: omt Section: web Priority: optional Maintainer: Ola Lundqvist Build-Depends-Indep: perl Build-Depends: debhelper (>> 4.0.0) Standards-Version: 3.7.2 Package: omt Architecture: all Depends: ${perl:Depends}, libwww-perl, liburi-perl Description: A tool for mirroring web pages OpaL Mirror Tool is a program written in perl to mirror web pages or download files from the web. It has the powerful ability to rewrite the content of the pages to make a fully functional mirror and the user can specify additional rewrite rules at the command line. omt-0.1.16/debian/dirs0000664000175000017500000000000007140640571012610 0ustar olaolaomt-0.1.16/debian/changelog0000664000175000017500000000467110456535522013623 0ustar olaolaomt (0.1.16) unstable; urgency=low * Updated FSF address, updated to latest version of GPL license and clarified licenses in some places. * Changed build-depends-indep to build-depends for debhelper. * Updated to debhelper 4 compatibility from compatibility level 1. * Correction in how binary-arch and binary-indep are handled. * Updated to standards version 3.7.2 from 3.5.8. -- Ola Lundqvist Mon, 17 Jul 2006 00:22:25 +0200 omt (0.1.15) unstable; urgency=low * Minor fix to handle rewrites in CGI script downloads. -- Ola Lundqvist Tue, 11 Jan 2005 22:07:23 +0100 omt (0.1.14) unstable; urgency=low * Updated standards version from 3.5.2 to 3.5.8 (no other changes). * Removed full stop from package description. * Updated copyright file so it is less template similar. * Removed dh_suidregister from rules file. -- Ola Lundqvist Fri, 10 Jan 2003 18:19:40 +0100 omt (0.1.13) unstable; urgency=low * Added support for area tags, thanks to Sebastiaan . * Added proxy support using suggestions from Sebastiaan . * Now uses URI instead of URI::URL. * Removed pl extension from man and bin files. -- Ola Lundqvist Mon, 15 Apr 2002 10:11:55 +0200 omt (0.1.12) unstable; urgency=low * Fixed missing use of URI:URL. -- Ola Lundqvist Sun, 7 Apr 2002 13:17:41 +0200 omt (0.1.11) unstable; urgency=low * Cleaned the build code. * Changed upstream homepage. * Fixed missing dependency, closes: #131664. * Fixed long description, closes: #131016. * Fixed policy version. -- Ola Lundqvist Mon, 4 Mar 2002 21:16:53 +0100 omt (0.1.10-3) unstable; urgency=low * Removed README.Debian (unnecessary), closes: Bug#81382. Also fixed error in copyright file. -- Ola Lundqvist Thu, 21 Dec 2001 16:19:29 +0100 omt (0.1.10-2) unstable; urgency=low * Fixed maintainer field in control file. -- Ola Lundqvist Thu, 21 Dec 2000 12:58:21 +0200 omt (0.1.10-1) unstable; urgency=low * Automodification by orm. Relased a new version. -- Ola Lundqvist Wed, 22 Nov 2000 11:45:01 +0100 omt (0.1.9-1) unstable; urgency=low * Automodification by orm. Relased a new version. -- Ola Lundqvist Sat, 29 Jul 2000 23:14:25 +0200 Local variables: mode: debian-changelog End: omt-0.1.16/debian/copyright0000664000175000017500000000202610456535200013665 0ustar olaolaThis package was debianized by Ola Lundqvist on Sat, 29 Jul 2000 22:41:21 +0200. It was downloaded from: http://www.opal.dhs.org/programs/omt/ Upstream Author: Ola Lundqvist Copyright: Copyright (C) 2000, 2006 Ola Lundqvist omt is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. omt is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License with your Debian GNU system, in /usr/share/common-licenses/GPL, or with the OpaL Mirror Tool (omt) source package in the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. omt-0.1.16/debian/docs0000664000175000017500000000003607454025337012615 0ustar olaolaREADME NEWS AUTHORS BUGS TODO omt-0.1.16/debian/rules0000775000175000017500000000270110456535463013025 0ustar olaola#!/usr/bin/make -f # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Changed to fit orm (2000) by Ola Lundqvist. # Rules to build omt # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This is the debhelper compatability version to use. export DH_COMPAT=4 build: build-stamp build-stamp: dh_testdir # Add here commands to compile the package. $(MAKE) touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp # Add here commands to clean up after the build process. -$(MAKE) clean dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs # Add here commands to install the package into debian/omt. $(MAKE) install DESTDIR=`pwd`/debian/omt # Build architecture-independent files here. binary-arch: # We have nothing to do by default. # Build architecture-dependent files here. binary-indep: build install # dh_testversion dh_testdir dh_testroot # dh_installdebconf dh_installdocs dh_installexamples dh_installmenu # dh_installemacsen # dh_installpam # dh_installinit dh_installcron dh_installmanpages dh_installinfo # dh_undocumented dh_installchangelogs dh_link dh_strip dh_compress dh_fixperms # You may want to make some executables suid here. #dh_suidregister dh_makeshlibs dh_installdeb dh_perl # dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install omt-0.1.16/mirrortool.pl0000775000175000017500000005477410456535200013301 0ustar olaola#!/usr/bin/perl # OpaL Mirror Tool # # Copyright (C) 2000 Ola Lundqvist # # $Id: mirrortool.pl 2293 2006-07-16 22:15:28Z ola $ # For full COPYRIGHT notice see the COPYING document. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301 USA. # # For more information take a look at the official homepage at: # http://www.opal.dhs.org/programs/omt/ # or contact the author at: # opal@lysator.liu.se # # use File::Path qw(mkpath); ############################################################################### ################################ HELP TEXT #################################### ############################################################################### $version = "0.1.16"; $versionstr = "mirrortool.pl (OpaL Mirror Tool) version $version.\n"; $help = " OpaL Mirror Tool Written by Ola Lundqvist Lincensed under GPL Usage: mirrortool.pl [ options ] url [ options url ] [ ... ] options: --images : Include :s in the download. (default) --noimages : Do not include :s in the download. --depth n : Maximum recursion depth. (default 1) --store \"regexp\" : Files matching regexp are actually stored locally. : It is possible to | separate (with or). --rewrite \"from=>to\" : Urls are rewritten using this rules. : It is possible to | separate (with or). : Do not rewrite the dir, because that it will affect : later lookup. Have to fix this sometime. --what \"regexp\" : Files matching regexp are downloaded and traversed. : It is possible to | separate (with or). --dir basedir : Where to store local files. --nohostcheck : Do not check if url points to other host. --notreecheck : Do not check if url points to other dirtree. --force : Overwrite all files. --debug : Print debug-messages. --retry n : Number of times an url will be retried (default 1) --auth user:pass : use Basic Authentication --proxy url : Use a proxy server (like http://u:p@localhost/). --help : Print this text. requires LWP::UserAgent For more information contact the author or look at: http://www.opal.dhs.org/programs/omt/ "; use LWP::UserAgent; $hdrs = new HTTP::Headers(Accept => 'text/plain', Accept => 'text/html', Accept => 'image/gif', Accept => 'image/jpeg', User-Agent => 'OpaLMirrorTool/1.0'); $ua = new LWP::UserAgent; # START DEFAULTS # DO NOT CHANGE THEM UNLESS YOU KNOW WHAT YOU ARE DOING! # images, what, rewrite, store, depth, basedir, baseurl, dir, url # ============================================================================= undef $/; $images = 1; $basedir = ""; $what = ".*"; $store = ".*"; $rewrite = ""; $depth = 1; $retry = 1; $debug = 0; $outtree = 0; $outhost = 0; $auth = 0; $proxy = ""; if ($ENV{'HTTP_PROXY'} ne "") { $proxy = $ENV{'HTTP_PROXY'}; } # ============================================================================= # END DEFAULTS # START INIT # Dates: 2000-03-12 (changed) # ============================================================================= while($_ = shift) { if (/^--/) { if (/^--help$/) { print($help); exit; } elsif (/^--version$/) { print($versionstr); exit; } elsif (/^--noimages$/) { $images = 0; } elsif (/^--images$/) { $images = 1; } elsif (/^--depth$/) { $depth = shift; } elsif (/^--retry$/) { $retry = shift; } elsif (/^--store$/) { $store = shift; } elsif (/^--what$/) { $what = shift; } elsif (/^--debug$/) { $debug = 1; } elsif (/^--nohostcheck$/) { $outhost = 1; } elsif (/^--notreecheck$/) { $outtree = 1; } elsif (/^--force$/) { $force = 1; } elsif (/^--dir$/) { $basedir = &fixdir(shift); } elsif (/^--rewrite$/) { $rewrite = shift; } elsif (/^--auth$/) { $auth = shift; } elsif (/^--proxy$/) { $proxy = shift; } else { print ("There is no such option $_, EXITING!\n"); exit; } } else { $url = $_; if ($url !~ /\w+:/) { print ("$url is not a valid url!\n"); next; } s/(\/)[^\/]+$/$1/; $baseurl = $_; &push_init; } } if ($proxy ne "") { $ua->proxy(http => $proxy); } # ============================================================================= # END INIT # START THE LOOP # ============================================================================= # The loop that downloads the mirror while (scalar @init_url > 0) { &shift_init; print ("OUTLOOP\n") if ($debug); while (scalar @download_url > 0) { &shift_it; print ("INLOOP\n") if ($debug); if (-f "$basedir$filename" && ! $force) { print ("File $basedir$filename does already exist!\n") if ($debug); } else { print ("Open URL: $url, $filename\n") if ($debug); # START DOWNLOAD $urlo = new URI($url); $req = new HTTP::Request(GET, $urlo, $hrds); #$req->authorization_basic('motp-excellence', 'nada'); if ($auth) { ($u, $p) = split(":", $auth); $req->authorization_basic($u, $p); } $resp = $ua->request($req); if (! ($resp->is_success)) { if (--$depth >= 0) { print ("Failed open url $url, retry $depth more times.\n"); &push_it; } else { print ("Failed open url $url, ".$resp->message."\n"); } } else { $file = $resp->content; print ("Read Done\n") if ($debug); # END DOWNLOAD # check if to handle if (( ($file =~ /<\s*html\s*>/i) || ($file =~ /<\s*head\s*>/i) || ($file =~ /<\s*a\s/i) || ($file =~ /<\s*img\s/i) || ($file =~ /<\s*body/i) ) && ($depth_o > 0)) { print ("Handle it!\n") if ($debug); $file = &handle_file($file); } print ("Save file: $filename\n") if ($debug); &save_file($file, $filename); } } print ("INLOOP DONE!\n") if ($debug); } print ("OUTLOOP DONE!\n") if ($debug); } # ============================================================================= # END THE LOOP # ----------------------------------------------------------------------------- # Args: # Returns: # Desctiption: # Uses: # Dates: 2000-03-12 (written) # ----------------------------------------------------------------------------- # START HANDLE FUNCTIONS # ============================================================================= # ----------------------------------------------------------------------------- # Args: file data # Returns: file data (possibly rewritten) # Desctiption: Process the file # Uses: handle_tags # Type: file handle # Changes: # 2000-03-11 Ola Lundqvist # Written. # 2000-03-14 Ola Lundqvist # implemented --noimages, forgot $images # 2002-14-15 Sebastiaan # Added support for area tags. # Status: Should be done. # ----------------------------------------------------------------------------- sub handle_file { my $lo = $_; my $file = ""; # Get all tags #$file =~ s/\n/ /g; foreach (split /(<[^>]+>)/, (shift)) { # if image tag if (/<\s*img\s/i && $images) { $_ = &handle_tag("src", $_); } elsif (/<\s*a\s/i) { $_ = &handle_tag("href", $_); } elsif (/<\s*link\s/i) { $_ = &handle_tag("href", $_); } elsif (/<\s*area\s/i) { $_ = &handle_tag("href", $_); } $file = $file.$_; } &get_it; $_ = $lo; return $file; } # ----------------------------------------------------------------------------- # Args: search for # tag string # Returns: rewritten tag (not implemented yet) # Description: search for urls and add them to queue (in later versions may # rewrite it too) # Uses: global data in queues. # Dates: 2000-03-11 (written) # ----------------------------------------------------------------------------- sub handle_tag { my $lo = $_; my $searchf = shift; &get_it; my $tag = shift; my $turl = &tag_attribute($searchf, $tag); print ("handle_tag: $turl\n") if ($debug); if ($turl =~ /^\s*$/) { $_ = $lo; return $tag } # if there is a url and if it should be downloaded then... if (($turl !~ /^$/) && (&find_in_list($what, $turl))) { my $type; # print ("handle_tag0: $turl\n") if ($debug); ($type, $url, $filename, $filerel) = &handle_url($turl); print ("handle_tag: $filename\n") if ($debug); $depth--; $depth = 0 if ($searchf =~ /^src$/i); print ("handle_tag/type: $type $outhost\n") if ($debug); if (($type =~ /external/ && $outhost) || ($type =~ /intree/) || ($type =~ /inhost/ && $outtree)) { print ("handle_tag/push: $type, $url, $filename, $filerel\n") if ($debug); &push_it; $turl =~ s/\?/\\\?/; $tag =~ s/$turl/$filerel/g; } } $_ = $lo; return $tag; } # ----------------------------------------------------------------------------- # Args: url # Returns: (loc) # Description: Converts a url to a file path. # Uses: $baseurl, $dir, relative_path, rewrite_url, external_file # Dates: 2000-03-12 (written) # ----------------------------------------------------------------------------- sub handle_url { my $lo = $_; $_ = shift; my $hosturl = &url_type_host($baseurl); # if starting with / if (/^\//) { $_ = $hosturl.$_; } # if it is not external (make it possibly external) if (! /\w+:/) { $_ = $baseurl.$dir.$_; print ("handle_url/dir/fn: $dir, $filename\n") if ($debug); } my $ur = $_; my $type; # if in base url if (/^$baseurl/) { s/^$baseurl//; $_ = &rewrite_url($_); print ("DO REWRITE! $_\n") if ($debug); $type = "intree"; } # if in host elsif (/^$hosturl/) { $type = "inhost"; $_ = &external_file($_); } # external elsif (/^ftp:/) { $type = "ftp"; $_ = &external_file($_); } elsif (/^http:/){ $type = "external"; $_ = &external_file($_); } else { $type = "unknown"; } my @t = ($type, $ur, $_, &relative_path($_, $dir)); $_ = $lo; return @t; } # ----------------------------------------------------------------------------- # Args: file data # file name # Returns: nothing # Desctiption: saves file data to a dir/file # Uses: $store # Dates: 2000-03-11 (written) # 2000-03-12 (changed) # 2000-03-13 (better create dir and better store-check) # Status: Probably done # ----------------------------------------------------------------------------- sub save_file { my $filedata = shift; $filename =~ s/#.*$//; my $filename = $basedir.(shift); my $dir = &path_dir($filename); my $err = 0; if (&find_in_list($store, $filename)) { if ($dir !~ /^$/) { if (! mkpath ($dir, 0, 0755)) { if (! -d $dir) { print ("Cannot create $dir\n"); $err = 1; } } } if (! $err) { if (open (LF, ">$filename")) { print ("Writing $filename\n") if ($debug); print LF $filedata; close LF; } else { print ("Cannot create $filename\n") } } } } # ============================================================================= # END HANDLE FUNCTIONS # START REWRITE FUNCTIONS # ============================================================================= # ----------------------------------------------------------------------------- # Args: url # Returns: path relative # Description: converts a external path to where to store # Uses: rewrite_url # Dates: 2000-03-11 (written) # ----------------------------------------------------------------------------- sub external_file { my $lo = $_; $_ = shift; if (! /\w+:\/\//i) { print ("This is not an external url, ERROR! exiting!\n"); exit; } s/\w+:\/\///i; my $ret = &rewrite_url($_); # $ret =~ s/\//_/; $_ = $lo; return $ret; } # ----------------------------------------------------------------------------- # Args: url # Returns: url (rewritten) # Description: rewrites a url so that it can be stored localy # Uses: $rewrite # Dates: 2000-03-12 (written) # Note: Do not rewrite the dir, then the script will fail. # ----------------------------------------------------------------------------- sub rewrite_url { my $lo = $_; my $sp; $_ = shift; s/^$/index.html/; s/\/$/\/index.html/; # USER DEFINED REWRITE RULES foreach $sp (split /\|/, $rewrite) { my $f, $t; ($f, $t) = split /=>/, $sp; print ("rewrite_url1: $f, $t\n") if ($debug); s/$f/$t/; } # SUPERSTANDARD REWRITE RULES s/\?/G/; s/=/E/; s/&/A/; s/ /S/; s/\"/Q/; my $ret = $_; $_ = $lo; return $ret; } # ============================================================================= # END REWRITE FUNCTIONS # START QUEUE FUNCTIONS # ============================================================================= # ----------------------------------------------------------------------------- # Args: nothing # Returns: nothing # Desctiption: pushes a lot of data to different queues # Uses: a lot (see code) # Type: init # Dates: 2000-03-12 (written, created from push_it) # ----------------------------------------------------------------------------- sub push_init { push @init_images, $images; push @init_depth, $depth; push @init_what, $what; push @init_store, $store; push @init_basedir, $basedir; push @init_url, $url; push @init_baseurl, $baseurl; push @init_rewrite, $rewrite; push @init_outhost, $outhost; push @init_outtree, $outtree; push @init_retry, $retry; } # ----------------------------------------------------------------------------- # Args: nothing # Returns: nothing # Desctiption: shifts out item from the queue # Uses: queues, data... see the code. # Type: init # Dates: 2000-03-12 (written, created from shift_it) # ----------------------------------------------------------------------------- sub shift_init { $images = shift @init_images; $what = shift @init_what; $store = shift @init_store; $basedir = shift @init_basedir; $baseurl = shift @init_baseurl; $rewrite = shift @init_rewrite; $outtree = shift @init_outtree; $outhost = shift @init_outhost; $depth_o = shift @init_depth; $url_o = shift @init_url; $retry_o = shift @init_retry; $filename_o = &rewrite_url(&url_file($url_o)); $dir_o = ""; &get_it; &push_it; } # ----------------------------------------------------------------------------- # Args: nothing # Returns: nothing # Desctiption: pushes a lot of data to different queues # Uses: a lot (see code) # Dates: 2000-03-11 (written) # 2000-03-12 (changed) # ----------------------------------------------------------------------------- sub push_it { push @download_depth, $depth; push @download_retry, $retry; push @download_filename, $filename; push @download_url, $url; } # ----------------------------------------------------------------------------- # Args: nothing # Returns: nothing # Desctiption: shifts out item from the queue # Uses: queues, data... see the code. # Dates: 2000-03-11 (written) # 2000-03-12 (changed) # ----------------------------------------------------------------------------- sub shift_it { $depth_o = shift @download_depth; $retry_o = shift @download_retry; $filename_o = shift @download_filename; $url_o = shift @download_url; $dir_o = &path_dir($filename_o); &get_it; } # ----------------------------------------------------------------------------- # Args: nothing # Returns: nothing # Desctiption: get the latest... # Uses: global data # Dates: 2000-03-11 (written) # 2000-03-12 (changed) # ----------------------------------------------------------------------------- sub get_it { $depth = $depth_o; $retry = $retry_o; $filename = $filename_o; $dir = $dir_o; $url = $url_o; } # ============================================================================= # END QUEUE FUNCTIONS # START GENERAL URL FUNCTIONS # ============================================================================= # ----------------------------------------------------------------------------- # Args: url # Returns: type and host (ex: http://www.opal.dhs.org) # Description: Converts a url to type and host # NOTE that the url must begin with http:// # Type: general url # Dates: 2000-03-12 (written) # ----------------------------------------------------------------------------- sub url_type_host { my $lo = shift; # print ("url_type_host: $lo\n") if ($debug); if ($lo !~ /^\w+:\/\//) { print ("WARNING! No type, returns nothing!\n"); return ""; } $lo =~ s/^(\w+:\/\/[^\/]*).*$/$1/; # print ("url_type_host: $lo\n") if ($debug); return $lo; } # ----------------------------------------------------------------------------- # Args: url # Returns: type, host and dir (ex: http://www.opal.dhs.org/foo/) # Description: Converts a url to type, host and dir # NOTE that the url must begin with http:// # Type: general url # Dates: 2000-03-12 (written) # ----------------------------------------------------------------------------- sub url_type_host_dir { my $lo = shift; if ($lo !~ /^\w+:\/\//) { print ("WARNING! No type, returns nothing!\n"); return ""; } $lo =~ s/^(\w+:\/\/.*\/)[^\/]*$/$1/; return $lo; } # ----------------------------------------------------------------------------- # Args: url # Returns: file-name # Desctiption: returns a file name for the url # Uses: rewrite rules (not implemented yet) # Dates: 2000-03-12 (written) # ----------------------------------------------------------------------------- sub url_file { my $lo = shift; # removes the dir and everything before the file... $lo =~ s/.*\///; if ($lo =~ /\/$/) { $lo = $lo."index.html"; } return $lo; } # ============================================================================= # END GENERAL URL FUNCTIONS # START GENERAL PATH FUNCTIONS # ============================================================================= # ----------------------------------------------------------------------------- # Args: path # Returns: file name # Description: extracts a file name from a path # Uses: nothing # Type: general path # Dates: 2000-03-12 (written) # ----------------------------------------------------------------------------- sub path_file { my $lo = shift; $lo =~ s/^.*\/([^\/]*)$/$1/; return "index.html" if ($lo =~ /^$/); return $lo; } # ----------------------------------------------------------------------------- # Args: path # Returns: dir name # Description: extracts a dir name from a path # Uses: nothing # Type: general path # Dates: 2000-03-12 (written) # ----------------------------------------------------------------------------- sub path_dir { my $lo = shift; $lo =~ s/^(.*\/)[^\/]*$/$1/; return "" if ($lo !~ /\//); return &fixdir($lo); } # ----------------------------------------------------------------------------- # Args: dir # Returns: dir (fixed) # Desctiption: Add / to a dir if it does not exist. Does not do this with "" # Uses: nothing # Dates: 2000-03-11 (written) # ----------------------------------------------------------------------------- sub fixdir { my $lo = shift; return "" if ($lo =~ /^$/); if ($lo !~ /\/$/) { $lo = $lo."/"; } return $lo; } # ----------------------------------------------------------------------------- # Args: dir # cur dir # Returns: relative path # Description: Gives the relative path for dir to cur dir. # Type: general path # Dates: 2000-03-12 (written) # ----------------------------------------------------------------------------- sub relative_path { my $lo = $_; $_ = shift; my $curdir = shift; if (/^$curdir/) { s/^$curdir//; } else { $curdir =~ s/[^\/]+/\.\./g; $_ = $curdir.$_; } my $ret = $_; $_ = $lo; return $ret; } # ============================================================================= # END GENERAL PATH FUNCTIONS # START GENERAL TAG FUNCTIONS # ============================================================================= # ----------------------------------------------------------------------------- # Args: search for # tag string # Returns: attribute value # Desctiption: extracts the value for an attribute in a tag # Type: general html tag # Dates: 2000-03-11 (written) # ----------------------------------------------------------------------------- sub tag_attribute { my $lo = $_; my $searchf = shift; $_ = shift; # print ("tag_attribute: $searchf, $_\n") if ($debug); if (! /$searchf/i) { $_ = $lo; return ""; } # remove newlines s/\n/ /g; # remove double-spaces s/^\s+//; # get what we are searching for! # print ("tag_attribute1: $_\n") if ($debug); s/^.*$searchf\s*=\s*//i; # print ("tag_attribute2: $_\n") if ($debug); # If it is quoted... if (/\"/) { s/^\"//; s/\s.*//; s/^(\S*).*$/$1/; s/\".*$//; } # if not quoted else { s/^(\S*).*$/$1/; } # print ("tag_attribute3: $_\n") if ($debug); # NOW $a contains the attrib value # remove some crappy whitespaces s/\s+$//; s/^\s+//; my $ret = $_; $_ = $lo; return $ret; } # ============================================================================= # END GENERAL TAG FUNCTIONS # START GENERAL LIST FUNCTIONS # ============================================================================= # ----------------------------------------------------------------------------- # Args: search for (| separated) # string # Returns: 1 if found, 0 if not # Type: general # Description: Search for expressions # Dates: 2000-03-12 (written) # ----------------------------------------------------------------------------- sub find_in_list { my $w = shift; my $s = shift; my $lo; # print ("find_in_list: $w, $s\n") if ($debug); foreach $lo (split /\|/, $w) { if ($s !~ /^$/) { return 1 if ($s =~ /$lo/); } } return 0; } # ============================================================================= # END GENERAL LIST FUNCTIONS omt-0.1.16/doc/0000775000175000017500000000000010456536203011261 5ustar olaolaomt-0.1.16/doc/BUILD-deb0000664000175000017500000000320507440751235012576 0ustar olaola OpaL Mirror Tool Copyright (C) 2000 Ola Lundqvist $Id: BUILD-deb 1408 2002-03-04 20:01:33Z ola $ For full COPYRIGHT notice see the COPYING document. If you want more information about the program or updated versions, visit the official homepage at: http://www.opal.dhs.org/programs/omt/ or contact the author at: opal@lysator.liu.se SUMMARY: -------- This document covers the process of building debian packages. This is quite general but some orm specific issues exits. REQUIRED tools: --------------- You have to have dpkg and all related tools to make a debian packages. If you have a standard debian installation that should not be a problem but if you do not have such a distribution you can have some difficulties to install them and you are on youre own. EASY: ----- Test if everything works fine. create-release.pl --test omt version enter youre pgp private key twice. If it works you can then type: create-release.pl omt version enter youre pgp private key twice. And you have just released a new debian package. MANUALLY: --------- Hopefully the orm package have created a package that is just to build using the following commands: cd source-root (ie omt-devel) dpkg-buildpackage -rfakeroot enter youre pgp private key twice. REFERENCES: ----------- The new debian maintainers guide: http://www.debian.org/doc/maint-guide/ The debian developers reference: http://www.debian.org/doc/packaging-manuals/developers-reference/ The debian packaging manual: http://www.debian.org/doc/packaging-manuals/packaging.html/ The debian policy guide: http://www.debian.org/doc/debian-policy/omt-0.1.16/doc/MAINTAIN-deb0000664000175000017500000000536307440751235013146 0ustar olaola OpaL Mirror Tool Copyright (C) 2000 Ola Lundqvist $Id: MAINTAIN-deb 1408 2002-03-04 20:01:33Z ola $ For full COPYRIGHT notice see the COPYING document. If you want more information about the program or updated versions, visit the official homepage at: http://www.opal.dhs.org/programs/omt/ or contact the author at: opal@lysator.liu.se SUMMARY: -------- This document covers the process of maintaining a debian package. This is quite general but some orm specific issues exits. REQUIRED tools: --------------- You have to have dpkg and all related tools to make a debian packages. If you have a standard debian installation that should not be a problem but if you do not have such a distribution you can have some difficulties to install them and you are on youre own. Files in the debian directory: ------------------------------ control - Control information about the package. rules - Debian makefile to build the package. changelog - Changelogs specific to the debian build. dirs - Directories to create so that the build process should work. You probably have to edit this file. files?? - Files included in the package. By default this package does not exist and all files are included in the package. All in this case is all packages created with make install. config - Specification of what files are configuration files and therefore should be treated differen than other files. docs - Documenation files to include in the package. README.Debian - Debian specific issues about this package. If there is no such information delete that file. copyright - Copyright information for this package. This should be generated by %CPREPOSITORY% but some manual changes can be needed. *.ex - Debian example files. These files are created by the rm debex module. Upgrading to a new version: --------------------------- This should be handled by create-release.pl but here is the documentation about how to change it manually. To be written when I find out :) Testing the package: -------------------- Lintian is a good tool for checking if the debian package passes the most things in the debian policy guide. lintian -i omt*.changes If it complains about something it is most likely that that should be fixed. Lintian is very good at describing what errors occured. RELEASE the package: -------------------- See the BUILD-deb document. REFERENCES: ----------- The new debian maintainers guide: http://www.debian.org/doc/maint-guide/ The debian developers reference: http://www.debian.org/doc/packaging-manuals/developers-reference/ The debian packaging manual: http://www.debian.org/doc/packaging-manuals/packaging.html/ The debian policy guide: http://www.debian.org/doc/debian-policy/ omt-0.1.16/AUTHORS0000664000175000017500000000126207456510012011561 0ustar olaola OpaL Mirror Tool Copyright (C) 2000 Ola Lundqvist $Id: AUTHORS 1494 2002-04-15 08:32:10Z ola $ For full COPYRIGHT notice see the COPYING document. If you want more information about the program or updated versions, visit the official homepage at: http://www.opal.dhs.org/programs/omt or contact the author at: opal@lysator.liu.se ------------ Main Author: ------------ Ola Lundqvist Maintainer of the source and main author. ------------- Contributors: ------------- Paul Schreiber Added basic authentication. Sebastiaan . Suggestions for proxy support. Patch for area tag. omt-0.1.16/TODO0000664000175000017500000000166007440751235011212 0ustar olaola OpaL Mirror Tool Copyright (C) 2000 Ola Lundqvist $Id: TODO 1408 2002-03-04 20:01:33Z ola $ For full COPYRIGHT notice see the COPYING document. If you want more information about the program or updated versions, visit the official homepage at: http://www.opal.dhs.org/programs/omt or contact the author at: opal@lysator.liu.se TODO: ----- * Change from that crappy bunch of lists to "list of lists" like I wanted in the first place. See 'man perllol' for how to do that. * Make a --exclude option like --what and --store but in the reverse way. * A --order for exclude include? Like --order "exclude,include"? * New names for the --what and --store and possible another one for --exclude too. * A update uption. It should be the default one but does that work? If it is not than it is a bug that should be fixed. * Testing and finding bugs. * Fix the bugs. * Writing better documentation. omt-0.1.16/INSTALL0000664000175000017500000000301007440751235011542 0ustar olaola OpaL Mirror Tool Copyright (C) 2000 Ola Lundqvist $Id: INSTALL 1408 2002-03-04 20:01:33Z ola $ For full COPYRIGHT notice see the COPYING document. If you want more information about the program or updated versions, visit the official homepage at: http://www.opal.dhs.org/programs/omt or contact the author at: opal@lysator.liu.se INSTALLATION ------------ From tar archieve. ------------------ * First unpack the file and install the perl module LWP::UserAgent (see www.cpan.org) * Download the omt-version.tar.gz archieve. * Unpack the archieve, using: tar xfz omt-version.tar.gz * Use the program found in the package. Type 'omt --help' for help on how to use it. From deb package. ----------------- * Download the omt-version*.deb package. You will find it at http://www.opal.dhs.org/programs/omt/ * Install the package (must have root privileges), using: dpkg -i omt-version*.deb From rpm package. ----------------- * Download the perl-cpam*.i386.rpm packages. You will find it at http://www.opal.dhs.org/programs/omt/RPMS * Install the perl-cpan* packages. rpm -ivh perl-cpan* or upgrade to a new version, using: rpm -Uvh perl-cpan* * Download the omt-version.i386.rpm package. You will find it at http://www.opal.dhs.org/programs/omt/RPMS * Install the package (must have root privileges), using: rpm -ivh omt-version.i386.rpm or upgrade to a new version, using: rpm -Uvh omt-version.i386.rpm Now you should be all set. Enjoy! omt-0.1.16/ChangeLog0000664000175000017500000000263307456507540012302 0ustar olaola OpaL Mirror Tool Copyright (C) 2000 Ola Lundqvist $Id: ChangeLog 1493 2002-04-15 08:29:20Z ola $ For full COPYRIGHT notice see the COPYING document. If you want more information about the program or updated versions, visit the official homepage at: http://www.opal.dhs.org/programs/omt or contact the author at: opal@lysator.liu.se ChangeLog: ---------- 2002-04-15 Added proxy support using suggestions from Sebastan . Changed from URI::URL to URI. Removed pl extension from man and bin files. 2002-03-04 Cleaned the build code. Changed homepage url. Debian changes. 2000-11-22 Added a manual page and prepared for debian release. 2000-07-29 Added debian build support. 2000-06-02 Made it able to handle . 2000-05-30 Fixed a mkdir bug. (Thanx to Tomasz Kusy) 2000-05-01 Released version 0.1.5 2000-03-19 Added --retry feature, to make the program retry a broken url n times. Released version 0.1.3 2000-03-15 Fixed a bug that caused it to not recognize some types of html-pages. 2000-03-14 Fixed the fact that files are created even if the fetch are unsuccessful. Did also fix a bug that caused --noimages to fail. Released verision 0.1.2 2000-03-12 Tested and released 0.1.1 2000-03-11 A almost complete rewrite from version 0.1.0 2000-03-03 Released version 0.1.0 Only retreave links. Does not rewrite content. omt-0.1.16/COPYING0000664000175000017500000004310310456535200011544 0ustar olaola GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. omt-0.1.16/omt.spec0000664000175000017500000000232207440751235012171 0ustar olaola%define name omt %define ver 0.1.10 %define prefix /usr Summary: A tool for mirroring web-pages Name: %name Version: %ver Release: 1 Copyright: GPL Group: Console/ Source: http://www.opal.dhs.org/pub/programs/omt/%{name}-%{ver}.tar.gz URL: http://www.opal.dhs.org/programs/omt/ Packager:Ola Lundqvist BuildRoot: /var/tmp/%{name}-%{ver}-root Requires: perl >= 5.004 Requires: libwww %description OMT is a flexible tool for mirroring web-pages, written in perl. %changelog * Wed Nov 22 2000 Ola Lundqvist - Updated spec to version 0.1.10 (autoupdate by orm) * Sun Jul 30 2000 Ola Lundqvist - Updated spec to version 0.0.3 (autoupdate by orm) * Sat Jul 29 2000 Ola Lundqvist - Updated spec to version 0.1.9 (autoupdate by orm) * Thu Mar 30 2000 Ola Lundqvist - upgraded to 0.1.4 * Sun Mar 19 2000 Ola Lundqvist - First RPM release. %prep %setup -q -n %{name}-%{ver} %build ./configure --prefix=%{prefix} make %install make DESTDIR=$RPM_BUILD_ROOT install %clean rm -fr $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc README ChangeLog INSTALL TODO COPYING BUGS %{prefix}/bin/mirrortool.pl omt-0.1.16/man/0000775000175000017500000000000010456536203011267 5ustar olaolaomt-0.1.16/man/Makefile.in0000664000175000017500000001105207206720660013334 0ustar olaola# Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ DA = "ORM documentation." mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = man distdir: $(DISTFILES) here=`cd $(top_builddir) && pwd`; \ top_distdir=`cd $(top_distdir) && pwd`; \ distdir=`cd $(distdir) && pwd`; \ cd $(top_srcdir) \ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu man/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-exec: install-exec-am install-data-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall: uninstall-am all-am: Makefile all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-generic clean-am distclean: distclean-am maintainer-clean-am: maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: tags distdir info-am info dvi-am dvi check check-am \ installcheck-am installcheck install-exec-am install-exec \ install-data-am install-data install-am install uninstall-am uninstall \ all-redirect all-am all installdirs mostlyclean-generic \ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean install-data-hook: pod2man --center=$(DA) mirrortool.pod > mirrortool.pl.1 gzip --best *.1 mkdir -p $(DESTDIR)$(prefix)/share/man/man1 install -c -m 644 *.1.gz $(DESTDIR)$(prefix)/share/man/man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: omt-0.1.16/man/mirrortool.pod0000664000175000017500000000311207456505746014216 0ustar olaola=head1 NAME mirrortool.pl - OpaL Mirror Tool (OMT) =head1 DESCRIPTION Creates a mirror of a webpage. It has a number of features such as link rewriting and more. (See the options below). =head1 USAGE mirrortool.pl [options] [url] [options] [url] [...] =head1 OPTIONS --images : Include :s in the download. (default) --noimages : Do not include :s in the download. --depth n : Maximum recursion depth. (default 1) --store "regexp" : Files matching regexp are actually stored locally. : It is possible to | separate (with or). --rewrite "from=>to" : Urls are rewritten using this rules. : It is possible to | separate (with or). : Do not rewrite the dir, because that it will affect : later lookup. Have to fix this sometime. --what "regexp" : Files matching regexp are downloaded and traversed. : It is possible to | separate (with or). --dir basedir : Where to store local files. --nohostcheck : Do not check if url points to other host. --notreecheck : Do not check if url points to other dirtree. --force : Overwrite all files. --debug : Print debug-messages. --retry n : Number of times an url will be retried (default 1) --auth user:pass : use Basic Authentication --proxy url : Use a proxy server (like http://u:p@localhost/). --help : Print this text. =head1 AUTHOR Ola Lundqvist =head1 SEE ALSO mirrortool.pl(1) omt-0.1.16/man/Makefile0000664000175000017500000000034207456507540012736 0ustar olaolaDA = "OMT documentation." clean: -rm -f *.1.gz install: pod2man --center=$(DA) mirrortool.pod > mirrortool.1 gzip --best *.1 mkdir -p $(DESTDIR)/usr/share/man/man1 install -c -m 644 *.1.gz $(DESTDIR)/usr/share/man/man1 omt-0.1.16/NEWS0000664000175000017500000000167507456507540011234 0ustar olaola OpaL Mirror Tool Copyright (C) 2000 Ola Lundqvist $Id: NEWS 1493 2002-04-15 08:29:20Z ola $ For full COPYRIGHT notice see the COPYING document. If you want more information about the program or updated versions, visit the official homepage at: http://www.opal.dhs.org/programs/omt or contact the author at: opal@lysator.liu.se NEWS ---- Version 0.1.13: --------------- 2002-04-15 Added proxy support using suggestions from Sebastan . Changed from URI::URL to URI. Removed pl extension from man and bin files. Version 0.1.11: --------------- 2002-03-04 Cleaned build code. Changed upstream homepage. Version 0.1.10: --------------- 2000-11-22 Added a manual page and prepared for debian release. Version 0.1.9: -------------- 2000-07-29 Added debian build support. Version 0.1.8: -------------- 2000-06-01 New feature, now handles tags too. omt-0.1.16/Makefile0000664000175000017500000000024307456507540012163 0ustar olaolaclean: (cd man; make clean) install: (cd man; make install DESTDIR=$(DESTDIR)) mkdir -p $(DESTDIR)/usr/bin cp -af mirrortool.pl $(DESTDIR)/usr/bin/mirrortool omt-0.1.16/README0000664000175000017500000000407110456535200011372 0ustar olaola OpaL Mirror Tool Copyright (C) 2000 Ola Lundqvist $Id: README 2293 2006-07-16 22:15:28Z ola $ For full COPYRIGHT notice see the COPYING document. If you want more information about the program or updated versions, visit the official homepage at: http://www.opal.dhs.org/programs/omt/ or contact the author at: opal@lysator.liu.se DESCRIPTION: ------------ A tool for mirroring web pages. OpaL Mirror Tool is a program written in perl to mirror web pages or download files from the web. It has the powerful ability to rewrite the content of the pages to make a fully functional mirror and the user can specify additional rewrite rules at the command line. REQUIRES: --------- It is using the perl module LWP::UserAgent for retreaving. You have to install that package for the script to work. You can find LWP::Useragent at www.cpan.org. There is now both tar and rpm packages for youre needs. If you use the debian packages it is just to download libwww-perl and liburi-perl with dselect to install the required packages. FEATURES: --------- * Handles , and tags. * Possible to add own url rewrite rules on the command line. * Lot of options see mirrortool.pl --help for better list of features. COPYRIGHT: ---------- Copyright (C) 2000, 2006 Ola Lundqvist This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.