init III
This commit is contained in:
35
Perl Browse Links/extract_from_bookmarks.pl
Normal file
35
Perl Browse Links/extract_from_bookmarks.pl
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$in=$ARGV[0];
|
||||
$out=$ARGV[1];
|
||||
|
||||
if ($ARGV[1] eq "") {
|
||||
print "input und output Datei angeben!\n";
|
||||
exit 1;
|
||||
}
|
||||
print "in $in\nout $out\n";
|
||||
print "Suche nach Beginn\n";
|
||||
|
||||
open IN, "$in"; open OUT, ">>$out";
|
||||
|
||||
$s=0;
|
||||
foreach (<IN>) {
|
||||
chomp;
|
||||
if ($_ =~ /<H3 ADD_DATE="[0-9]*" LAST_MODIFIED="[0-9]*">_____<\/H3>/) {
|
||||
$s = 1; print "Beginn gefunden\n";
|
||||
next;
|
||||
}
|
||||
if ($_ =~ /<H3 ADD_DATE="[0-9]*" LAST_MODIFIED="[0-9]*">.*<\/H3>/ and $s == 1) {
|
||||
$s = 2; print "\nEnde gefunden\n";
|
||||
}
|
||||
|
||||
if ($s == 1) {
|
||||
print ".";
|
||||
($a) = $_ =~ /href="(.*?)"/i;
|
||||
printf OUT "$a\n";
|
||||
}
|
||||
if ($s == 2) {
|
||||
close IN; close OUT;
|
||||
exit 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user