README.md 4.02 KB
Newer Older
Melroy van den Berg's avatar
Melroy van den Berg committed
1 2
# LBRY Channel RSS Feed

3
A [LBRY](https://lbry.com/) channel [RSS](https://en.wikipedia.org/wiki/RSS) feed provider. It supports RSS v2.0, Atom and JSON outputs. And also supports links to Odysee.com.
Melroy van den Berg's avatar
Melroy van den Berg committed
4

Melroy van den Berg's avatar
Melroy van den Berg committed
5
Meaning, you can use your RSS reader to keep up-to-date with your favorite channels on LBRY / Odysee.
Melroy van den Berg's avatar
Melroy van den Berg committed
6

Melroy van den Berg's avatar
Melroy van den Berg committed
7 8
## Usage

Melroy van den Berg's avatar
Melroy van den Berg committed
9 10
### RSS

Melroy van den Berg's avatar
Melroy van den Berg committed
11
**lbry://:**
Melroy van den Berg's avatar
Melroy van den Berg committed
12

Melroy van den Berg's avatar
Melroy van den Berg committed
13
Follow your *favorite channel* by using the following **RSS** link in your RSS reader, example of EEVblog channel with **lbry://** protocol links:
Melroy van den Berg's avatar
Melroy van den Berg committed
14

Melroy van den Berg's avatar
Melroy van den Berg committed
15
- [https://lbryfeed.melroy.org/channel/eevblog](https://lbryfeed.melroy.org/channel/eevblog)
16

Melroy van den Berg's avatar
Melroy van den Berg committed
17
**Odysee.com:**
18

Melroy van den Berg's avatar
Melroy van den Berg committed
19
If you want to use links to `Odysee.com` instead of the `lbry://` protocol, use `/channel/odysee`, example:
Melroy van den Berg's avatar
Melroy van den Berg committed
20 21 22 23 24

- [https://lbryfeed.melroy.org/channel/odysee/eevblog](https://lbryfeed.melroy.org/channel/odysee/eevblog)

*Note:* Both `eevblog` and `@eevblog` are valid channel names, it doesn't matter.

Melroy van den Berg's avatar
Melroy van den Berg committed
25 26
**Claim ID:**

Melroy van den Berg's avatar
Melroy van den Berg committed
27
Providing a claim ID is supported as well:
28 29 30

- [https://lbryfeed.melroy.org/channel/eevblog:7](https://lbryfeed.melroy.org/channel/eevblog:7)

Melroy van den Berg's avatar
Melroy van den Berg committed
31
*Note:* For claim IDs use `:`-sign instead of `#`-sign.
Melroy van den Berg's avatar
Melroy van den Berg committed
32 33

### Atom
Melroy van den Berg's avatar
Melroy van den Berg committed
34 35 36

- [https://lbryfeed.melroy.org/channel/eevblog/atom](https://lbryfeed.melroy.org/channel/eevblog/atom)

Melroy van den Berg's avatar
Melroy van den Berg committed
37 38 39 40 41 42 43
Or with Odysee.com links:

- [https://lbryfeed.melroy.org/channel/odysee/eevblog/atom](https://lbryfeed.melroy.org/channel/odysee/eevblog/atom)

### JSON

- [https://lbryfeed.melroy.org/channel/eevblog/json](https://lbryfeed.melroy.org/channel/eevblog/json)
44

Melroy van den Berg's avatar
Melroy van den Berg committed
45 46 47 48 49
## Example

Example screenshot of [EEVblog](https://lbryfeed.melroy.org/channel/odysee/eevblog) in [Nextcloud News](https://apps.nextcloud.com/apps/news):

![Example of EEVblog in Nextcloud: https://lbryfeed.melroy.org/channel/odysee/eevblog](./images/example.png)
Melroy van den Berg's avatar
Melroy van den Berg committed
50

Melroy van den Berg's avatar
typo  
Melroy van den Berg committed
51
## Creator
Melroy van den Berg's avatar
Melroy van den Berg committed
52 53 54

- Melroy van den Berg

Melroy van den Berg's avatar
Melroy van den Berg committed
55
## Development
Melroy van den Berg's avatar
Melroy van den Berg committed
56 57 58

Requirements:

Melroy van den Berg's avatar
Melroy van den Berg committed
59 60 61
- [Node.js v14](https://nodejs.org/en/download/) (with npm)

Install Node:
Melroy van den Berg's avatar
Melroy van den Berg committed
62 63

```sh
Melroy van den Berg's avatar
Melroy van den Berg committed
64 65
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
Melroy van den Berg's avatar
Melroy van den Berg committed
66 67
```

Melroy van den Berg's avatar
Melroy van den Berg committed
68 69 70 71
Clone the repo: `git clone git@gitlab.melroy.org:melroy/lbry-channel-feed.git`

Go inside the git project: `cd lbry-channel-feed`

Melroy van den Berg's avatar
Melroy van den Berg committed
72 73
### Running

Melroy van den Berg's avatar
Melroy van den Berg committed
74 75 76 77 78 79 80
First install the node external depedencies packages, via: `npm install`

Start the web-server via:

```sh
npm start
```
Melroy van den Berg's avatar
Melroy van den Berg committed
81

Melroy van den Berg's avatar
Melroy van den Berg committed
82
**Note 1:** Reverse proxy (for example Nginx) is advised when you serve the server on the world-wide-web. Expose the webserver on port 443 (with SSL). See [nginx_example.conf](nginx_example.conf).
Melroy van den Berg's avatar
Melroy van den Berg committed
83

Melroy van den Berg's avatar
Melroy van den Berg committed
84
**Note 2:** Assuming you are running the LBRYnet deamon (see requirements) or running the [LBRY Desktop](https://lbry.com/get) in the background.
Melroy van den Berg's avatar
Melroy van den Berg committed
85 86 87 88 89 90 91 92 93

### Linting

Run lint: `npm run lint`

Fix lint issues: `npm run fix`

## Production

Melroy van den Berg's avatar
Melroy van den Berg committed
94 95 96 97
Requirements for production (eg. running on a Debian/Ubuntu based distro with only terminal/SSH):

- Follow the LBRYnet setup below first!
  
Melroy van den Berg's avatar
Melroy van den Berg committed
98
Starting the RSS feed, can be done via (starts inside a `screen`):
Melroy van den Berg's avatar
Melroy van den Berg committed
99 100 101

- `./start_rss_feed_prod.sh`

Melroy van den Berg's avatar
Melroy van den Berg committed
102
The RSS Feed can be started between reboots via crontab (edit via: `crontab -e`), and add the following line:
Melroy van den Berg's avatar
Melroy van den Berg committed
103 104

```sh
Melroy van den Berg's avatar
Melroy van den Berg committed
105
@reboot sh /path/to/git/archive/start_rss_feed_prod.sh
Melroy van den Berg's avatar
Melroy van den Berg committed
106 107 108 109
```

### LBRYnet setup

Melroy van den Berg's avatar
Melroy van den Berg committed
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
1. [Download the LBRY SDK](https://github.com/lbryio/lbry-sdk/releases)
2. Unpack the archive download.
3. Place the `lbrynet` binary to the `/usr/bin` directory (`cp lbrynet /usr/bin`).
4. Be sure it's executable: `sudo chmod +x /usr/bin/lbrynet`.
5. Create an user lbry the unix machine (`adduser -M lbry`).
6. Place the LBRYNet file (`lbrynet.yml`) in `/etc/lbry`, example of this file:

    ```yml
    api: 127.0.0.1:5279
    streaming_server: 127.0.0.1:5280
    allowed_origin: localhost
    data_dir: /var/lib/lbrynet
    download_dir: /var/lib/lbrynet
    wallet_dir: /var/lib/lbryum
    save_files: false
    save_blobs: false
    max_key_fee:
        currency: LBC
        amount: 0
    use_keyring: false
    ```

7. Place the [lbrynet.service systemd file](lbrynet.service) into `/etc/systemd/system` folder (for distros with systemd).
8. Starting the lbrynet service: `sudo systemctl start lbrynet`.

**Note:** LBRYNet (SDK) data will be stored into `/var/lib/lbrynet`