aurelg / feedspora

FeedSpora posts RSS/Atom feeds to your social network accounts.
35 stars 5 forks source link

Keywords ordering in parsers and clients #28

Closed wilddeej closed 5 years ago

wilddeej commented 5 years ago

This change fixes Issue #16; keywords are captured during feed parsing and their order is retained as encountered from:

  1. Hashtags found in the item's title
  2. Hashtags found at the end of the item's content (these are removed from the content that may or may not be included in the final post, depending upon client options specified)
  3. Tag data specified in the item's category (in the order it is specified)

Some of the client-specific code regarding keyword handling was necessarily modified to retain consistent usage of keywords as list data, or to remove now-extraneous processing code in the case of the Tweepy client.

Tests were added to verify expected processing of these keywords and resultant predictable tag ordering. The bug in mkrichtext that resulted in multiple ##hashtags was fixed, and a new function was added to the pytests for mkrichtext that verifies this and other tagging-related issues. All defined tests now pass, and there was also some cleanup of relevant pylint messages (score now at 8.66).

Finally, a CircleCI config was added to allow automated CI actions to be taken upon changes to the repository, if desired (see https://circleci.com for more details). No other parts of the package rely upon this config, and it can be safely removed or ignored if deemed unnecessary or undesirable.