Wednesday, February 11, 2015

Blogger RSS feed and category URLs with combined labels/tags

Run a blog on blogger.com? Maybe made it bilingual? Maybe blog on different topics? Wondering how the URL for an RSS feed for e.g. two labels looks like? Asking how to see all articles matching two tags (labels)? Finding a keyword under one or more labels? Many things are possible. I'll show a few examples below. Maybe that is even interesting for the planet Debian folks. I happen to blog mostly in English about Debian topics. But sometimes I also want to post something in German only (e.g. about German tax software). It is discouraged to put the latter on planet-debian. Instead it can be published in the language specific planet feed. So instead of adding new tags, one could easily combine two labels: the one for language of the feed and the one for Debian related posts (e.g. debian+english or debian+german). Therefor this post goes to the Debian planet.

Search for combbined labels/tags

Say I want to view all postings related to the topics FOO and BAR. Then it is:

http://domain.tld/search/label/FOO+BAR OR
http://domain.tld/search/?q=label:FOO+label:BAR

Be aware that labels are case sensitive and that more labels can be added. The examples below will show all postings related to the topics debian and n54l and xbmc:

http://www.wgdd.de/search/label/debian+n54l+xbmc
http://www.wgdd.de/search/?q=label:debian+label:n54l+label:xbmc

It is also possible to search for all posts related to the topics FOO or BAR:

http://domain.tld/search/?q=label:FOO|label:BAR

Say for example, you want to see all postings related to the topics logitech or toshiba, then it is:

http://www.wgdd.de/search/?q=label:logitech|label:toshiba

Feed URLs

To get back to the first example lets say, the feed shall contain all posts related to the topics FOO and BAR. Then it is:

http://domain.tld/feeds/posts/default/-/FOO/BAR/ OR
http://domain.tld/feeds/posts/default?q=label:FOO+label:BAR

Respecitvely to show all feeds related to either of those topics use:

http://domain.tld/feeds/posts/default/?q=label:FOO|label:BAR

To get a feed of the example topics as shown above then would be:

http://www.wgdd.de/feeds/posts/default/-/debian/n54l/xbmc/
http://www.wgdd.de/feeds/posts/default?q=label:debian+label:n54l+label:xbmc
http://www.wgdd.de/feeds/posts/default?q=label:logitech|label:toshiba

Coming back to planet Debian, below is a solution for a multi-lingual planet contribution (if both planets would exist):

http://www.wgdd.de/feeds/posts/default?q=label:planet-debian+label:english
http://www.wgdd.de/feeds/posts/default?q=label:planet-debian+label:german

Advanced ...

There is much more possible. I'll just show two more examples. AND and OR can be combined ...

http://www.wgdd.de/feeds/posts/default?q=label:debian+(label:logitech|label:toshiba)

... and a keyword search can be added too:

http://www.wgdd.de/feeds/posts/default?q=stick+(label:debian+(label:logitech|label:toshiba))

Links

8 comments:

  1. The OR feed doesn't work if one of the labels has spaces. Do you know how to do it?

    ReplyDelete
    Replies
    1. it works with search but not in feed urls.

      Delete
    2. It works here with feeds too (shown as encoded URL this time - maybe you need to escape quotation marks and the space sign in your browser?):

      http://www.wgdd.de/feeds/posts/default?q=label:%22purple%20ball%22|label:toshiba

      If that doesn't work for you, maybe you post an example?

      Delete
    3. I think I figured it out. For some reason it only works when I use blogger.com's feed url. Maybe it is because I redirect to Feedburner, but even when I used ?redirect=false, it still shows my full feed.

      This url doesn't work: http://www.newsmovingmarkets.com/feeds/posts/default/?q=label:%22US%20Stock%20Market%22%7Clabel:SPX

      But this one seems to work.

      https://www.blogger.com/feeds/5355627375288883516/posts/default/?q=label:%22US%20Stock%20Market%22%7Clabel:SPX

      Delete
  2. The OR feed doesn't work if one of the labels has spaces. Do you know how to do it?

    ReplyDelete
  3. I tried these methods on my blog, but the results are limited. The blog doesn't show all the posts with the two labels.

    With one label: http://www.infogeekcorp.com/search/label/Cinema
    And with two labels: http://www.infogeekcorp.com/search/label/Cinema+Críticas

    Can you please help me? Thank's!

    ReplyDelete
  4. It helps them stay in touch and up to date with the latest information available. An RSS feed is also an important component of their own marketing strategies.
    what are link pyramids

    ReplyDelete