My Rust tutorial
Go to file
fgirault 92cc323f93 chore: 🙈 gitignore update 2024-07-14 20:18:04 +02:00
src chore: 🙈 gitignore update 2024-07-14 20:18:04 +02:00
.gitignore chore: 🙈 gitignore update 2024-07-14 20:18:04 +02:00
Cargo.toml feat: Initial commit 2024-07-14 20:14:17 +02:00
LICENSE Initial commit 2024-07-14 19:53:24 +02:00
README.md feat: Initial commit 2024-07-14 20:14:17 +02:00

README.md

rss2json

rss2json converts rss xml feeds to a json format.

About

This is my first Rust tutorial project, so surely not coded with all the best practices.

Output format is a complete personnal choice, inspired by some formats I've seen when using other's api.

It handles a very minimal subset and not pretends to fullfill industrial needs :)

Installation

Setup Rust using rust-up, then run in a terminal:

cargo install  --git https://git.tetalab.org/Mutah/rss2json.git

Usage

Usage: rss2json.exe [OPTIONS] --input <INPUT>

Options:
  -i, --input <INPUT>
  -o, --output <OUTPUT>  [default: ]
  -p, --pretty
  -h, --help             Print help
  -V, --version          Print version

Local file

rss2json -i some_downloaded_rss_file.xml

Remote

rss2json -i https://git.tetalab.org/Mutah/rss2json.rss

Output format

Only translate a minimal subset of attributes (if available).

{
    "channel": {
        "title": "",
        "link": "",
        "description": "",
        "last_build_date": "",
        "language": "",
        "copyright": "",
        "generator": ""
    },
    "items": [
        {
        "title": "",
        "link": "",
        "pub_date": "Sun, 14 Jul 2024 19:53:25 +0200",
        "pub_ts": 1720979605,
        "description": "",        
        "categories": ["", ""]
        }
    ]
}