Skip to content

Commit 6dd3aa0

Browse files
authored
Merge pull request #14 from Gonzih/master
Couple of minor improvements
2 parents 4af2db8 + a4495ed commit 6dd3aa0

File tree

7 files changed

+1387
-97
lines changed

7 files changed

+1387
-97
lines changed

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
/lib/
2-
/feedparser-clj-0.3.jar
3-
/pom.xml
1+
target/
2+
.nrepl-port
3+
.lein-failures
4+
.lein-repl-history

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
jdk:
2+
- openjdk7
3+
- oraclejdk7
4+
- oraclejdk8
5+
6+
language: clojure
7+
script: lein test

README.markdown renamed to README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
feedparser-clj
1+
feedparser-clj [![Build Status](https://travis-ci.org/Gonzih/feedparser-clj.svg?branch=master)](https://travis-ci.org/Gonzih/feedparser-clj)
22
==============
33

44
Parse RSS/Atom feeds with a simple, clojure-friendly API.
@@ -33,9 +33,9 @@ The following REPL session should give an idea about the capabilities and usage
3333

3434
Load the package into your namespace:
3535

36-
user=> (ns user (:use feedparser-clj.core) (:require [clojure.contrib.string :as string]))
36+
user=> (ns user (:require [feedparser-clj.core] [clojure.string :as string]))
3737

38-
Retrieve and parse a feed:
38+
Retrieve and parse a feed:
3939

4040
user=> (def f (parse-feed "http://gregheartsfield.com/atom.xml"))
4141

@@ -55,7 +55,7 @@ Retrieve and parse a feed:
5555
`f` is now a map that can be accessed by key to retrieve feed information:
5656

5757
user=> (keys f)
58-
(:authors :categories :contributors :copyright :description :encoding :entries :feed-type :image :language :link :entry-links :published-date :title :uri)
58+
(:authors :author :categories :contributors :copyright :description :encoding :entries :feed-type :image :language :link :entry-links :published-date :title :uri)
5959

6060
A key applied to the feed gives the value, or nil if it was not defined for the feed.
6161

@@ -92,10 +92,10 @@ Find the most recently updated entry's title:
9292
user=> (first (map :title (reverse (sort-by :updated-date (:entries f)))))
9393
"Version Control Diagrams with TikZ"
9494

95-
Compute what percentage of entries have the word "haskell" in the body (uses `clojure.contrib.string`):
95+
Compute what percentage of entries have the word "haskell" in the body (uses `clojure.string`):
9696

97-
user=> (let [es (:entries f)]
98-
(* 100.0 (/ (count (filter #(string/substring? "haskell"
97+
user=> (let [es (:entries f)]
98+
(* 100.0 (/ (count (filter #(string/substring? "haskell"
9999
(:value (first (:contents %)))) es))
100100
(count es))))
101101
55.55555555555556
@@ -117,4 +117,4 @@ Distributed under the BSD-3 License.
117117
Copyright
118118
---------
119119

120-
Copyright (C) 2010 Greg Heartsfield
120+
Copyright (C) 2010 Greg Heartsfield

project.clj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
(defproject org.clojars.scsibug/feedparser-clj "0.5.0"
1+
(defproject org.clojars.gnzh/feedparser-clj "0.6.0"
22
:description "Parse RSS/Atom feeds with a simple, clojure-friendly API."
3-
:dependencies [[org.clojure/clojure "1.6.0"]
4-
[org.jdom/jdom "2.0.2"]
5-
[net.java.dev.rome/rome "1.0.0"]]
3+
:dependencies [[org.clojure/clojure "1.8.0"]
4+
[org.jdom/jdom2 "2.0.6"]
5+
[net.java.dev.rome/rome "1.0.0"]]
66
:main feedparser-clj.core)

0 commit comments

Comments
 (0)