Skip to content

Instantly share code, notes, and snippets.

@heyajulia
Created January 28, 2023 14:46
Show Gist options
  • Save heyajulia/d5ff0d0d6c95b5c51f7231ea5ff5bcef to your computer and use it in GitHub Desktop.
Save heyajulia/d5ff0d0d6c95b5c51f7231ea5ff5bcef to your computer and use it in GitHub Desktop.
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