mirror of
https://github.com/YGGverse/rssto.git
synced 2026-03-31 17:15:29 +00:00
add gemtext support, update debug handler, reorganize api to use with file-based multi-feed config, update version to 0.2
This commit is contained in:
parent
c4c7ee70b8
commit
6c5e005cf8
14 changed files with 210 additions and 308 deletions
57
README.md
57
README.md
|
|
@ -4,15 +4,14 @@
|
|||
[](https://deps.rs/repo/github/YGGverse/rssto)
|
||||
[](https://crates.io/crates/rssto)
|
||||
|
||||
## Aggregate RSS feeds into different formats
|
||||
|
||||
A simple multi-source feed aggregator that outputs static files in multiple formats.
|
||||
Convert RSS feeds into multiple formats
|
||||
|
||||
## Roadmap
|
||||
|
||||
* [x] HTML
|
||||
* [x] [Gemtext](https://geminiprotocol.net/docs/gemtext.gmi)
|
||||
* [ ] JSON
|
||||
* [ ] Markdown
|
||||
* [ ] Gemtext
|
||||
|
||||
## Install
|
||||
|
||||
|
|
@ -23,27 +22,12 @@ cargo install rssto
|
|||
## Launch
|
||||
|
||||
``` bash
|
||||
rssto --source https://path/to/source1.rss\
|
||||
--target /path/to/source1dir\
|
||||
--source https://path/to/source2.rss\
|
||||
--target /path/to/source2dir\
|
||||
--format html
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
``` bash
|
||||
-d, --debug <DEBUG> Show output (`d` - debug, `e` - error, `i` - info) [default: ei]
|
||||
-f, --format <FORMAT> Export formats (`html`,`md`,etc.) [default: html]
|
||||
-l, --limit <LIMIT> Limit channel items (unlimited by default)
|
||||
-s, --source <SOURCE> RSS feed URL(s)
|
||||
--target <TARGET> Destination directory
|
||||
--template <TEMPLATE> Path to template directory [default: template]
|
||||
--time-format <TIME_FORMAT> Use custom time format [default: "%Y/%m/%d %H:%M:%S %z"]
|
||||
-u, --update <UPDATE> Update timeout in seconds [default: 60]
|
||||
-h, --help Print help
|
||||
-V, --version Print version
|
||||
rssto -c config/example.toml
|
||||
```
|
||||
> [!TIP]
|
||||
> * prepend `RUST_LOG=DEBUG` to print worker details (supported [levels](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.LevelFilter.html))
|
||||
> * append `-u TIME` to run as the daemon with `TIME` interval update
|
||||
> * see `rssto --help` to print all available options
|
||||
|
||||
### Autostart
|
||||
|
||||
|
|
@ -51,32 +35,35 @@ rssto --source https://path/to/source1.rss\
|
|||
|
||||
1. Install `rssto` by copy the binary compiled into the native system apps destination:
|
||||
|
||||
* Linux: `sudo cp /home/user/.cargo/bin/rssto /usr/local/bin`
|
||||
* Linux: `sudo install /home/user/.cargo/bin/rssto /usr/local/bin/rssto`
|
||||
|
||||
2. Create `systemd` configuration file:
|
||||
2. Create `systemd` configuration file at `/etc/systemd/system/rssto.service`:
|
||||
|
||||
``` rssto.service
|
||||
# /etc/systemd/system/rssto.service
|
||||
|
||||
[Unit]
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
|
||||
User=rssto
|
||||
Group=rssto
|
||||
ExecStart=/usr/local/bin/rssto --source https://path/to/source1.rss\
|
||||
--target /path/to/source1dir\
|
||||
--source https://path/to/source2.rss\
|
||||
--target /path/to/source2dir\
|
||||
--format html
|
||||
--time-format %%Y/%%m/%%d %%H:%%M:%%S
|
||||
|
||||
# Uncomment for debug
|
||||
# Environment="RUST_LOG=debug"
|
||||
# Environment="NO_COLOR=1"
|
||||
|
||||
ExecStart=/usr/local/bin/rssto --config /path/to/config1.toml\
|
||||
--config /path/to/config2.toml
|
||||
|
||||
StandardOutput=file:///home/rssto/debug.log
|
||||
StandardError=file:///home/rssto/error.log
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
* on format time, make sure `%` is escaped to `%%`
|
||||
* example above requires new system user (`useradd -m rssto`)
|
||||
|
||||
3. Run in priority:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue