Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ROME dependencies to latest version. #17

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.markdown
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
feedparser-clj
==============
[![Clojars Project](https://img.shields.io/clojars/v/org.clojars.quan/feedparser-clj.svg)](https://clojars.org/org.clojars.quan/feedparser-clj)

Parse RSS/Atom feeds with a simple, clojure-friendly API.
Uses the Java ROME library, wrapped in StructMaps.
Expand Down Expand Up @@ -117,4 +118,4 @@ Distributed under the BSD-3 License.
Copyright
---------

Copyright (C) 2010 Greg Heartsfield
Copyright (C) 2010 Greg Heartsfield
11 changes: 6 additions & 5 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(defproject org.clojars.scsibug/feedparser-clj "0.5.0"
:description "Parse RSS/Atom feeds with a simple, clojure-friendly API."
:dependencies [[org.clojure/clojure "1.6.0"]
[org.jdom/jdom "2.0.2"]
[net.java.dev.rome/rome "1.0.0"]]
(defproject org.clojars.quan/feedparser-clj "0.6.0"
:description "a fork of scsibug/feedparser-clj, clojure-friendly RSS/Atom feed parser API."
:dependencies [[org.clojure/clojure "1.8.0"]
[org.jdom/jdom2 "2.0.6"]
[com.rometools/rome "1.8.0"]]
:deploy-repositories [["clojars" {:sign-releases false}]]
:main feedparser-clj.core)
10 changes: 6 additions & 4 deletions src/feedparser_clj/core.clj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
(ns feedparser-clj.core
(:import (com.sun.syndication.io SyndFeedInput XmlReader)
(:import (com.rometools.rome.io SyndFeedInput XmlReader)
(java.net URL)
(java.io InputStreamReader)
(com.sun.syndication.feed.synd SyndFeed))
(com.rometools.rome.feed.synd SyndFeed))
(:gen-class))


Expand Down Expand Up @@ -60,7 +60,8 @@

(defn make-entry "Create feed entry struct from SyndEntry"
[e]
(map->entry {:authors (map make-person (seq (.getAuthors e)))
(map->entry {:author (.getAuthor e)
:authors (map make-person (seq (.getAuthors e)))
:categories (map make-category (seq (.getCategories e)))
:contents (map make-content (seq (.getContents e)))
:contributors (map make-person (seq (.getContributors e)))
Expand All @@ -74,7 +75,8 @@

(defn make-feed "Create a feed struct from a SyndFeed"
[f]
(map->feed {:authors (map make-person (seq (.getAuthors f)))
(map->feed {:author (.getAuthor f)
:authors (map make-person (seq (.getAuthors f)))
:categories (map make-category (seq (.getCategories f)))
:contributors (map make-person (seq (.getContributors f)))
:copyright (.getCopyright f)
Expand Down