RSS Aggregator for Gemini Protocol
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yggverse 30bf68267e simplify construction 2 months ago
example implement build-in gemini server 2 months ago
src simplify construction 2 months ago
.gitignore implement build-in gemini server 2 months ago
LICENSE Initial commit 2 months ago
README.md add pulsar.yggverse.dedyn.io instance 2 months ago
composer.json implement build-in gemini server 2 months ago

README.md

Pulsar

RSS Aggregator for Gemini Protocol

Simple RSS feed converter to static Gemtext format, useful for news portals or localhost reading

Example

  • gemini://[301:23b4:991a:634d::feed] - Yggdrasil instance by YGGverse
    • gemini://pulsar.yggverse.dedyn.io - Internet alias

Usage

  1. git clone https://github.com/YGGverse/Pulsar.git
  2. cp example/crawler.json crawler.json - setup your feed locations
  3. php src/crawler.php - grab feeds manually or using crontab

Config

Configuration file supports multiple feed channels with custom settings:

  • source - string, filepath or URL to the valid RSS feed
  • target - string, relative or absolute path to Gemtext dumps
  • item
    • limit - integer, how many items to display on page generated
    • template - string, custom pattern for feed item, that supports following macros
      • {nl} - new line separator
      • {link} - item link
      • {guid} - item guid
      • {pubDate} - item pubDate, soon with custom time format e.g. {pubDate:Y-m-d H:s}
      • {title} - item title
      • {description} - item description

Resulting files could be placed to any local folder (for personal reading) or shared with others (using gmid, twins or any other server for gemtext statics)

Server

Pulsar comes with build-in Titan-II server implementation.

It's especially useful for Yggdrasil users, who wish to host their feeds using plain IPv6 0200::/7 addresses without domain in CN record. Build-in server contain this feature implemented from the box.

Setup

  • cd Pulsar - navigate to the project folder
  • composer update - download server dependencies with Composer
  • mkdir server/127.0.0.1 - init server location (you can define any other destination, server just git ignored)
  • cp example/host.json server/127.0.0.1/host.json - copy configuration example to the destination folder
  • cd server/127.0.0.1 - navigate to server folder created and generate new self-signed certificate

On example above, certificate could be generated with following command:

openssl req -x509 -newkey rsa:4096 -keyout key.rsa -out cert.pem -days 365 -nodes -subj "/CN=127.0.0.1"
  • tip: for IPv6 address, just skip square brackets from CN value

Launch

  • php src/server.php server/127.0.0.1 - supported relative or absolute paths (for systemd service)

Open gemini://127.0.0.1 in Gemini browser!

Autostart

Launch server as systemd service

Following example means you have Pulsar installed in home directory of pulsar user (useradd -m pulsar)

  1. sudo nano /etc/systemd/system/pulsar.service - create new service file by following example:
[Unit]
After=network.target

[Service]
Type=simple
User=pulsar
ExecStart=/usr/bin/php /home/pulsar/Pulsar/src/server.php /home/pulsar/Pulsar/server/127.0.0.1
StandardOutput=file:/home/pulsar/Pulsar/server/127.0.0.1/debug.log
StandardError=file:/home/pulsar/Pulsar/server/127.0.0.1/error.log
Restart=on-failure

[Install]
WantedBy=multi-user.target
  1. sudo systemctl daemon-reload - reload systemd configuration
  2. sudo systemctl enable pulsar - enable Pulsar service on system startup
  3. sudo systemctl start pulsar - start Pulsar server