Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: Export Mail.app's RSS feed URLs in Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Export Mail.app's RSS feed URLs in Terminal
Authored by: chleuasme on Apr 13, '08 06:33:33AM
I just read your post. Here is a bash script which should allow you to import the Mail RSS feeds in NewsFire :
#!/bin/bash

of=/dev/stdout
[ $# -gt 0 ] && of=$1

cat > "$of" << HEADER
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
	<head>
		<title>Mail RSS OPML Export</title>
	</head>
	<body>
		<outline text="Mail Feeds">
HEADER

for mbox in ~/Library/Mail/RSS/*.rssmbox
do
    title=$(echo ${mbox##*/} | sed 's:.rssmbox::')
    url=$(defaults read "${mbox}/Info" RSSFeedURLString)
    echo "<outline type=\"rss\" text=\"\" title=\"$title\" xmlUrl=\"$url\" />"
done >> "$of"

cat >> "$of" << FOOTER
                </outline>
        </body>
</opml>
FOOTER
With no option, it should work the same ways the one you gave code, or you can give an output file name as argument.

[ Reply to This | # ]
10.5: Export Mail.app's RSS feed URLs in Terminal
Authored by: tiktuk on May 14, '10 03:06:33PM
This worked well after I had added (as I also noted in the comment above) another /* because I keep my feeds in folders. And afterwards I had to replace all & characters in urls with & a m p ; (without the spaces..) to make it valid xml.

[ Reply to This | # ]