GitXplorerGitXplorer
n

feed-cli

public
1 stars
0 forks
5 issues

Commits

List of commits on branch master.
Unverified
eeacf442bd6dc6d084dc6c653ee148e5863c6f46

none

nnhomble committed a year ago
Unverified
418e28fac1c6f37d03d99ab42609237f093be08d

docs

nnhomble committed a year ago
Unverified
904785664b9afc992c11e0adcf4838ca4d22bab7

support youtube users/channels

nnhomble committed a year ago
Unverified
701de74707c6f1553fd8b82d50448285ee4c43f8

Bump python from 3.11.1 to 3.11.2 in /integration-test/local-rss

ddependabot[bot] committed 2 years ago
Unverified
a42c7c2324c7ed6b05a7c9247ab7801505fc93f0

tidy

nnhomble committed 2 years ago
Unverified
0c2ea6377682b7535c0d935f83418a5d42b68ffa

to 1.18

nnhomble committed 2 years ago

README

The README file for this repository.

:toc: macro

= feed-cli

image:https://github.com/nhomble/feed-cli/workflows/CI/badge.svg[CI] image:https://github.com/nhomble/feed-cli/workflows/Integration%20test/badge.svg[Integration test] image:https://github.com/nhomble/feed-cli/workflows/Linter/badge.svg[Linter]

[.lead] simple utility for formatting (groups of) feeds

toc::[]

== Usage

[source,bash]

$ echo "https://your.feed.com/feed" | go run feed.go

== Template Data

You can supply your own golang template with the -templateOverride parameter. When defining your own template, there are several template variables at your disposal:

|=== |Field |Description

|.Now |Get current time (machine dependent) |.NowIn (loc) |Get current time in desired location |.Org |The organization / blog name / title |.Feeds |An array of entries you can perform a range over |===

Within a feed object you have

|=== |Field |Description

|.Parent |A reference back to the feed group |.Article |Article name, title of the post |.Link |URL to the source |.Published |last touched time, latest time between published and updated time |===

https://github.com/nhomble/fdmi/blob/master/index.tpl[for example]

== Feed metadata

The goal has been to keep the feed file simple. At a minimum, you can just provide a list of feeds delimited by new-lines and you are done. To naturally give some more metadata per feed, the cli recognizes the following format

Then the grammar looks like:

[source,text]

::= || \n ::= || > || "" ::= # ::= ::= ::= = || "" ::= ::=

=== Feed Schemes By default, urls passed as feedLinks are interpreted as typical xml feed (rss, atom). |=== | Scheme | Feature | Additional Configuration

| (default) http:// | parse rss/atom feed | none | twitter:// | parse twitter timeline | define environment variables: TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET | youtube_user://<@username> | parse youtube channel | none |===

=== For example

https://github.com/nhomble/fdmi/blob/master/feeds[My feeds]

[source,text]

=== Feed metadata fields

|=== |Key |Description

| daysOld | positive number to indicate number of days old to respect this feed | limit | positive number to indicate a limit to the number of entries to pull for a feed | timeout | positive number to indicate number of seconds to use as timeout to fetch a feed | nameOverride | string to override the blog title variable in the template data |===

== CLI Options

[source,text]

-templateOverride [relative path to go template] // point to your own go templates for formatting $ go run feed.go -templateOverride ./index.tpl

-numWorkers [natural number] // control the amount of parallelism in fetching feeds $ go run feed.go -numWorkers 5