Queries can be sent to the Erssical HTTP server, which will take care of fetching RSS channels, merging and filtering items and finally return a new RSS channel or Ical data.
Synopsis:
erssical-server [options]
Options are:
The HTTP server, when contacted, looks for a query-url
argument to
fetch the query from. If no such argument is provided, then a query in XML format
is looked in the query
argument. If no query is provided, the
server replies with an error.
The rtype
argument can be used to override the return type specified
in the query.
After executing the query, the server responds with a document according to the requested
return type: application/xml+rss
, text/calendar
or application/xml
.
Here are examples of querying the HTTP server from the command line, using the Curl tool. You do not need to have Erssical installed on your machine, but just know about a Erssical server accepting your queries.
curl --data-urlencode query@tests/query.xml localhost:8915
curl -d rtype="text/calendar" \ --data-urlencode query@tests/query.xml localhost:8915
Example of code providing a link to merged RSS channels:
<a href="http://localhost:8915?query-url=https://framagit.org/zoggy/erssical/-/raw/master/tests/query.xml"><img alt="My merged RSS channel" src="rss.png"/></a>
Example of code providing a link to events in Ical format:
<a href="http://localhost:8915?query-url=https://framagit.org/zoggy/erssical/-/raw/master/tests/query.xml&rtype=ical"><img alt="My merged calendar" height="32" src="Calendar.svg" width="32"/></a>
The HTTP server will only fetch HTTP or HTTPS URLs.
The --auth
command line option allows to specify which URLs the queries
can be fetched from. Moreover, it forbids sending inline queries: All queries must be
indicated by a URL, with the query-url
argument.
The aim is to be able to link which query URL refers to which channels.
The file passed with option --auth
contains lines of the following form:
<regexp matching URLs>[ // optional comment]
The regular expressions handled can contain the various constructions
detailed in the OCaml Str
module.
Here is an example of such a file:
https?://zoggy\.frama\.io/.* // Ok for Zoggy's urls
https?://framagit.org/zoggy/[^/]+/-/raw/.* // Raw zoggy files from framagit