šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

github.com/arran4/abc-kohler-report-rss

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/arran4/abc-kohler-report-rss

v0.0.11
Source
Go
Version published
Created
Source

README

Overview

This application scrapes the "Kohler Report" section of ABC News and generates an RSS feed. It supports both CLI and CGI modes.

Installation

Prerequisites

  • Go (if building from source)

Optional

  • Apache or Nginx (for serving RSS files)

Build and Install

Install only (System level)

Grab the latest binary here: https://github.com/arran4/abc-kohler-report-rss/releases/

Install and build as user (User)

Install go 1.23+

Run go install:

go install github.com/arran4/abc-kohler-report-rss/cmd/abckohlerreportrss@latest

This installs to $HOME/go/bin (typically; check with go env).

Usage

CLI Mode

Generate RSS Feed:

abckohlerreportrss -output /var/www/localhost/htdocs/rss/abckohlerreportrss.xml

CGI Mode

  • Place abckohlerreportrss-cgi in your server's CGI directory (e.g., /var/www/htdocs/cgi-bin/abckohlerreportrss-cgi).
  • Ensure it is executable:
    chmod +x /var/www/htdocs/cgi-bin/abckohlerreportrss-cgi
    
  • Access it via URL (e.g., http://example.com/cgi-bin/abckohlerreportrss-cgi).

Deployment

rc.d (Cron Job system level)

Add a cron job to run the script periodically:

  • Edit the root crontab:
    sudo crontab -e
    
  • Add the following line:
    */15 * * * * /usr/local/bin/abckohlerreportrss -output /var/www/localhost/htdocs/rss/abckohlerreportrss.xml
    

rc.d (Cron Job user level)

Add a cron job to run the script periodically:

  • Edit the user's crontab:
    crontab -e
    
  • Add the following line:
    */15 * * * * ~/go/bin/abckohlerreportrss -output ~/public_html/rss/abckohlerreportrss.xml
    

systemd (as root)

  • Create a systemd service file at /etc/systemd/system/abckohlerreportrss.service:
[Unit]
Description=ABC News Kohler Report RSS Feed Creator

[Service]
Type=oneshot
ExecStart=/usr/bin/abckohlerreportrss -output /var/www/localhost/htdocs/rss/abckohlerreportrss.xml
User=apache
Group=apache
  • Create a systemd timer file at /etc/systemd/system/everyhour@.timer:
[Unit]
Description=Monthly Timer for %i service

[Timer]
OnCalendar=*-*-* *:00:00
AccuracySec=1h
RandomizedDelaySec=1h
Persistent=true
Unit=%i.service

[Install]
WantedBy=default.target
  • Reload systemd and start the service:
    sudo systemctl daemon-reload
    sudo systemctl enable --now everyhour@abckohlerreportrss.timer
    

systemd (as user)

  • Create a systemd service file at $HOME/.config/systemd/user/abckohlerreportrss.service:
[Unit]
Description=ABC News Kohler Report RSS Feed Creator

[Service]
Type=oneshot
ExecStart=%h/go/bin/abckohlerreportrss -output %h/public_html/rss/abckohlerreportrss.xml
  • Create a systemd timer file at $HOME/.config/systemd/user/everyhour@.timer:
[Unit]
Description=Monthly Timer for %i service

[Timer]
OnCalendar=*-*-* *:00:00
AccuracySec=1h
RandomizedDelaySec=1h
Persistent=true
Unit=%i.service

[Install]
WantedBy=default.target
  • Reload systemd and start the service:
    systemctl --user daemon-reload && systemctl --user enable --now everyhour@abckohlerreportrss.timer
    

Apache VirtualHost Configuration

User

Refer to documentation for setting up public_html directories

Enjoy

http://localhost/~$USERNAME/rss/abckohlerreportrss.xml

System

Add the following configuration to your Apache setup (e.g., /etc/httpd/conf.d/rss.conf):

<VirtualHost *:80>
    ServerName example.com
    DocumentRoot /var/www/localhost/htdocs/rss
    <Directory "/var/www/localhost/htdocs/rss">
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
    </Directory>
</VirtualHost>

Nginx Configuration

User

Refer to documentation for setting up public_html directories

System

Add this to your Nginx server block:

server {
    listen 80;
    server_name example.com;

    location /rss/ {
        root /var/www/localhost/htdocs;
        autoindex on;
    }
}

FAQs

Package last updated on 25 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts