parent
35bb61f576
commit
52113308e2
@ -0,0 +1,21 @@ |
|||||||
|
#!/usr/bin/perl |
||||||
|
use strict; |
||||||
|
use warnings; |
||||||
|
|
||||||
|
open(my $fh, ">>$ARGV[0].rss") or die "File:$!"; |
||||||
|
my $i = 1; |
||||||
|
while($i < $#ARGV+1){ |
||||||
|
print $fh "\t\t<item>\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<link>http://offsite.obscuritus.ca/$ARGV[$i]</link>\n"; |
||||||
|
print $fh "\t\t\t<guid>http://offsite.obscuritus.ca/$ARGV[$i]</guid>\n"; |
||||||
|
my $length = `ls -l $ARGV[$i] |cut -d ' ' -f 5`; |
||||||
|
chomp($length); |
||||||
|
print $fh "\t\t\t<enclosure url=\"http://offsite.obscuritus.ca/$ARGV[$i]\" length=\"$length\" type=\"audio/mpeg\" />\n"; |
||||||
|
|
||||||
|
$i++; |
||||||
|
print $fh "\t\t</item>\n"; |
||||||
|
} |
||||||
|
print $fh "\t</channel>\n"; |
||||||
|
print $fh "</rss>"; |
@ -0,0 +1,22 @@ |
|||||||
|
#!/usr/bin/perl |
||||||
|
use strict; |
||||||
|
use warnings; |
||||||
|
use Time::localtime; |
||||||
|
|
||||||
|
open(my $fh, ">>$ARGV[0].rss") or die "File:$!"; |
||||||
|
|
||||||
|
print $fh "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; |
||||||
|
print $fh "<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n"; |
||||||
|
print $fh "\t<channel>\n"; |
||||||
|
print $fh "\t\t<title>$ARGV[0]</title>\n"; |
||||||
|
print $fh "\t\t<description>$ARGV[1]</description>\n"; |
||||||
|
print $fh "\t\t<link>$ARGV[2]<link>\n"; |
||||||
|
print $fh "\t\t<atom:link href=\"$ARGV[2]/$ARGV[0].rss\" rel=\"self\" type=\"application/rss+xml\" />\n"; |
||||||
|
my $monthday = localtime->mday(); |
||||||
|
my $month = localtime->mon() + 1; |
||||||
|
my $year = localtime->year() + 1900; |
||||||
|
my $hour = localtime->hour(); |
||||||
|
my $min = localtime->min(); |
||||||
|
my $sec = localtime->sec(); |
||||||
|
print $fh "\t\t<pubDate>$monthday $month $year $hour:$min:$sec </pubDate>\n"; |
||||||
|
print $fh "\t\t<lastBuildDate>$monthday $month $year $hour:$min:$sec </lastBuildDate>\n"; |
@ -0,0 +1,3 @@ |
|||||||
|
#!/bin/sh |
||||||
|
./BuildCast.pl $@ |
||||||
|
./AddItem.pl $1 `ls|tr '\n' ' '` |
@ -0,0 +1,2 @@ |
|||||||
|
This project exists to turn a set of files, typically mp3s, into a podcast. For this, the files will need to be correctly sorted or sortable. Typically, it should be run with: |
||||||
|
Podcast\ Create.pl `ls /path/to/directory/*mp3|tr '\n' ' '` within the desired directory. |
@ -0,0 +1,46 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> |
||||||
|
<channel> |
||||||
|
<title>Title</title> |
||||||
|
<description>This</description> |
||||||
|
<link>is<link> |
||||||
|
<atom:link href="is/Title.rss" rel="self" type="application/rss+xml" /> |
||||||
|
<pubDate>9 10 2014 20:34:27 </pubDate> |
||||||
|
<lastBuildDate>9 10 2014 20:34:27 </lastBuildDate> |
||||||
|
<item> |
||||||
|
<title> AddItem.pl </title> |
||||||
|
<description> AddItem.pl </description> |
||||||
|
<link>http://offsite.obscuritus.ca/Arcology/AddItem.pl</link> |
||||||
|
<guid>http://offsite.obscuritus.ca/Arcology/AddItem.pl</guid> |
||||||
|
<enclosure url="http://offsite.obscuritus.ca/Arcology/AddItem.pl" length="713" type="audio/mpeg" /> |
||||||
|
</item> |
||||||
|
<item> |
||||||
|
<title> BuildCast.pl </title> |
||||||
|
<description> BuildCast.pl </description> |
||||||
|
<link>http://offsite.obscuritus.ca/Arcology/BuildCast.pl</link> |
||||||
|
<guid>http://offsite.obscuritus.ca/Arcology/BuildCast.pl</guid> |
||||||
|
<enclosure url="http://offsite.obscuritus.ca/Arcology/BuildCast.pl" length="882" type="audio/mpeg" /> |
||||||
|
</item> |
||||||
|
<item> |
||||||
|
<title> FormCast.sh </title> |
||||||
|
<description> FormCast.sh </description> |
||||||
|
<link>http://offsite.obscuritus.ca/Arcology/FormCast.sh</link> |
||||||
|
<guid>http://offsite.obscuritus.ca/Arcology/FormCast.sh</guid> |
||||||
|
<enclosure url="http://offsite.obscuritus.ca/Arcology/FormCast.sh" length="61" type="audio/mpeg" /> |
||||||
|
</item> |
||||||
|
<item> |
||||||
|
<title> README </title> |
||||||
|
<description> README </description> |
||||||
|
<link>http://offsite.obscuritus.ca/Arcology/README</link> |
||||||
|
<guid>http://offsite.obscuritus.ca/Arcology/README</guid> |
||||||
|
<enclosure url="http://offsite.obscuritus.ca/Arcology/README" length="266" type="audio/mpeg" /> |
||||||
|
</item> |
||||||
|
<item> |
||||||
|
<title> Title.rss </title> |
||||||
|
<description> Title.rss </description> |
||||||
|
<link>http://offsite.obscuritus.ca/Arcology/Title.rss</link> |
||||||
|
<guid>http://offsite.obscuritus.ca/Arcology/Title.rss</guid> |
||||||
|
<enclosure url="http://offsite.obscuritus.ca/Arcology/Title.rss" length="1860" type="audio/mpeg" /> |
||||||
|
</item> |
||||||
|
</channel> |
||||||
|
</rss> |
Loading…
Reference in new issue