From cb7343796c752809588474b44be691f3735cb829 Mon Sep 17 00:00:00 2001 From: Lucas Lois Date: Sat, 27 Jan 2024 18:37:16 -0300 Subject: [PATCH] feat: creates a recipe for the Martin Fowler Blog --- recipes/martinfowler.recipe | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 recipes/martinfowler.recipe diff --git a/recipes/martinfowler.recipe b/recipes/martinfowler.recipe new file mode 100644 index 0000000000..2562403380 --- /dev/null +++ b/recipes/martinfowler.recipe @@ -0,0 +1,29 @@ +import re +from calibre.web.feeds.news import BasicNewsRecipe + +class MartinFowler(BasicNewsRecipe): + title = 'Martin Fowler Blog' + description = 'Software development is a young profession, and we are still learning the techniques and building the tools to do it effectively.' + language = 'en' + oldest_article = 14 + + keep_only_tags = [ + dict(name='main') + ] + + remove_tags = [ + dict(name='div', attrs={'class': 'bio'}), + dict(name='div', attrs={'class': 'article-card'}), + dict(name='hr', attrs={'class': 'bodySep'}) + ] + + remove_tags_after = [ + dict(name='div', attrs={'class': lambda x: x and 'paperBody' in x.split()}) + ] + + use_embedded_content = False + no_stylesheets = True + + feeds = [ + (u'Martin Fowler Blog', u'https://martinfowler.com/feed.atom') + ]