Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
milesmcc committed Feb 15, 2018
1 parent e0d6c79 commit 9d16a75
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ LibreNews uses a few terms that you may be unfamiliar with in its API and UI.

### 1.1 Screenshots

![The web interface of LibreNews](images/web_interface.png) _(The web interface of LibreNews)_
![The web interface of LibreNews](images/new_web_interface.png) _(The web interface of LibreNews)_

![LibreNews Starting](images/cli.png) _(LibreNews starting up!)_

Expand Down Expand Up @@ -87,9 +87,13 @@ To start a LibreNews server, first make sure that you have `Python 2` and `pip`
- `tornado`
- `tweepy`
- `python-geoip`
- `pymongo`
- `pywebpush`

(These dependencies are also listed in `requirements.txt`, so they can all be installed at once once the repository is cloned to your local machine with `pip install -r requirements.txt`.)

Also install a MongoDB server, so that LibreNews can store `push` subscriptions. On Ubuntu machines, this can be accomplished with `sudo apt install mongodb`.

Once you have all of these installed, you can download LibreNews if you haven't already. This is done by navigating into the parent directory where you would like to place the root LibreNews folder and running `git clone https://github.com/milesmcc/LibreNews-Server.git`. A new folder, `LibreNews-Server`, will be created.

Navigate to the directory in which you would like for LibreNews to create its configuration file (`LibreNews-Server/src` is fine) and run `python webserver.py`. Remember that if you're not running LibreNews out of the `src` directory, you'll need to reference `webserver.py` using its absolute or relative path.
Expand All @@ -101,30 +105,26 @@ LibreNews will then detect that it has not been set up, and will generate a conf
The newly generated config will look something like this:

```
{
"accounts": [
[
"@BBCBreaking",
"BBC",
"Breaking News"
],
[
"@LibreNewsApp",
"LibreNews",
"Announcements"
]
],
"twitter": {
"access_token": "XXXXX",
"access_token_secret": "XXXXX",
"consumer_key": "XXXXX",
"consumer_secret": "XXXXX"
}
"twitter": {
"consumer_key": "XXXXX",
"consumer_secret": "XXXXX",
"access_token": "XXXXX",
"access_token_secret": "XXXXX"
},
"accounts": [
["@BBCBreaking", "BBC", "Breaking News"],
["@LibreNewsApp", "LibreNews", "Announcements"]
],
"vapid": {
"private_key": "XXXXX",
"public_key": "XXXXX",
}
```

Get your credentials from Twitter at <https://apps.twitter.com>. Configure the accounts that you would like LibreNews-Server to monitor. The first field is the account's Twitter handle, the second field is its human readable source name, and the third field is for the channel the account belongs to.

Then, create a VAPID key pair using any tool, either online or local. Remember to keep these keys private and properly inserted in the config.

Once you correctly input your Twitter credentials, run `webserver.py` once more (in the exact same way) and watch as the server magically comes online at port `8888`. If you navigate to `http://localhost:8888` in your browser, you should find the beautiful LibreNews home page! This LibreNews server implementation has no database.

For production servers, it's heavily recommended that you use nginx as a reverse proxy. That way, you'll be able to accept standard HTTP and HTTPS requests on ports 80 and 443, respectively. (That is, if you choose to even process HTTP requests -- because the server at <https://librenews.io> _doesn't!_)
Expand Down
Binary file added images/new_web_interface.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9d16a75

Please sign in to comment.