<commit_before># Sitebag

Sitebag is a "read-it-later" REST server; a self-hostable web application
to store web pages. It saves the complete page (including images) as well
as the extracted main content. You can read the saved pages using a browser
or rss reader; or create another rest client.

Sitebag is compatible to [wallabag](https://github.com/wallabag/wallabag),
meaning that it responds to its url endpoints. This way you can use their
nice android and iOS clients as well as their browser extension with sitebag.

There is a basic web ui provided, too.

## Dependencies

* [jsoup](https://github.com/jhy/jsoup/) is used for html content
  extraction
* [spray](http://spray.io) provides the http stack
* [reactivemongo](http://reactivemongo.org/) connects the app to a
  mongo database and
* [porter](https://github.com/eikek/porter) provides authentication
  and user management
* full text searching is done by [lucene](http://lucene.apache.org/)

The ui templates are processed by [twirl](https://github.com/spray/twirl)
and [bootstrap](http://getbootstrap.com) is used to provide a responsive
site. You can choose from free [bootswatch](http://bootswatch.com/)
themes. Additionally, [mustache](https://github.com/janl/mustache.js) and
[spinjs](http://fgnass.github.io/spin.js/) are at work.

## Building

The build tool [sbt](http://scala-sbt.org) can compile the sources and
create deployable artifacts:

    sbt dist

will create a zip file, ready to start.

## Installation

#### 1. Install MongoDB and JRE

SiteBag needs a running MongoDB and Java 1.7.

#### 2. Download sitebag zip file

Unpack the zip file somewhere. You can have a look at the configuration
file `etc/sitebag.conf`. If you have mongodb running on some other port,
you'll need to update this file.

#### 3. Starting up

For linux, simply execute the script `bin/start.sh`. There is no windows
`.bat` version yet.

#### 4. Add user account

You'll need to setup an account with sitebag. The very first account
cannot be setup via the web interface. Please use the following steps to
add a admin user, with all permissions. In a terminal type:

    $ telnet localhost 9996
    > update realm
    name: default<commit_msg>adds download link to readme<commit_after># Sitebag

Sitebag is a "read-it-later" REST server; a self-hostable web application
to store web pages. It saves the complete page (including images) as well
as the extracted main content. You can read the saved pages using a browser
or rss reader; or create another rest client.

Sitebag is compatible to [wallabag](https://github.com/wallabag/wallabag),
meaning that it responds to its url endpoints. This way you can use their
nice android and iOS clients as well as their browser extension with sitebag.

There is a basic web ui provided, too.

## Dependencies

* [jsoup](https://github.com/jhy/jsoup/) is used for html content
  extraction
* [spray](http://spray.io) provides the http stack
* [reactivemongo](http://reactivemongo.org/) connects the app to a
  mongo database and
* [porter](https://github.com/eikek/porter) provides authentication
  and user management
* full text searching is done by [lucene](http://lucene.apache.org/)

The ui templates are processed by [twirl](https://github.com/spray/twirl)
and [bootstrap](http://getbootstrap.com) is used to provide a responsive
site. You can choose from free [bootswatch](http://bootswatch.com/)
themes. Additionally, [mustache](https://github.com/janl/mustache.js) and
[spinjs](http://fgnass.github.io/spin.js/) are at work.

## Building

The build tool [sbt](http://scala-sbt.org) can compile the sources and
create deployable artifacts:

    sbt dist

will create a zip file, ready to start.

## Installation

#### 1. Install MongoDB and JRE

SiteBag needs a running MongoDB and Java 1.7.

#### 2. [Download](https://eknet.org/main/projects/sitebag/download.html) sitebag zip file

Unpack the zip file somewhere. You can have a look at the configuration
file `etc/sitebag.conf`. If you have mongodb running on some other port,
you'll need to update this file.

#### 3. Starting up

For linux, simply execute the script `bin/start.sh`. There is no windows
`.bat` version yet.

#### 4. Add user account

You'll need to setup an account with sitebag. The very first account
cannot be setup via the web interface. Please use the following steps to
add a admin user, with all permissions. In a terminal type:

    $ telnet localhost 9996
    > update realm
    name: default
{'fraction_non_alphanumeric': 0.0947814451382694, 'fraction_numerical': 0.0044603033006244425, 'mean_word_length': 4.114025085518814, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 11, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5337134', 'n_tokens_mistral': 1343, 'n_tokens_neox': 1270, 'n_words': 581}