Earl


Source link: https://github.com/einmalfel/Earl

Features

  • Earl parses both Atom and RSS 1.0/2.0
  • Supports RSS extensions (Itunes and Media RSS for now)
  • It's lightweight. There is nothing there but parser. The only dependency it has is android annotations
  • Parser produces easy-to-use immutable POJOs
  • Runs on android versions starting from Android 2.2 (API 8)

Usage

Earl is available on jcenter. Just add a dependency in your build.gradle file:

compile 'com.einmalfel:earl:1.2.0'

Simple example:

InputStream inputStream = new URL(link).openConnection().getInputStream();
 Feed feed = EarlParser.parseOrThrow(inputStream, 0);
 Log.i(TAG, "Processing feed: " + feed.getTitle());
 for (Item item : feed.getItems()) {

String title = item.getTitle();

Log.i(TAG, "Item title: " + (title == null ? "N/A" : title));
 
}
 

More complex example:

/** @return a set of keywords assigned to all items of given feed */ Set<String> getFeedKeywords(URL feedLink) {

InputStream inputStream = new URL(feedLink).openConnection().getInputStream();

Feed feed = EarlParser.parseOrThrow(inputStream, 0);

 // media and itunes RSS extensions allow to assign keywords to feed items
if (RSSFeed.class.isInstance(feed)) {

  RSSFeed rssFeed = (RSSFeed) feed;
  for (RSSItem item : rssFeed.items) {

 if (item.itunes != null) {

result.addAll(item.itunes.keywords);

 
}

 if (item.media != null) {

result.addAll(item.media.keywords);

 
}

  
}

}

 return result; 
}
 

License

Earl is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (LGPL) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Earl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See included copy of GNU LGPLv3.0 for more details. Alternatively, you can find its text at http://www.gnu.org/licenses/lgpl-3.0.txt.

Resources

An Android Library based on ZXing Library with support for Portrait Orientation and some cool stuffs.

An enhanced EditText with easy ability to get valid email from user. An error message will appear for invalid emails.

InstagRealm is a sample Android application, which shows you how to integrate some of the most popular Android libraries together.

Android Photo Editing & Sharing App.

Versatile map area / geofence utility for google maps v2 for android. Create geofence areas in your map by initializing MarkerBuilderManager.

Android Library demonstrating a material intro tutorial much like the ones on Google Sheets

This library creates an introduction screen for your application. The help tutorial takes the background colour set for each page and when scrolling between the two pages, the two colours will fade into one another.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes