Skip to content

Latest commit

 

History

History

unitore

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Module :: unitore

experimental rust-status docs.rs discord

Feed reader with the ability to set updates frequency.

Basic use-case

To start using unitore, create configuration toml file with list of feed information - its link and update period.

  • update_period : update frequency for feed. Example values: 12h, 1h 20min, 2days 5h;
  • link : URL for feed source; Example:
[[config]]
update_period = "1min" 
link = "https://feeds.bbci.co.uk/news/world/rss.xml"

[[config]]
update_period = "1min"
link = "https://rss.nytimes.com/services/xml/rss/nyt/World.xml"

Add created config file to unitore storage using command .config.add with path to config file. You can add more than one file, by executing .config.add for every file. Example:

cargo run .config.add ./config/feeds.toml

To download feeds from sources specified in config file into storage use command .frames.download. Every time this command is run, feeds from all sources listed in all config files will be updated. By default, unitore will store downloaded frames at _data folder, you can change that by setting environment variable UNITORE_STORAGE_PATH to path to desired storage location.

cargo run .frames.download

To get all frames that are currently in storage run:

cargo run .frames.list

To get all feeds that are currently in storage run:

cargo run .feeds.list

To get custom information about feeds or frames run SQL query to storage database using command .query.execute with query string:

cargo run .query.execute 'SELECT title, links, MIN(published) FROM frame'

To remove config file from storage use command .config.delete with path to config file:

cargo run .config.delete ./config/feeds.toml

To see all config files with feed sources:

cargo run .config.list

To add to your project

cargo add unitore

Try out from the repository

git clone https://github.com/Wandalen/wTools
cd wTools
cargo run --package unitore