<commit_before>RSS-to-Kindle Transformer based on Camel
========================================

##Overview
The application polls rss-feeds for subscriber, transforms them into ebook's mobi format using kindlegen tool
and send resulted mobi-files to email.


##Prerequisites:
1. MongoDB. It is supposed that all subscribers are stored in mongodb
2. kindlegen. kindlegen is command-line tool for transformation of documents from xml-format to mobi-format.
kindlegen is developed and supported by amazon.  kindlegen has to be deployed independently. To download kindlegen go to https://www.amazon.com/gp/feature.html?docId=1000765211
3. SMTP-server. Any SMTP-server that allows to send messages from external applications


##How to build
To build this project use

    mvn clean install -Dmaven.test.skip=true


##How to configure
The main configuration file is rss-2-kindle-camel/src/main/resources/camel-context.properties
The follwoing properties has to be configured according to certain environment:
* mongodb.host - in case of docker it should be mongo
* kindlegen.path - absolute path to kindlegen.sh 
* smtp.uri - SMTP server URI
* storage.path.root - parent folder for saving rss and mobi files 


##How to deploy
Docker is used to deploy and run necessary environment. 
Docker configuration was tested on versions:
* Docker 1.12.6
* Docker-compose 1.8.1

There are to containers that have to be run: 
* MongoDB 3.2.10: Dockerfile is located into docker-dir/mongo 
* Tomcat 9.0. Dockerfile is located into docker-dir/tomcat

To run whole environment use

    docker-compose up 

    
##How to run
* To run this project from within Maven in command-line mode use

        mvn exec:java


* To run this project from within Tomcat

        http://localhost:8080/rss2kindle/main.html


###Additional
For more help see the Apache Camel documentation

    http://camel.apache.org/<commit_msg>Formating<commit_after>RSS-to-Kindle Transformer based on Camel
========================================

## Overview
The application polls rss-feeds for subscriber, transforms them into ebook's mobi format using kindlegen tool
and send resulted mobi-files to email.


## Prerequisites:
1. MongoDB. It is supposed that all subscribers are stored in mongodb
2. kindlegen. kindlegen is command-line tool for transformation of documents from xml-format to mobi-format.
kindlegen is developed and supported by amazon.  kindlegen has to be deployed independently. To download kindlegen go to https://www.amazon.com/gp/feature.html?docId=1000765211
3. SMTP-server. Any SMTP-server that allows to send messages from external applications


## How to build
To build this project use

    mvn clean install -Dmaven.test.skip=true


## How to configure
The main configuration file is rss-2-kindle-camel/src/main/resources/camel-context.properties
The follwoing properties has to be configured according to certain environment:
* mongodb.host - in case of docker it should be mongo
* kindlegen.path - absolute path to kindlegen.sh 
* smtp.uri - SMTP server URI
* storage.path.root - parent folder for saving rss and mobi files 


## How to deploy
Docker is used to deploy and run necessary environment. 
Docker configuration was tested on versions:
* Docker 1.12.6
* Docker-compose 1.8.1

There are to containers that have to be run: 
* MongoDB 3.2.10: Dockerfile is located into docker-dir/mongo 
* Tomcat 9.0. Dockerfile is located into docker-dir/tomcat

To run whole environment use

    docker-compose up 

    
## How to run
* To run this project from within Maven in command-line mode use

        mvn exec:java


* To run this project from within Tomcat

        http://localhost:8080/rss2kindle/main.html


### Additional
For more help see the Apache Camel documentation

    http://camel.apache.org/
{'fraction_non_alphanumeric': 0.08278407592934353, 'fraction_numerical': 0.016873187450566835, 'mean_word_length': 3.9530026109660574, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4950981', 'n_tokens_mistral': 1161, 'n_tokens_neox': 1051, 'n_words': 459}