feedpress

RSS to Newspaper Tooling.

The Pitch

I am a big fan of RSS feeds and readers - in fact my current setup involves using a self-hosted feed processing container freshrss which is then "read" by an iOS app, reeder.

However it was occurring to me that sometimes I'd like a simple, collected, PDF with articles I found most interesting, in a newspaper format. Even if I simply read this PDF on an ipad or sent it to a printer each day, I think I'd enjoy that.

Enter feedpress:

Documentation: ./docs/index.html

The Code

github

Requisites

Building (really more like a "thanks to...")

Development

# Build in your normal and comforable way, serve via cargo:
cargo run -- --serve
# Set typst to watch the input files, so you can tinker with layouts:
typst watch templates/feedpress.typ output/feedpress.pdf --root ./
npm install
npx tailwindcss -i assets/static/input.css -o assets/static/output.css --watch

Running the feedpress.dev site locally

# While in ./site
cp ../README.md ./index.md
rm ./index.html
npx @11ty/eleventy --output ./

Running and Configuration

Running via docker

Sample docker-compose that should work and start the web-based UI:

version: "2.4"
services:
  
  #feedpress
  feedpress:
    image: sullivant/feedpress:latest
    restart: "no"
    ports:
      - 8081:8081
## if desired, volumes can be created to redirect the output directory, etc.
    volumes:
      - ./output:/output ## So we can access it easier, while developing
      - ./log:/log ## Watching logs locally not via the browser

Scheduling Editions (in docker only)

Editions can be scheduled to press by using your host's scheduled task method. Cron, Windows scheduler, etc. The process to fire off a manual edition is all we need to call:

docker exec feedpress "/app/feedpress"

Logs will append to the internal log file and the edition will be pressed the same as if you had fired it off from the web UI.

A future release may contain an internal scheduler.

Running locally (development, etc)

Get the code: [email protected]:sullivant/feedpress.git

Update some configuration. After checkout of this repository, note that there are a few "defaults" configured and a few example feeds. Without parameters, the application will run and serve a simple front end, available at http://localhost:8081/.

Configuration is located in data/config.toml

# global configurations
show_errors = false # true if you'd like to see feed collection errors
max_age = 3 # number of days old an article is skipped if it is older than
feed_limit = 2  # max number of articles to pull from a feed

# feed array
# example:
# [[feed]]
#   url = "https://yourfeedurl/rss.xml"
#   feed_limit = 10
#   section = "Personal"

From the app directory, you can run this program. It will refer to the parent directory for configurations, etc.

# Will execute a feed pull and create input files suitable for typst.
cargo run --release

# Will serve a webpage located at localhost:8081/
cargo run -- --serve

# Will show options
cargo run -- --help

The directories in this project are as follows:

./ - Root directory of this repository
./app - Contains the code to feedpress and the target binary
./assets - Contains local images used for logos, served webpage, etc.
./data - Contains configuration 
./docs - Documentation
./input - Input that is feed into typst
./output - Output PDF files for viewing or delivery
./site - Contains the source for feedpress.dev
./templates - The actual typst configuration
./templates/bookshelf.typ - How each article looks on the page
./templates/feedpress.typ - The root typst "application"; imports the other .typ files
./templates/layout.typ - The overall layout of the page

Next Steps

Scheduled v0.8.1

v0.8.0

General

feedpress.dev