Coder Social home page Coder Social logo

podcastfeedhandler's Introduction

PodcastFeedHandler

Run Gradle on Push

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.

Key Features

  • 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

Progress

Reading and writing seems to be working, going to use in projects I have and document more.

Future plans

Add support for http://search.yahoo.com/mrss/ and http://www.rawvoice.com/rawvoiceRssModule/ xml standards like sn.xml contain.

Getting Started

Installation

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>

Reading a feed

String doc = getRawStringFromAssets("planetmoney.xml");
PodcastFeedReader podcastFeedReader = new PodcastFeedReader();

Podcast fromDoc;
try {
    fromDoc = podcastFeedReader.getPodcastFromDocument(doc);
} catch (MalformedURLException | PodcastFeedException e) {
    throw new RuntimeException(e);
}

Writing a feed

// 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 &amp; 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);
}

Development

Checking for testing library updates

Using the gradle wrapper, you can call 'dependencyUpdates' to have a plugin check for available updates.

./gradlew dependencyUpdates

Checking dependency health

Using another plugin with gradle we can call the following code to see the health of our gradle project.

./gradlew projectHealth

Support

JetBrains Logo (Main) logo.

Jetbrains supports this project through their Open Source Development - Community Support Program.

podcastfeedhandler's People

Contributors

daberkow avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.