GitXplorerGitXplorer
n

feed-cli

public
1 stars
0 forks
5 issues

Commits

List of commits on branch master.
Unverified
17d226b18c86e3d6cf7e16bbfd96d05133242b99

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

ddependabot[bot] committed 2 years ago
Unverified
fab1f7c76968195b9b0db8c3e77b31b7c73e81cb

Bump python from 3.10.3 to 3.10.6 in /integration-test/local-rss

ddependabot[bot] committed 2 years ago
Unverified
cdaca83f94ecdc404a4bd9492ec6af80b83458a2

Bump python from 3.10.1 to 3.10.3 in /integration-test/local-rss

ddependabot[bot] committed 3 years ago
Unverified
2ccffaa7ef7f954b337799e6619adaef64ea6638

Bump python from 3.10.0 to 3.10.1 in /integration-test/local-rss

ddependabot[bot] committed 3 years ago
Unverified
5c25b8ccf38d0532c0080461211945a29a2c9167

Restyled by whitespace

rrestyled-commits committed 3 years ago
Unverified
53b9d0a50108dc799fcabccdae949a3d4cdfaf9e

adds support for custom names

nnhomble committed 3 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