Skip to content

hifly81/hirss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

mvn clean compile assembly:single

A jar file, hirss-1.0.jar will be created in target/ folder.

Run

Open a terminal and execute:

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;

Configuration

Configuration is defined in hirss.properties; you can override these parameters:

#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

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.