A Java library to read and write podcast feeds. This library took a lot of inspiration from MarkusLewis - Podcast Feed Library. They made a great library, but I wanted to be able to create feed, as well as read them; their library was very good for reading, but would need a lot of work to make it a writing library.
- Reading/Writing Podcast feeds, reading local files and remote
- Java 11+ compatible
- Tested, Built, Signed, and Published with GitHub actions to Maven Central
- No dependencies, 100% self contained and native code
Reading and writing seems to be working, going to use in projects I have and document more.
Add support for http://search.yahoo.com/mrss/ and http://www.rawvoice.com/rawvoiceRssModule/ xml standards like sn.xml contain.
This library is available in Maven Central!
Gradle
implementation group: 'co.ntbl', name: 'podcastfeedhandler', version: '0.1.1'
Maven
<dependency>
<groupId>co.ntbl</groupId>
<artifactId>podcastfeedhandler</artifactId>
<version>0.1.1</version>
</dependency>
String doc = getRawStringFromAssets("planetmoney.xml");
PodcastFeedReader podcastFeedReader = new PodcastFeedReader();
Podcast fromDoc;
try {
fromDoc = podcastFeedReader.getPodcastFromDocument(doc);
} catch (MalformedURLException | PodcastFeedException e) {
throw new RuntimeException(e);
}
// The required fields are title, description, iTunes Image (artwork), language, iTunes categories,
// iTunes is explicit.
Podcast myPodcast = new Podcast("My awesome podcast", "Podcast about my breakfast",
"http://ntbl.co/image.jpg", "en-US", "Society & Culture|Personal Journals",
"true");
Episode singleEpisode = new Episode("My big Omelet", "https://ntbl.co/media/1.mp3", 9234751L, "audio/mpeg");
myPodcast.addEpisode(singleEpisode);
PodcastFeedWriter podcastFeedWriter = new PodcastFeedWriter();
String xml;
try {
xml = podcastFeedWriter.getXml(myPodcast);
} catch (ParserConfigurationException | TransformerException e) {
throw new RuntimeException(e);
}
Using the gradle wrapper, you can call 'dependencyUpdates' to have a plugin check for available updates.
./gradlew dependencyUpdates
Using another plugin with gradle we can call the following code to see the health of our gradle project.
./gradlew projectHealth