cleaned up some formating, made a few thingsm more beautiful, and a few things extend around links

master
Silverwizard 10 years ago
parent d2fd035b0f
commit d7f32bb495
  1. 8
      AddItem.pl
  2. 2
      BuildCast.pl
  3. 2
      FormCast.sh

@ -3,16 +3,16 @@ use strict;
use warnings; use warnings;
open(my $fh, ">>$ARGV[0].rss") or die "File:$!"; open(my $fh, ">>$ARGV[0].rss") or die "File:$!";
my $i = 1; my $i = 2;
while($i < $#ARGV+1){ while($i < $#ARGV+1){
print $fh "\t\t<item>\n"; print $fh "\t\t<item>\n";
print $fh "\t\t\t<title> $ARGV[$i] </title>\n"; print $fh "\t\t\t<title> $ARGV[$i] </title>\n";
print $fh "\t\t\t<description> $ARGV[$i] </description>\n"; print $fh "\t\t\t<description> $ARGV[$i] </description>\n";
print $fh "\t\t\t<link>http://offsite.obscuritus.ca/$ARGV[$i]</link>\n"; print $fh "\t\t\t<link>http://$ARGV[1]$ARGV[$i]</link>\n";
print $fh "\t\t\t<guid>http://offsite.obscuritus.ca/$ARGV[$i]</guid>\n"; print $fh "\t\t\t<guid>http://$ARGV[1]$ARGV[$i]</guid>\n";
my $length = `ls -l $ARGV[$i] |cut -d ' ' -f 5`; my $length = `ls -l $ARGV[$i] |cut -d ' ' -f 5`;
chomp($length); chomp($length);
print $fh "\t\t\t<enclosure url=\"http://offsite.obscuritus.ca/$ARGV[$i]\" length=\"$length\" type=\"audio/mpeg\" />\n"; print $fh "\t\t\t<enclosure url=\"http://$ARGV[1]$ARGV[$i]\" length=\"$length\" type=\"audio/mpeg\" />\n";
$i++; $i++;
print $fh "\t\t</item>\n"; print $fh "\t\t</item>\n";

@ -11,7 +11,7 @@ print $fh "\t<channel>\n";
print $fh "\t\t<title>$ARGV[0]</title>\n"; print $fh "\t\t<title>$ARGV[0]</title>\n";
print $fh "\t\t<description>$ARGV[1]</description>\n"; print $fh "\t\t<description>$ARGV[1]</description>\n";
print $fh "\t\t<link>http://$ARGV[2]</link>\n"; print $fh "\t\t<link>http://$ARGV[2]</link>\n";
print $fh "\t\t<atom:link href=\"http://$ARGV[2]/$ARGV[0].rss\" rel=\"self\" type=\"application/rss+xml\" />\n"; print $fh "\t\t<atom:link href=\"http://$ARGV[2]$ARGV[0].rss\" rel=\"self\" type=\"application/rss+xml\" />\n";
my $todaydate = strftime("%a, %d %b %Y %H:%M:%S %z", localtime(time())); my $todaydate = strftime("%a, %d %b %Y %H:%M:%S %z", localtime(time()));
print $fh "\t\t<pubDate>$todaydate</pubDate>\n"; print $fh "\t\t<pubDate>$todaydate</pubDate>\n";
print $fh "\t\t<lastBuildDate>$todaydate</lastBuildDate>\n"; print $fh "\t\t<lastBuildDate>$todaydate</lastBuildDate>\n";

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
BuildCast.pl "$1" "$2" "$3" BuildCast.pl "$1" "$2" "$3"
AddItem.pl $1 `ls|tr '\n' ' '` AddItem.pl $1 $3 `ls|tr '\n' ' '`

Loading…
Cancel
Save