1. 21 Mar, 2019 1 commit
  2. 26 Feb, 2019 3 commits
  3. 20 Feb, 2019 2 commits
    • Antoine Beaupré's avatar
      add JSON output plugin · 7432d320
      Antoine Beaupré authored
      This plugin is very simple, if not trivial: it simply dumps all the
      feed items in a JSON stream. This can be parsed by `jq` on the
      commandline to diagnose feed problems, do scripting or whatever.
      
      This is different from how plugins normally receive "arguments", which
      are "shell-quoted". For example, the `exec` plugin, when called with
      `{item.url} {item.title}` would receive it as a shell-quoted ("$URL"
      "$TITLE") string, and not JSON.
      7432d320
    • Antoine Beaupré's avatar
      handle broken pipe correctly from plugins · 55fa498e
      Antoine Beaupré authored
      Before this, doing "feed2exec parse foo | head" would yield an error
      message for *every* feed item. This silences the warnings completely.
      55fa498e
  4. 19 Feb, 2019 4 commits
    • Antoine Beaupré's avatar
      use dateparser module if available · b5aebc55
      Antoine Beaupré authored
      This behaves better than the feedparser date parser in most scenarios.
      
      Still needs unit tests and dependency checks.
      
      Closes: #6
      b5aebc55
    • Antoine Beaupré's avatar
      expand and cleanup date validation routines · be5e7e27
      Antoine Beaupré authored
      We used to have a long list of fields. Now we just iterate over the
      item, then the feed, and look for the fields we want. It's cleaner
      visually and might even make some feeds validate, as we now look for
      `created_parsed` from feeds as well.
      
      Order should be otherwise unchanged.
      
      This was useful in diagnosing issues with invalid dates, as before
      this change, we couldn't tell which field was picked for the item
      date.
      
      See #7.
      be5e7e27
    • Antoine Beaupré's avatar
      warn instead of crashing on invalid dates · 2e339c79
      Antoine Beaupré authored
      We used to completely crash when a feed had invalid or missing
      dates. After reviewing the standards, it turns out this is not quite
      valid behavior: RSS 0.90 and 0.91, for example, do not have dates at
      all. Yet it seems to me a valid feed should minimally include *some*
      timestamps and the more likely explanation for a missing "parsed"
      field is that feedparser wasn't able to parse the feed properly
      
      Therefore, turn this into a warning. This will be annoying as hell for
      some users and feeds, unfortunately, but I don't think silently
      ignoring those errors will be much better, as we *do* need a
      timestamp (for example to generate valid emails) internally.
      
      We fallback to the current time, for lack of a better alternative.
      
      Closes: #7
      2e339c79
    • Antoine Beaupré's avatar
      3dd1e2c0
  5. 16 Feb, 2019 4 commits
  6. 15 Nov, 2018 2 commits
  7. 23 Oct, 2018 2 commits
  8. 18 Oct, 2018 7 commits
  9. 31 Jul, 2018 1 commit
  10. 14 Jun, 2018 5 commits
    • Antoine Beaupré's avatar
      prepare 0.12 · f6bbcc60
      Antoine Beaupré authored
      f6bbcc60
    • Antoine Beaupré's avatar
      add pytest cache to gitignore · 9c682dba
      Antoine Beaupré authored
      9c682dba
    • Antoine Beaupré's avatar
      fix parsing of empty links · 1749debc
      Antoine Beaupré authored
      For some obscure reason, with the test feed provided in #5, the
      resulting link is no available in the feed at all, which crashes the
      normalize routine. That is because urlparse.urlsplit returns a
      different type on strings (which are used in the normal path) or
      "None" (which is used when the link is not present).
      
      We fix this by defaulting to the empty string, although this probably
      means that feed2exec will have trouble adapting to that feed in the
      first place, but that's another bug.
      
      Closes: #5
      1749debc
    • Antoine Beaupré's avatar
      add failing test for issue #5 · b765461a
      Antoine Beaupré authored
      We do not need to see the output of that feed, actually: we just want
      to parse it. Therefore, make sure we can test any .xml file provided
      even if it does not have a matching .mbx.
      
      It is a little strange we test parsing of all feeds in the mbx plugin,
      but since we do it anyways, I don't see why it should be moved out of
      there.
      b765461a
    • Antoine Beaupré's avatar
      fix planet test failure on older html2text · 63f75c6b
      Antoine Beaupré authored
      The test suite was failing on my laptop for some mysterious
      reason. After investigation, it turns out I still had an older version
      of html2text there which triggered a change in the output. We had that
      covered in test_plugins, but not in test_main, so copy the excepted
      failure fixture there as well.
      63f75c6b
  11. 20 Mar, 2018 3 commits
  12. 06 Mar, 2018 1 commit
  13. 29 Jan, 2018 5 commits