This PR does 5 things:
- add an option
day_limit(-d) that gives you the ability to limit the number of days a post can be in the past. I.e., when you dofrenring ... -d 7, you only get back posts published in the last 7 days. This hard limit is not applied if the total number of resulting posts would be less than the total number requested (e.g. you ask for 3 posts, but only 2 posts from your list have been published last week). In that case, additional posts are added in reverse-chronological order to reach the total amount. - add an option
fail_fastthat enables the failure behaviour that used to be the default (fail if any of the feeds fail to be parsed). The new default behaviour is to skip feeds that fail and print a message to stderr. This mirrors the behaviour of openring more closely. If you want to preserve the previous default behaviour, I can "invert" this option though. - fix a bug with atom feed handling. If a link within an entry in an atom feed doesn't have a
relattribute, feed_rs setsrel="alternate". So this meant that the article construction code inparse_feeddidn't pick up any post URLs from atom feeds. - add long names for all CLI options (don't think there's a good reason not to have those)
- a tiny bit of refactoring + addition of a shell.nix file to help Nix(OS) users build and work with the project.
This PR does 5 things:
- add an option `day_limit` (`-d`) that gives you the ability to limit the number of days a post can be in the past. I.e., when you do `frenring ... -d 7`, you only get back posts published in the last 7 days. This hard limit is not applied if the total number of resulting posts would be less than the total number requested (e.g. you ask for 3 posts, but only 2 posts from your list have been published last week). In that case, additional posts are added in reverse-chronological order to reach the total amount.
- add an option `fail_fast` that enables the failure behaviour that used to be the default (fail if any of the feeds fail to be parsed). The new default behaviour is to skip feeds that fail and print a message to stderr. This mirrors the behaviour of openring more closely. If you want to preserve the previous default behaviour, I can "invert" this option though.
- fix a bug with atom feed handling. If a link within an entry in an atom feed doesn't have a `rel` attribute, feed_rs sets `rel="alternate"`. So this meant that the article construction code in `parse_feed` didn't pick up any post URLs from atom feeds.
- add long names for all CLI options (don't think there's a good reason not to have those)
- a tiny bit of refactoring + addition of a shell.nix file to help Nix(OS) users build and work with the project.