Skip to content
forked from mmcdole/gofeed

✅ A command that parses RSS/Atom/XML feeds to JSON. GoFeed Powered.

License

Notifications You must be signed in to change notification settings

KEINOS/gofeed-cli

 
 

Repository files navigation

gofeed-cli

gofeed-cli is an implementation of GoFeed as a command line.

The gofeed-cli command parses RSS/Atom feed (XML) into JSON from a given URL/string.

gofeed-cli [ global options ] command [command options] [arguments...]
$ # Parse from URL
$ ./gofeed-cli url https://qiita.com/KEINOS/feed.atom
...

Download

Direct Download Links of Latest Release

OS Arch Bin Name Hardware Tested Download (Latest Release)
macOS x86_64/AMD64 gofeed-cli-darwin-amd64 MBP Early 2015 DOWNLOAD
Win10 x86_64/AMD64 gofeed-cli-windows-amd64.exe ECS LIVAZ2-4/64-W10Pro (N5000) DOWNLOAD
Linux Arm v5 gofeed-cli-linux-arm5 QNAP TS-119P+ DOWNLOAD
Linux Arm v6 gofeed-cli-linux-arm6 Raspberry Pi Zero W DOWNLOAD
Linux Arm v7 gofeed-cli-linux-arm7 Raspberry Pi 3+ DOWNLOAD
Linux Arm64 gofeed-cli-linux-arm64 n/a DOWNLOAD
Linux x86_64/AMD64 gofeed-cli-linux-amd64 n/a DOWNLOAD

Basic Usage

$ ./gofeed-cli --help
NAME:
   CLI for GoFeed - Parses Feeds such as XML and Atom to JSON.

USAGE:
   gofeed-cli [global options] command [command options] [arguments...]

VERSION:
   vX.X.X-XXXXX

COMMANDS:
   ParseURL, url        Parse the contents of a given URL into JSON.
   ParseString, string  Parse the contents of a given string into JSON.
   help, h              Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --count value, -c value  Number of items to return. (WIP)
   --json, -j               Returns output in JSON format. (Default)
   --help, -h               show help
   --version, -v            print the version
$ # Parse from URL
$ ./gofeed-cli url https://qiita.com/KEINOS/feed.atom
...
#!/bin/bash

str_feed=$(cat <<'FEED'
<rss version="2.0">
<channel>
<managingEditor>Name of Managing Editor Here</managingEditor>
<itunes:author>Author Name of iTunes Here</itunes:author>
</channel>
</rss>
FEED
)

# Parse from string
echo $(./gofeed-cli string "$str_feed")
$ # Pull image
$ docker pull keinos/gofeed-cli
...
$ # Parse from URL via Docker
$ docker run --rm keinos/gofeed-cli url https://qiita.com/KEINOS/feed.atom
...

Basic Info

Install

Download the binary of your architecture, then rename it to gofeed-cli. If it suits you, place it anywhere in your path.

  • Linux users
    • ARMv5 -> gofeed-cli-linux-arm5
    • ARMv6 -> gofeed-cli-linux-arm6
    • ARMv7 -> gofeed-cli-linux-arm7
    • ARM64 -> gofeed-cli-linux-arm64
    • Intel/x86_64/AMD64 -> gofeed-cli-linux-amd64
  • macOS users
    • Intel/x86_64/AMD64 -> gofeed-cli-darwin-amd64
  • Windows10 users
    • Intel/x86_64/AMD64 -> gofeed-cli-windows-amd64

Build

If you have bash and Docker installed, then you don't need a Golang environment to build the binary. Just run the build-bin.sh script under ./build/ directory and you'll get the compiled binaries in ./bin/

$ ./build/build-bin.sh
...
$ ls -l ./bin
...
  • Tested Docker Version: v19.03.5, 19.03.8 | macOS Mojave 10.14.6 @ MacBookPro Intel Core i5
  • You might need a sudo privilege to run the script.

Development

This repository contains /.devcontainer for Visual Studio Code Remote-Container users.

It allows you to use a Docker container as a Golang-featured development environment in VS Code.

Contribute/Collaborate

  • All the Pull Requests MUST be to gofeed-cli branch.
    • Note that this CLI app is placed on gofeed-cli orphan branch and NOT in master. The master branch is an up-to-date code of the original gofeed, so any PRs to this CLI app must be to gofeed-cli branch.
  • Any contribution/collaboration such as new feature, bug fixing, refactoring, etc. are more than well come!
  • Be nice to others.
  • Issues/comments en Español or 日本語 are "no problemo!”. Be happy!

License

This project is licensed under the MIT License.

Credits

About

✅ A command that parses RSS/Atom/XML feeds to JSON. GoFeed Powered.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 58.3%
  • Go 22.9%
  • Dockerfile 18.8%