Adding feeds from an OPML file to a Microsub server with xmlstarlet and Ekster (ek)

xmlstarlet sel -t -v "//outline/@xmlUrl" hotlist.opml  | xargs -n 1 ek follow mtjTXQELiT60Wtm5ArVcLo5G

The first part parses the xmlUrls from the OPML file. This won't work if you have feeds seperated in Channels, but it will work with the list from http://feedbase.io, because all feeds are on the first level.

xmlstarlet sel -t -v "//outline/@xmlUrl" hotlist.opml

Then the next part pipes all url to microsub command line client one at a time.

| xargs -n 1

And the command line client will add the feeds to the microsub server on the channel with id mtjTXQELiT60Wtm5ArVcLo5G. You should use the id of your own channel.

ek follow mtjTXQELiT60Wtm5ArVcLo5G

Other steps are

Connection to your microsub server - Connect with URL = your homepage url.

ek connect URL

Go to the url it shows and allow the connection it will save a token and the endpoints in ~/.config/microsub.

Then create or find the channel where you want to add the urls.

ek channels   # to find the channels, it will lists the available channels

Or

ek channels NAME   # to create a channel with NAME.