Parse XML/Atom feed from URL/string to JSON
1.8K
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
...
| 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 |
$ ./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")
keinos/gofeed-cli:latest [See available versions]$ # 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
...
gofeed-cligofeed's spec.Download the binary of your architecture, then rename it to gofeed-cli. If it suits you, place it anywhere in your path.
gofeed-cli-linux-arm5gofeed-cli-linux-arm6gofeed-cli-linux-arm7gofeed-cli-linux-arm64gofeed-cli-linux-amd64gofeed-cli-darwin-amd64gofeed-cli-windows-amd64If 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
...
sudo privilege to run the script.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.
gofeed-cli branch.
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.This project is licensed under the MIT License.
Content type
Image
Digest
Size
10.3 MB
Last updated
over 5 years ago
docker pull keinos/gofeed-cli