Archived
1
0
Fork 0
dlight is a program that checks items in rss feeds and download those items/links that are matched against a set of rules.
This repository has been archived on 2026-05-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Find a file
2011-09-21 17:19:10 +02:00
.gitignore gitignore: ignore executeables and config file 2011-09-21 17:19:09 +02:00
cconf.c compiled file format: associate destination whit each invidual filter 2011-09-21 17:19:09 +02:00
cconf.h compiled file format: associate destination whit each invidual filter 2011-09-21 17:19:09 +02:00
compile.c compiled file format: associate destination whit each invidual filter 2011-09-21 17:19:09 +02:00
config.sample compiled file format: associate destination whit each invidual filter 2011-09-21 17:19:09 +02:00
COPYING License with GPLv2 2011-09-21 17:19:09 +02:00
dlhist.c License with GPLv2 2011-09-21 17:19:09 +02:00
dlhist.h License with GPLv2 2011-09-21 17:19:09 +02:00
dlight.c compiled file format: associate destination whit each invidual filter 2011-09-21 17:19:09 +02:00
env.c License with GPLv2 2011-09-21 17:19:09 +02:00
env.h License with GPLv2 2011-09-21 17:19:09 +02:00
filter.c License with GPLv2 2011-09-21 17:19:09 +02:00
filter.h License with GPLv2 2011-09-21 17:19:09 +02:00
http.c License with GPLv2 2011-09-21 17:19:09 +02:00
http.h License with GPLv2 2011-09-21 17:19:09 +02:00
lockfile.c lockfile: release locks on exit 2011-09-21 17:19:10 +02:00
lockfile.h lockfile: release locks on exit 2011-09-21 17:19:10 +02:00
Makefile Makefile: add -Wall -O2 to CFLAGS 2011-09-21 17:19:10 +02:00
read-config.c compiled file format: associate destination whit each invidual filter 2011-09-21 17:19:09 +02:00
README Initial commit 2011-09-21 17:13:28 +02:00
rss.c License with GPLv2 2011-09-21 17:19:09 +02:00
rss.h License with GPLv2 2011-09-21 17:19:09 +02:00

	  Dlight - automatic feed downloader

	--------------------------------------

dlight is a program that checks items in rss feeds and download those
items/links that are matched against a set of rules.
What this does different than other programs of this type is that configuration
of the program should be easy and flexible. Not forcing users to write
and maintain large lists of raw regular expressions.

The best way to use dlight is by using time-based scheduling like cron.
--------------------------------------------------------
# Make cron execute dlight every 15 minutes
*/15 * * * * /path/to/dlight >> /path/to/logs/dlight.log
--------------------------------------------------------


dlight is divided into 3 major components: the dlight program,
Configuration files and Compiler.

	* dlight

The actual program that checks feeds and download items.
The configuration data is read from the compiled config file "~/.dlight/config".

The program first fetches the rss file (target), walks through
all items applying all filters associated whit the current target.
And if one matches, that item will be downloaded to the destination associated
with the target. it does this for all rss files (targets) in the config.

	* Configuration Files

A set of human-readable configuration files that the user should configure
dlight through. This is where users defines their targets, destinations,
filters and other type of information. (currently there is only one file
with a similar structure that the compiled format use).

	* Compiler

An compiler is provided that compiles configuration files down to a
binary config file used by dlight, one can think of this step as publish/update
the configuration used by the program.


This design is used for two main reasons.

One, if you edit your configuration structure and dlight would be executed by
for example cron. if dlight would read directly from those files, it is possible
that the configuration files are not in a desired state and making dlight
do some weird things.

The second reason is that processing all those files everytime dlight is invoked
can be quite slow, the compiled format is designed to provide fast I/O reads.
Also by using a source -> compiler -> output design, errors can be caught
in the configuration files when the user invokes the compiler.
which is a more natural way of notify the user on such errors then to
have dlight abort and log the error because the program is supposed to be
executed in an automatic manner, the error will not be seen right away.