Created
January 28, 2023 14:46
-
-
Save heyajulia/d5ff0d0d6c95b5c51f7231ea5ff5bcef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit sub MAIN(); | |
use XML; | |
use XML::Query; | |
sub get-urls($file-name) { | |
my $xml = from-xml-file($file-name); | |
my $xq = XML::Query.new($xml); | |
my $urls = $xq('outline[type=rss]').elements.map(*<xmlUrl>); | |
$urls.Set; | |
} | |
my $pocket-casts-urls = get-urls('pocket-casts.opml'); | |
my $overcast-urls = get-urls('overcast.opml'); | |
my $not-in-pocket-casts = $overcast-urls (-) $pocket-casts-urls; | |
my $not-in-overcast = $pocket-casts-urls (-) $overcast-urls; | |
say "Not in Pocket Casts:"; | |
.say for @$not-in-pocket-casts; | |
say "Not in Overcast:"; | |
.say for @$not-in-overcast; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment