rss2json/README.md

72 lines
1.4 KiB
Markdown
Raw Normal View History

2024-07-14 19:53:24 +02:00
# rss2json
2024-07-14 20:14:17 +02:00
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:
```bash
cargo install --git https://git.tetalab.org/Mutah/rss2json.git
```
## Usage
```bash
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
```bash
rss2json -i some_downloaded_rss_file.xml
```
### Remote
```bash
rss2json -i https://git.tetalab.org/Mutah/rss2json.rss
```
## Output format
Only translate a minimal subset of attributes (if available).
```javascript
{
"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": ["", ""]
}
]
}
```