CartaStraccia is a RSS feed reader and HTML viewer.
| public | 6 years ago | ||
| source | 6 days ago | ||
| views | 6 years ago | ||
| .gitignore | 6 years ago | ||
| LICENSE.txt | 6 years ago | ||
| README.md | 5 years ago | ||
| dub.sdl | 5 years ago | ||
| feeds.conf | 6 years ago | ||
Written in D using sumtype, pegged, htmld, requests and Vibe.d
RSS parsing with libmrss.
source/cartastraccia/endpoints.d to add your desired visualizationpublic/css/* and the frontpage's Diet Template in views/index.dtCarta Straccia uses libmrss to parse RSS feeds. It can be installed in the following ways:
libmrss can be installed from the main repositories of most of the distros, using the appropriate package manager. Examples:
- Gentoo/portage: `emerge libmrss` - Debian/apt and derivatives: `apt install libmrss`
libmrss is not available for your distribution, it can be built and installed from source. See: https://github.com/bakulf/libmrss.Requires a working D compiler and Dub:
git clone https://github.com/gallafrancesco/cartastraccia.git
dub build -b release
You'll find the cartastraccia executable in the root project directory.
CLI options and sample first usage:
$ cartastraccia --help -d --daemon Start daemon -e --endpoint Endpoints to register [cli] -f --feeds File containing feeds to pull [feeds.conf] -l --host Bind to this address [localhost] -p --port Bind to this port [8080] -b --browser Absolute path to browser for HTML rendering [/usr/bin/elinks] -r --reload Reload feeds file -h --help This help information.
RSS feeds are gathered from a configuration file specified by the option "--feeds=" A feed configuration file should have the following format:
Title refresh-time url
where refresh time can be expressed in seconds s, minutes m, hours h or days d. You can check out an example feeds.conf file included in the repository.
Cartastraccia's architecture is composed of a daemon and a client. The client can connect to the daemon and receive data through different endpoints.
Endpoints are interfaces: URL linked to particular visualizations (HTML, CLI). Interfaces are defined in endpoints.d and can be added by chosing a url and editing the D code base.
The daemon parses the feed configuration file, exiting on failure. For every RSS feed a task is invoked to fetch feed data using an HTML GET request on the URL provided in the configuration file. For each endpoint chosen at startup, the server will expose a URL which provides the data. The HTML endpoint works by rendering static HTML files which are saved to the public/ directory. The current style is defined in che css subdirectory. The CLI endpoint can be invoked from the client but is not supported (yet).
The client is a command-line interface to the daemon. It can connect to a given host and port and display the main feeds page based on the endpoint chosen. HTML will simply invoke a browser (as in elinks http://host:port). The CLI endpoint will display a (sub)set of news fetching data from the daemon.
This project is licensed under the terms of the GPLv3 License.
Feel free to open issues and PRs. Current TODOs are: