godirlist2rss

package module
v0.0.0-...-59157e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 6 Imported by: 0

README

godirlist2rss

Generates an RSS or ATOM feed with links to files. In case you ever want to be updated on new files in a folder that is also accessable by HTTP.

Usage

My usage currently looks like this:

#!/bin/bash
godirlist2rss \
  --input-dir=/data/videos \
  --output-format=atom --output-file=listing.atom \
  --feed-title="$HOSTNAME Videos" --feed-author-name=Youtube-DL \
  --feed-public-url=https://$HOSTNAME/videos/feed.atom \
  --feed-filesbaseurl=https://$HOSTNAME/videos/

This is executed by a crontab entry regularly. This way the feel contains an entry for every file. If new files appear, new entries are generated. My RSS reader notifies me then. Each entry will link to the file (based on --feed-filesbaseurl).

Building

# for your own platform
go build -o godirliss2rss ./cmd

# or cross compile
GOOS=linux go build -o godirlist2rss ./cmd

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flags

type Flags struct {
	FeedTitle               string
	FeedDescription         string
	PublishedURL            string // url where the feed will be availble
	AuthorName, AuthorEmail string

	BaseURL string

	InputPath string

	OutputFile   string
	OutputFormat string
	OutputMode   os.FileMode
}

func (Flags) BuildFeed

func (flags Flags) BuildFeed() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL