Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hifly81/hirss

Transform web contents in RSS feeds
https://github.com/hifly81/hirss

apache-commons jetty jsoup pf4j rss rss-aggregator rss-feed rss-feed-parser rss-generator scraping-websites

Last synced: 13 days ago
JSON representation

Transform web contents in RSS feeds

Awesome Lists containing this project

README

        

= Transform documents in RSS feeds

hirss allows to transform no RSS documents/info in rss feeds

== Compile

You need _Apache Maven version 3.x_

From root directory open a terminal and execute:

[source,bash]
----
mvn clean compile assembly:single
----

A jar file, _hirss-1.0.jar_ will be created in _target/_ folder.

== Run

Open a terminal and execute:

[source,bash]
----
java -jar target/hirss-1.0.jar
----

A new HTTP Server listening by default on port _1225_ will start and, depending on the plugins created,
RSS XML files will be generated in _$HOME/.hirss/rss_ folder

Just add the name of the rss feed (file) generated inside _$HOME/.hirss/rss_ folder in your rss feed reader;

example: _http://127.0.0.1:1225/b10a8db164e0754105b7a99be72e3fe5_

== Configuration

Configuration is defined in _hirss.properties_; you can override these parameters:

[source,bash]
----
#binding address of HTTP Server
binding_address=127.0.0.1
#binding port of HTTP Server
port=1225
#max concurrent HTTP request
max_threads=50
#default folder where RSS XML are generated
rss_folder=.hirss/rss
#interval in milliseconds to upload the RSS
rss_update_period=5000
#timeout in seconds to establish a connection to the source
rss_connect_timeout=25000

----

== Plugin

You can create plugins simply adding a java class annotated with _@Extension_ and implementing the interface _SimpleRssDoc_.

@Extension

[source,java]
----
public class HelloWorld implements SimpleRssDoc {
.....
}
----

Your class must fetch data from somewhere (web scraping as an example) and returning an instance of java object _org.hifly.hirss.model.Rss_

For an example look at the definition of class _plugin/HelloWorld.java_

After creating your plugin simply recompile the entire project and run it.

The plugin will be automatically discovered and a new RSS XML file will be generated with your feeds.

== Third-Party Libraries

- pf4j : https://github.com/decebals/pf4j
- jsoup: http://jsoup.org
- ROME: http://rometools.github.io/rome
- jetty: http://eclipse.org/jetty
- apache commons: http://commons.apache.org
- apache commons codec: http://commons.apache.org/proper/commons-codec
- slf4j: http://www.slf4j.org