• Stars
    star
    246
  • Rank 164,726 (Top 4 %)
  • Language
    Go
  • License
    GNU General Publi...
  • Created almost 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Journalist. An RSS aggregator.

Journalist

Tests Release Docker

journalist

Journalist. An RSS aggregator.

What is journalist?

Journalist is an RSS aggregator that can sync subscriptions and read/unread items across multiple clients without requiring a special client-side integration. Clients can use Journalist by simply subscribing to its personalized RSS feed.

Journalist aims to become a self-hosted alternative to services like Feedly, Feedbin and others. It aims to offer a similar set of features like FreshRSS, NewsBlur and Miniflux while being easier to set up/maintain and overall more lightweight.

Find out more about Journalist here. If you're looking for pre-v1.0.0 versions of Journalist, please check out the v0 branch. v1.0.0 and later versions are not compatible to / upgradeable from pre-v1.0.0 versions!

Usage

Journalist is a single binary service can be run on any Linux/Unix machine by setting the required configuration values and launching the journalist program.

Before using Journalist from an RSS client, it first requires configuration and deployment.

Getting Started

As soon as Journalist was configured and deployed properly, a new user can be added using the admin user that Journalist creates automatically (default login: admin:admin).

First, make sure to export JOURNALIST_API_URL in the current terminal session:

$ export JOURNALIST_API_URL="http://127.0.0.1:8000/api"

Then, using Redacteur, a new user can be added like this:

$ JOURNALIST_API_USERNAME=admin JOURNALIST_API_PASSWORD=admin \
  ./redacteur add user
Username: johndoe
Password: MySecretPassword123
Role (admin/[user]): user

Next, a new QAT (Quick Access Token) for the user can be issued:

$ JOURNALIST_API_USERNAME=johndoe JOURNALIST_API_PASSWORD=MySecretPassword123 \
  ./redacteur add token
Token name: FeederAndroidClient

Copy the token from the JSON response, as this is required to subscribe to the Journalist feed.

Next, add a new feed to the user (a.k.a. subscribe to):

$ JOURNALIST_API_USERNAME=johndoe JOURNALIST_API_PASSWORD=MySecretPassword123 \
  ./redacteur add feed
URL: https://xn--gckvb8fzb.com
Name: マリウス
Group: Journals

Feel free to add further feeds the same way. Group describes a folder underneath the feed should be grouped. Groups can be named freely.

With the Quick Access Token (token) that was copied previously, the following URL can now be added to any RSS feed reader:

http://127.0.0.1:8000/web/subscriptions?qat=TOKEN-HERE

More information and RSS feed URLs can be found under Web.

Configuration

Journalist will read its config either from a file or from environment variables. Every configuration key available in the example journalist.toml can be exported as environment variable, by separating scopes using _ and prepend JOURNALIST to it. For example, the following configuration:

[Server]
BindIP = "0.0.0.0"

... can also be specified as an environment variable:

export JOURNALIST_SERVER_BINDIP="0.0.0.0"

Journalist will try to read the journalist.toml file from one of the following paths:

  • /etc/journalist.toml
  • $XDG_CONFIG_HOME/journalist.toml
  • $HOME/.config/journalist.toml
  • $HOME/journalist.toml
  • $PWD/journalist.toml

Database

Journalist requires a database to store users and subscriptions. Supported database types are SQLite, PostgreSQL and MySQL. The database can be configured using the JOURNALIST_DATABASE_TYPE and JOURNALIST_DATABASE_CONNECTION env, or the Database.Type and Database.Connection config properties.

WARNING: If you do not specify a database configuration, Journalist will use an in-memory SQLite database! As soon as Journalist shuts down, all data inside the in-memory database is gone!

SQLite File Example

[Database]
Type = "sqlite3"
Connection = "file:my-database.sqlite?cache=shared&_fk=1"

PostgreSQL Example (using Docker for PostgreSQL)

Run the database:

docker run -it --name postgres \
  -e POSTGRES_PASSWORD=postgres \
  -e POSTGRES_DB=journalist \
  -p 127.0.0.1:5432:5432 \
  -d postgres:alpine

Configure Database.Type and Database.Connection:

[Database]
Type = "postgres"
Connection = "host=127.0.0.1 port=5432 dbname=journalist user=postgres password=postgres"

MySQL Example

[Database]
Type = "mysql"
Connection = "mysqluser:mysqlpassword@tcp(mysqlhost:port)/database?parseTime=true"

Deployment

Custom

All that's needed is a configuration and Journalist can be launched by e.g. running ./journalist in a terminal.

Supervisor

To run Journalist via supervisord, create a config like this inside /etc/supervisord.conf or /etc/supervisor/conf.d/journalist.conf:

[program:journalist]
command=/path/to/binary/of/journalist
process_name=%(program_name)s
numprocs=1
directory=/home/journalist
autostart=true
autorestart=unexpected
startsecs=10
startretries=3
exitcodes=0
stopsignal=TERM
stopwaitsecs=10
user=journalist
redirect_stderr=false
stdout_logfile=/var/log/journalist.out.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB
stdout_events_enabled=false
stderr_logfile=/var/log/journalist.err.log
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10
stderr_capture_maxbytes=1MB
stderr_events_enabled=false

Note: It is advisable to run Journalist under its own, dedicated daemon user (journalist in this example), so make sure to either adjust directory as well as user or create a user called journalist.

OpenBSD rc

As before, create a configuration file under /etc/journalist.toml.

Then copy the example rc.d script to /etc/rc.d/journalist and copy the binary to e.g. /usr/local/bin/journalist. Last but not least, update the /etc/rc.conf.local file to contain the following line:

journalist_user="_journalist"

It is advisable to run journalist as a dedicated user, hence create the _journalist daemon account or adjust the line above according to your setup.

You can now run Journalist by enabling and starting the service:

rcctl enable journalist
rcctl start journalist

systemd

TODO

Docker

Official images are available on Docker Hub at mrusme/journalist and can be pulled using the following command:

docker pull mrusme/journalist

GitHub release versions are available as Docker image tags (e.g. 1.0.0). The latest image tag contains the latest code of the master branch.

It's possible to build journalist locally as a Docker container like this:

docker build -t journalist:latest . 

It can then be run using the following command:

docker run -it --rm --name journalist \
  -e JOURNALIST_... \
  -e JOURNALIST_... \
  -p 0.0.0.0:8000:8000 \
  journalist:latest

Alternatively a configuration TOML can be passed into the container like so:

docker run -it --rm --name journalist \
  -v /path/to/my/local/journalist.toml:/etc/journalist.toml \
  -p 0.0.0.0:8000:8000 \
  journalist:latest

Kubernetes

TODO

Render

Fork this repo into your GitHub account, adjust the render.yaml accordingly and connect the forked repo on Render.

Alternatively, you can also directly connect this public repo.

Heroku

Deploy

DigitalOcean App Platform

Deploy to DO

Alternatively, fork this repo into your GitHub account, adjust the .do/app.yaml accordingly and connect the forked repo on DigitalOcean.

DigitalOcean Function

Available soon.

Aamazon Web Services Lambda Function

TODO

Google Cloud Function

gcloud functions deploy GCFHandler --runtime go116 --trigger-http

TODO: Database

API

Journalist provides an HTTP REST API for managing user accounts, tokens and feeds, which is available through the /api/v1 endpoint. A full OpenAPI/Swagger documentation of the API can be found inside the docs/ folder.

Redacteur

This repository comes with a handy client for the Journalist API called Redacteur. Redacteur can be used to perform actions on the API, either by manually specifying the exact API request (redacteur perform ...) or by using a shorthand function like create user, which runs interactively.

Find out more by running redacteur help.

Web

/web is the HTTP web endpoint of Journalist that serves aggregated RSS feeds as well as action endpoints that allow for example marking items as read.

To subscribe to a Journalist user's aggregated RSS feed a Quick Access Token is required. It can be generated using Redacteur.

With the QAT, any RSS feed reader can subscribe to the following URL:

<JOURNALIST_SERVER_ENDPOINT_WEB>/subscriptions?qat=<TOKEN>

Additionally, subscriptions can be separated by group, simply by adding the group parameter to the URL:

<JOURNALIST_SERVER_ENDPOINT_WEB>/subscriptions?qat=<TOKEN>&group=Journals

With that, only feeds within the Journal group will be included in the RSS feed.

Mark as Read

Feed items can be marked as read using the inline Journalist menu that is injected on the top of every RSS item. It contains a link to an actions endpoint of Journalist that will mark either a single item or a specific range of items as read. This will result in these items not showing up in the Journalist subscription feed anymore. This way every other client that will eventually refresh the feed won't see these items anymore and hopefully not display them.

You might need to adjust client settings in order to disable caching of items. Additionally, if a client has previously synced the items, it might not automatically remove them from the feed. Whether and how good this works depends on the client's implementation.

Development

First, install all required dependencies by running the following command in the repository folder:

make install-deps

You can then build Journalist by running make:

make

This will build a binary called journalist.

More Repositories

1

superhighway84

USENET-inspired, uncensorable, decentralized internet discussion system running on IPFS & OrbitDB
Go
580
star
2

neonmodem

Neon Modem Overdrive
Go
212
star
3

reader

reader is for your command line what the “readability” view is for modern browsers: A lightweight tool offering better readability of web pages on the CLI.
Go
166
star
4

zeit

Zeit, erfassen. A command line tool for tracking time spent on activities.
Go
137
star
5

canard

Canard. A command line TUI client for the journalist RSS aggregator.
Go
126
star
6

gomphotherium

Gomphotherium (/ˌɡɒmfəˈθɪəriəm/; "welded beast"), a command line Mastodon client.
Go
85
star
7

mercator

OpenStreetMap but as terminal user interface (TUI) program
Go
63
star
8

kiwi

Pimoroni Keybow based, WiFi-enabled Macro Pad (a.k.a. poor-man's Elgato Stream Deck)
Elixir
54
star
9

planor

The Cloud Aviator: TUI client for cloud services (AWS, Vultr, Heroku, Render.com, Fleek, ...)
Go
49
star
10

dotfiles

dotfiles
Vim Script
48
star
11

lemon

Lemon – LED Monitor – is a $79.43 opensource alternative to LaMetric that supports GitHub-, IFTTT- and Zapier-webhooks and even integrates with Pushover!
Python
47
star
12

snoo

A Reddit command line client written in Node.js, using modern ES-features
JavaScript
41
star
13

ninjaberry

Ninjaberry: Raspberry Pi UI for @Bettercap
Python
39
star
14

palm-webos-development-tmbundle

Palm webOS (formerly Palm Pre) Development Bundle for TextMate
33
star
15

geld

Geld. A command line tool for tracking money and budgets.
Go
32
star
16

xbsapi

Alternative xBrowserSync API that is a single binary and supports SQLite3, PostgreSQL and MySQL
Go
27
star
17

addrb

addrb: A lightweight CLI / TUI address book that supports CardDAV
Go
26
star
18

conclusive

Conclusive. A command line client for Plausible Analytics.
Rust
24
star
19

node-socket-laravel-session

This is an example of how to check a Laravel request for a valid session within Node.js/Socket.io
JavaScript
22
star
20

wth

What The Heck: The better personal information dashboard for your terminal
Go
22
star
21

caldr

A lightweight CLI / TUI calendar that supports CalDAV
Go
20
star
22

lbaction-npm

NPM (LauchBar 6 Action)
JavaScript
17
star
23

cexec

Execute any command, cache its output and get cached output on subsequent execution
Go
14
star
24

synology-btsync-fix

Synology BitTorrent Sync (btsync) Fix
Shell
12
star
25

torqer

Ready-to-use Tor proxy Docker container, with privoxy on top.
Shell
10
star
26

cloudcash

Check your cloud spending from the CLI, from Waybar, and from the macOS menu bar!
Go
9
star
27

hue2influx

Sync Philips Hue component states to InfluxDB.
Python
9
star
28

bookmarkdown

A super lightweight tool for accessing links from a markdown file
Go
6
star
29

melon

Melon – Multimedia- & Entertainment Linking and Operation Node – is a daemon that allows linking media devices (e.g. Sonos, Televisions) and operating them through one API
Python
5
star
30

lbaction-stockprice

Stock Price (LaunchBar 6 Action)
JavaScript
5
star
31

pushover-to-xmpp

Tiny Pushover to XMPP bridge written in Go
Go
5
star
32

paperknife.js

paperknife.js is a RFC 2822 compliant e-mail address parser/validator developed with PEG.js.
PEG.js
5
star
33

go-poolsuite

Poolsuite FM player as Go module
Go
5
star
34

uveira

Offline Wikipedia CLI for dumpster-dive MongoDB imports
Go
4
star
35

mrusme

@mrusme
4
star
36

tdrs

Weltraum TDRS is a lightweight ZeroMQ-based event hub.
C++
4
star
37

lbaction-ssh

SSH (LaunchBar Action)
JavaScript
4
star
38

fpmail

Fetch- & Procmail Docker Container
Dockerfile
4
star
39

marine_diesel

Elixir client library for the Docker API.
Elixir
4
star
40

primacorn

Test your crappy [Primacom](https://www.primacom.de) cable internet connection for packet losses and automatically report them to Primacom.
Ruby
4
star
41

RIOT-drivers

This repository contains of implementations of various sensor/device drivers for @RIOT-OS
C
3
star
42

tdrs-node

TDRS Node.js client reference implementation
JavaScript
3
star
43

symmetry454

A Go implementation of the Symmetry454 calendar.
Go
3
star
44

cmdr

A minimalistic single-binary tool that can be used as Docker ENTRYPOINT to run multiple commands simultaneously
Rust
3
star
45

deb-builder

Idiomatic Debian Package Builder
Dockerfile
2
star
46

distccd

distcc (daemon) docker container
Dockerfile
2
star
47

mrusme.github.io

About @mrusme
2
star
48

xbscli

Command line interface for xbsapi and the official xBrowserSync API
Go
2
star
49

aieq

Adafruit/Arduino Indoor Environmental Quality
C++
2
star
50

go-fleek

Tiny Go client library for the Fleek API
Go
2
star
51

go-render

Tiny Go client library for the Render.com API
Go
2
star
52

pieq

(Raspberry) Pie Indoor Environmental Quality
Python
2
star
53

image2kiwi

Converter from Images (JPEG, PNG, GIF, ...) into Kiwi `frames` JSON-arrays.
Python
2
star
54

overpush

A self-hosted, drop-in replacement for Pushover, that uses XMPP as delivery method and offers the same API for submitting messages, so that existing setups (e.g. Grafana) can continue working and only require changing the API URL.
Go
2
star